References / Resources
- Home Asisstant Supervised on RPi 4 – https://community.home-assistant.io/t/install-supervised-supervisor-on-raspberry-pi4-with-docker-installation/291186/4
- Home Assistant Supervised GitHub – https://github.com/home-assistant/supervised-installer#supported-machine-types
- Kiosk Browser for Ubuntu: https://obrienlabs.net/setup-kiosk-ubuntu-chromium/
- Up to date installer: https://peyanski.com/how-to-install-home-assistant-supervised-official-way/#Home_Assistant_Supervised_method
Install Home Assistant with Docker
- So first we need to make sure our system is up to date
sudo apt-get update && sudo apt-get upgrade
- Then we need to install the pre-reqs for Home Assistant
sudo apt-get install network-manager apparmor-utils jq -y
- Then reboot the Pi
sudo reboot
- Once the Pi is back, then we need to get the official docker script for RPI
curl -fsSL <https://get.docker.com> -o get-docker.sh
- Once the script is downloaded, then we need to run it
sudo sh get-docker.sh
- Then we need to give the PI user docker permissions
sudo usermod -aG docker pi
- Then we can grab the Official HA Installer Script. You can find the latest version here: https://github.com/home-assistant/os-agent/releases/tag/1.2.2
sudo curl -Lo installer.sh <https://github.com/home-assistant/os-agent/releases/download/1.2.2/os-agent_1.2.2_linux_armv7.deb>
- Finally we need to run the installer
sudo dpkg -i os-agent_1.2.2_linux_armv7.deb
- Now we install Supervisor
wget <https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb>
- Now once the install is complete, we can test by going to:
<http://localhost:8123> or <http://homeassistant:8123>
Kiosk / Full Screen Mode
Auto Start
#!/bin/bash
# Run this script in display 0 - the monitor
export DISPLAY=:0
# Hide the mouse from the display
unclutter &
# If Chromium crashes (usually due to rebooting), clear the crash flag so we don't have the annoying warning bar
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' /home/pi/.config/chromium/Default/Preferences
sed -i 's/"exit_type":"Crashed"/"exit_type":"Normal"/' /home/pi/.config/chromium/Default/Preferences
# Run Chromium and open tabs
/usr/bin/chromium-browser --window-size=1920,1080 --start-fullscreen --window-position=0,0 http://localhost:8123 &
# Start the kiosk loop. This keystroke changes the Chromium tab
# To have just anti-idle, use this line instead:
# xdotool keydown ctrl; xdotool keyup ctrl;
# Otherwise, the ctrl+Tab is designed to switch tabs in Chrome
# #
#while (true)
# do
# xdotool keydown ctrl+Tab; xdotool keyup ctrl+Tab;
# sleep 15
#done