Home Automation · August 26, 2024

Home Assistant Supervised

YouTube player

Install Home Assistant Supervised on Debian 12! Follow this guide to ensure you do this in a fully supported way. I also cover doing an in-place upgrade from Debian 11 (bullseye) to Debian 12 (bookworm), in case you are in need of that piece as well.

Note: these instructions are specific to aarch64 / arm64 SoC’s (Radxa Rock4A specifically), but will work just fine for any Debian 11+ system, just have that in mind when you see references to architecture, you’ll need to adjust.

HA Supervised (Debian on Rock4A)

  • Flash Radxa Debian 11 .img
  • Boot, login: rock / rock
  • Change password

passwd

Upgrade from Debian 11 (Bullseye) to 12 (bookworm)

  • Edit the repo’s:
  • navigate to /etc/apt
  • Edit all relevant repos and change from bullseye to bookworm
    • sources.list
    deb https://deb.debian.org/debian bookworm main contrib non-free non-free-firmwarecd sources.list.dbullseye-backports.listbash deb https://deb.debian.org/debian bookworm-backports main contrib non-freebullseye-security.listdeb https://deb.debian.org/debian-security bookworm-security main contrib non-freebullseye-updates.listdeb https://deb.debian.org/debian bookworm-updates main contrib non-freeradxa.listdeb [signed-by=/usr/share/keyrings/radxa-archive-keyring.gpg] https://radxa-repo.github.io/bookworm bookworm mainsudo apt updatesudo apt upgrade --without-new-pkgssudo apt full-upgradesudo reboot

Install Prerequsites

sudo apt install apparmor bluez cifs-utils curl dbus jq libglib2.0-bin lsb-release network-manager nfs-common systemd-journal-remote systemd-resolved udisks2 wget -y

Install Docker

curl -fsSL get.docker.com | sh

Give your local account access to docker without needing to sudo each time (replace usernamewith your actual account name):

sudo usermod -aG docker username

Install OS Agent

wget https://github.com/home-assistant/os-agent/releases/download/1.6.0/os-agent_1.6.0_linux_aarch64.deb
sudo apt install ./os-agent_1.6.0_linux_aarch64.deb

Apparmor and Cgroup v1

  • Add apparmor and cgroup edits to kernel boot cmdline
  • edit /etc/kernel/cmdline
  • add to the end:
    systemd.unified_cgroup_hierarchy=0 apparmor=1 security=apparmor
  • update:
    sudo u-boot-update
  • sudo reboot

Install Home Assistant Supervised

wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
sudo apt install ./homeassistant-supervised.deb
  • choose machine type: qemuarm-64
  • Watch install and background task progress with:
sudo journalctl -f

and:

docker stats

The base 6 containers will start to appear after a few minutes, and once the homeassistantcontainer is up for about a minute, you should be able to hit the webUI at http://ipaddress:8123 and see the Preparing Home Assistant message:

image.png

At this point, it’s best to keep a watch on sudo journalctl -f for any signs of trouble.

Once it completes successfully, it is best to give the system one last reboot. If you do not, after your initial Home Assistant setup, you will see an error in the System Settings within the Home Assistant UI, that it does not have privileged access to Docker. Reboot fixes that (now, or anytime after, but don’t start loading up Add-Ons before you do reboot, as these are Docker images).

image (3).png

After reboot, this error is no longer present in Home Assistant Settings area.

Final check before you proceed further: In the Home Assistant UI, navigate to Settings.. System… Repairs… and observe there are no issues detected. This is a good area to keep an eye on periodically, to ensure your system is healthy. The above example of “Not privileged” would appear here if it was not resolved.

image (4).png