In my search for suitable touchscreen hardware to display the Home Assistant dashboard in kiosk mode, I decided to use a Raspberry Pi with the official 7" Touch Display 2. While a 7" display may not be the largest, it’s sufficient to effectively display a complete Home Assistant dashboard. I’ve never been a fan of tablets that constantly require a charging battery, as I’m not convinced they will last any longer than a Raspberry Pi.
I would like to introduce you to my TouchKio project, which supports any kind of Linux device connected to a Touch Display and is designed for easy setup, making it beginner-friendly.
TouchKio
A Node.js application that utilizes Electron to create a kiosk mode window specifically designed for a Home Assistant dashboard. This tool is packaged as a .deb file, making it easy to launch the kiosk application on any Debian based Linux hardware (e.g. Raspberry Pi) equipped with a DSI or HDMI Touch Display. Additional releases for other Linux systems are available as .zip file.
This implementation addresses common issues encountered when using the built-in browser running in fullscreen mode on the Raspberry Pi with Touch Display.
Moreover, the device running the kiosk application also offers several Home Assistant MQTT sensors, enhancing it’s functionality for automation purposes.
If you are interested you may want to have a closer look into this github repository:
Technically, it is possible to connect some additional sensors directly to GPIO and trigger the wlopm --on * command (which is used to turn on the screen), but that would require wiring and custom programming.
The screen can be put into sleep mode using the Raspberry Pi’s built-in screen blanking function (e.g. blank screen after 10 minutes) and woken up again by tapping it once. Alternatively, the method below can also be used.
With the mqtt integration it is possible to turn the screen on via Home Assistant. The only thing required would be a Home Assistant automation and an existing presence or motion sensor. e.g when presence is detected, turn the screen on, turn off when no presence or after some timeout.
Additional the screen brightness may also be adjusted if the sensor provides some light (lux) measurements. e.g. dim the screen brightness down at night.
Awesome kiosk application. Works way smoother for me than chromium in kiosk mode.
However, since I am using a Pi 4, I am unable to use/test the MQTT sensors. For testing, would it be enough to alter the model filter and remove the 5 in it so it is “supported” on all Pi’s?
Alright. So I did some testing… I am using an HDMI-Display so the brightness and display status won’t work for me. So I commented out all function calls for getting this data and removed the model number from the getModel() function to allow other Pi’s than the 5.