I wanted to set up a simple kiosk dashboard in homeassistant and make it available via a pi with the pi 7" touchscreen.
Kiosk Dashboard
To set up the actual dashboard I simply followed this tutorial from Smart Home Junkie for the config then changed out the view/sub-view contents with the controls and displays I wanted:
Video: Kiosk Mode in Home Assistant – How To – The Right Way! - Smart Home Junkie
Pi Setup
Initial setup was just a simple Raspbian 64 bit SD card - basically just using Raspberry Pi Imager but choosing 64 bit and enabling SSH.
I didn't bother with WiFi - this will be powered by PoE - so it will have an ethernet connection.
Right now - to save on fiddling with the screen board's use of the power pins on the 40 pin connecter and also because I find the fan on the PoE hat distracting - I'm using a simple PoE splitter.
Connect the 7" screen - e.g. The PiHut has an assembly guide
Boot and login.
Kiosk setup
For this - I followed this guide from raspberry
The kiosk.sh script
#!/bin/bash
xset s noblank
xset s off
xset -dpms
unclutter -idle 0.5 -root &
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /home/admin/.config/chromium/Default/Preferences
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' /home/admin/.config/chromium/Default/Preferences
/usr/bin/chromium-browser --noerrdialogs --disable-infobars --kiosk --force-dark-mode &
while true; do
sleep 10
done
Changes:
I don't want to switch between tabs.
The service
[Unit]
Description=Chromium Kiosk
Wants=graphical.target
After=graphical.target
[Service]
ExecStartPre=/bin/sleep 20
Environment=DISPLAY=:0.0
Environment=XAUTHORITY=/home/admin/.Xauthority
Type=simple
ExecStart=/bin/bash /home/admin/kiosk.sh
Restart=on-abort
User=admin
Group=admin
[Install]
WantedBy=graphical.target
Changes:
service kiosk status
output