Home Assistant Kiosk - zbrewer/homelab GitHub Wiki

I'm using a Microsoft Surface Pro 3 with Endeavour OS (Arch Linux) and Gnome DE installed as a dedicated kiosk for Home Assistant. This works well since it is a high-resolution, responsive touchscreen and, while it is underpowered by today's standards, still provides plenty of performance for simple dashboard control.

Setup

OS Installation

Endeavour OS (or any other Linux distro) can be installed by first entering the UEFI config for the Surface Pro. To do this, shut down the computer and tap the power button while holding the volume-up button. Release the volume-up button when the "Surface" logo appears. This should take you to the UEFI/BIOS screen. This is pretty simple on this device but you will want to disable secure boot and change the boot order so that removable USB media boots before the internal drive.

With that done, plug in a bootable drive, save, and exit the configuration. Also note that, since WiFi drivers for the Surface Pro 3 aren't included by default, you may need to plug in a USB network adapter (via USB hub) in order to connect to the internet during installation or initial configuration. Once the install is complete, the linux-firmware-marvell package can be installed to fix the WiFi issue.

Gnome Configuration

In order to make a better kiosk, the following settings should be changed for Gnome:

  • In the Power settings menu:
    • Power mode to Balanced
    • Automatic Screen Brightness off (your mileage may vary - this caused the brightness to fluctuate frequently and annoyingly for me)
    • Dim Screen on
    • Screen Blank never
    • Automatic Suspend only on battery power or off
  • In the Accessibility menu under Typing, enable the screen keyboard
  • Install the no-overview Gnome extension in order to ensure that the computer doesn't start in overview mode
  • Enable automatic login under the Users setting page for the desired user

Home Assistant Dashboard Launching

I connected the Surface Pro to my IoT WiFi network so that it can access Home Assistant directly but not other sensitive resources. I then created a new dashboard user in Home Assistant and made sure it wasn't set as an admin. I used this user to login to Home Assistant in Firefox on the Surface Pro with the Keep me signed in option enabled.

At this point, I could use the dashboard on the Surface Pro successfully so the only remaining step was to ensure that it started automatically at boot and that it opened to the Home Assistant web interface.

I accomplished this by creating a new file with the .desktop extension at ~/.config/autostart. In this case, ~/.config/autostart/firefox-kiosk.desktop. I then added the following contents to that file:

[Desktop Entry]
Name=Firefox-Kiosk
GenericName=Firefox Kiosk
Comment=Start Firefox in kiosk mode displaying the Home Assistant dashboard
Exec=firefox -kiosk "http://10.0.101.10:8123/dashboard-name"
Terminal=false
Type=Application
X-GNOME-Autostart-enabled=true

Restarting should now log-in automatically and open the dashboard in full screen kiosk mode. To close Firefox, use ALT+F4. ALT+Spacebar can also be used to bring up the window menu which has a close option.