Installing Home Assistant Supervised on a Raspberry Pi using Debian 12

Hi @KruseLuds. Although I understand the eagerness to install HA Supervised on the brand new RPI5 your patience is still put to the test: Supervised is simply not ready yet to be installed on the RPI5. If you really cant wait I advise you to install i.e. HA OS while waiting for Supervised is getting the Go for the RPI5 by the HA devs.

Those “Guides” which are popping-up claiming to succeed installing Supervised on the RPI5 but withholding the fact that it will produce a “Unsupported”/“Unhealthy” Supervised installation at best are making me wonder …

As for your individual HA usage I really would consider to leave RPI’s altogether and jump on to a mini pc like a NUC or something similar.

2 Likes

Thanks @Tamsy to jump onto anything that isn’t already solidly testeed, I agree. Long gone are the days that I used to jump at the latest ‘bleeding edge’ stuff because I always did end up bleeding! I agree 100% all of these claims from others about getting things to work early are indeed all alpha and beta stuff.

If you were to install video and add that to your setup, I understand you would have HA running on an NUC or the like, would you have most of it running on the same hardware or not (except for of course any DVR recording on a NAS…)?

1 Like

As for the video stuff, Coral/Frigate: Yes. The DVR recordings are going straight on a NAS here.

1 Like

Hi there.
Followed all the steps for the installation but I am getting following error when installing the ha supervised pkg, which is completely unclear to me.
Any ideas?

root@rpi4:/usr/local/src# apt install ./homeassistant-supervised.deb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'homeassistant-supervised' instead of './homeassistant-supervised.deb'
The following package was automatically installed and is no longer required:
  libnss-myhostname
Use 'apt autoremove' to remove it.
The following NEW packages will be installed:
  homeassistant-supervised
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/7428 B of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 /usr/local/src/homeassistant-supervised.deb homeassistant-supervised all 1.7.0 [7428 B]
Preconfiguring packages ...
Selecting previously unselected package homeassistant-supervised.
(Reading database ... 31013 files and directories currently installed.)
Preparing to unpack .../homeassistant-supervised.deb ...
[warn]
[warn] If you want more control over your own system, run
[warn] Home Assistant as a VM or run Home Assistant Core
[warn] via a Docker container.
[warn]
[warn] ModemManager service is enabled. This might cause issue when using serial devices.
Adding 'diversion of /etc/NetworkManager/NetworkManager.conf to /etc/NetworkManager/NetworkManager.conf.real by homeassistant-supervised'
Adding 'diversion of /etc/NetworkManager/system-connections/default to /etc/NetworkManager/system-connections/default.real by homeassistant-supervised'
Adding 'diversion of /etc/docker/daemon.json to /etc/docker/daemon.json.real by homeassistant-supervised'
Adding 'diversion of /etc/network/interfaces to /etc/network/interfaces.real by homeassistant-supervised'
Leaving 'diversion of /etc/systemd/resolved.conf to /etc/systemd/resolved.conf.real by homeassistant-supervised'
Unpacking homeassistant-supervised (1.7.0) ...
Setting up homeassistant-supervised (1.7.0) ...
[info] Reload systemd
[info] Restarting NetworkManager
[info] Enable systemd-resolved
dpkg: error processing package homeassistant-supervised (--configure):
 installed homeassistant-supervised package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 homeassistant-supervised
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@rpi4-20231108:/usr/local/src# apt get update
E: Invalid operation get

Run:

sudo systemctl disable ModemManager.service
sudo systemctl stop ModemManager.service

and retry.

Same issue. Will start over the installation again.

root@rpi4:/usr/local/src# dpkg -i homeassistant-supervised.deb
Selecting previously unselected package homeassistant-supervised.
(Reading database ... 31005 files and directories currently installed.)
Preparing to unpack homeassistant-supervised.deb ...
[warn]
[warn] If you want more control over your own system, run
[warn] Home Assistant as a VM or run Home Assistant Core
[warn] via a Docker container.
[warn]
Adding 'diversion of /etc/NetworkManager/NetworkManager.conf to /etc/NetworkManager/NetworkManager.conf.real by homeassistant-supervised'
dpkg-divert: warning: files list file for package 'homeassistant-supervised' missing; assuming package has no files currently installed
Adding 'diversion of /etc/NetworkManager/system-connections/default to /etc/NetworkManager/system-connections/default.real by homeassistant-supervised'
Adding 'diversion of /etc/docker/daemon.json to /etc/docker/daemon.json.real by homeassistant-supervised'
Adding 'diversion of /etc/network/interfaces to /etc/network/interfaces.real by homeassistant-supervised'
dpkg-divert: warning: files list file for package 'homeassistant-supervised' missing; assuming package has no files currently installed
Leaving 'diversion of /etc/systemd/resolved.conf to /etc/systemd/resolved.conf.real by homeassistant-supervised'
Unpacking homeassistant-supervised (1.7.0) ...
Setting up homeassistant-supervised (1.7.0) ...
[info] Reload systemd
[info] Restarting NetworkManager
[info] Enable systemd-resolved
dpkg: error processing package homeassistant-supervised (--install):
 installed homeassistant-supervised package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 homeassistant-supervised

You are installing this on “pure” Debian 12, not i.e. on Raspberry Pi OS? :thinking:

Yes Debian 12.

:point_up_2:t3: :warning: Make sure you stick 100% with the guide. Note Section 2 paragraph 1.5 and 1.6. After you have installed the OS continue installation using a PC/Mac and connect to the RPI through SSH. Use “sudo” for commands as the unprivileged user you have created at 1.5 (don’t continue as su (root) as you did before)!

Ok, will try that in the third clean installation.
Something to note here which is repeated in the second clean installation. After step 2.1 (installation of network manager systemd-resolved, the internet connection is being ruined. This might be irrelevant though with the issue of home assistant installation.

# This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8).
# Do not edit.
#
# This file might be symlinked as /etc/resolv.conf. If you're looking at
# /etc/resolv.conf and seeing this text, you have followed the symlink.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0 trust-ad
search .

It is being fixed, after I run apt-get install --reinstall resolvconf --fix-missing
and then adding google DNS on resolv.conf

 cat /etc/resolv.conf
# This is /run/systemd/resolve/resolv.conf managed by man:systemd-resolved(8).
# Do not edit.
#
# This file might be symlinked as /etc/resolv.conf. If you're looking at
# /etc/resolv.conf and seeing this text, you have followed the symlink.
#
# This is a dynamic resolv.conf file for connecting local clients directly to
# all known uplink DNS servers. This file lists all configured search domains.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

# No DNS servers known.
search .
nameserver 8.8.8.8

Note my writing about this issue HERE, the section below:
:warning: About systemd-resolved which is needed by HA Supervised:

Take a note HERE.

Thanks!
Seems ok now (did’t try with sudo “cmds” since it was succeeded this second time).

Just a note, I faced some requests for dependency installation.

root@rpi4:/usr/local/src# dpkg -i homeassistant-supervised.deb
Selecting previously unselected package homeassistant-supervised.
(Reading database ... 30090 files and directories currently installed.)
Preparing to unpack homeassistant-supervised.deb ...
[warn]
[warn] If you want more control over your own system, run
[warn] Home Assistant as a VM or run Home Assistant Core
[warn] via a Docker container.
[warn]
[warn] ModemManager service is enabled. This might cause issue when using serial devices.
[info] Fix kernel dmesg restriction
Adding 'diversion of /etc/NetworkManager/NetworkManager.conf to /etc/NetworkManager/NetworkManager.conf.real by homeassistant-supervised'
Adding 'diversion of /etc/NetworkManager/system-connections/default to /etc/NetworkManager/system-connections/default.real by homeassistant-supervised'
Adding 'diversion of /etc/docker/daemon.json to /etc/docker/daemon.json.real by homeassistant-supervised'
Adding 'diversion of /etc/network/interfaces to /etc/network/interfaces.real by homeassistant-supervised'
Adding 'diversion of /etc/systemd/resolved.conf to /etc/systemd/resolved.conf.real by homeassistant-supervised'
Unpacking homeassistant-supervised (1.7.0) ...
dpkg: dependency problems prevent configuration of homeassistant-supervised:
 homeassistant-supervised depends on nfs-common; however:
  Package nfs-common is not installed.
 homeassistant-supervised depends on cifs-utils; however:
  Package cifs-utils is not installed.

dpkg: error processing package homeassistant-supervised (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 homeassistant-supervised
root@rpi4:/usr/local/src# apt install nfs-common cifs-utils
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 cifs-utils : Depends: libtalloc2 (>= 2.0.4~git20101213) but it is not going to be installed
              Depends: libwbclient0 (>= 2:4.0.3+dfsg1) but it is not going to be installed
              Depends: python3 but it is not going to be installed
              Recommends: keyutils but it is not going to be installed
 nfs-common : Depends: libevent-core-2.1-7 (>= 2.1.8-stable) but it is not going to be installed
              Depends: libnfsidmap1 (= 1:2.6.2-4) but it is not going to be installed
              Depends: rpcbind but it is not going to be installed
              Depends: keyutils but it is not going to be installed
              Depends: python3 but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
root@rpi4:/usr/local/src# apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  cifs-utils keyutils libevent-core-2.1-7 libnfsidmap1 libpython3-stdlib libpython3.11-minimal libpython3.11-stdlib libtalloc2 libwbclient0 media-types nfs-common python3 python3-minimal python3.11 python3.11-minimal rpcbind
Suggested packages:
  smbclient winbind bash-completion open-iscsi watchdog python3-doc python3-tk python3-venv python3.11-venv python3.11-doc binutils binfmt-support
The following NEW packages will be installed:
  cifs-utils keyutils libevent-core-2.1-7 libnfsidmap1 libpython3-stdlib libpython3.11-minimal libpython3.11-stdlib libtalloc2 libwbclient0 media-types nfs-common python3 python3-minimal python3.11 python3.11-minimal rpcbind
0 upgraded, 16 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 5768 kB of archives.
After this operation, 26.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian bookworm/main arm64 libevent-core-2.1-7 arm64 2.1.12-stable-8 [124 kB]
Get:2 http://deb.debian.org/debian bookworm/main arm64 libnfsidmap1 arm64 1:2.6.2-4 [52.3 kB]
Get:3 http://deb.debian.org/debian bookworm/main arm64 rpcbind arm64 1.2.6-6+b1 [46.1 kB]
Get:4 http://deb.debian.org/debian bookworm/main arm64 keyutils arm64 1.6.3-2 [53.2 kB]
Get:5 http://deb.debian.org/debian bookworm/main arm64 libpython3.11-minimal arm64 3.11.2-6 [806 kB]
Get:6 http://deb.debian.org/debian bookworm/main arm64 python3.11-minimal arm64 3.11.2-6 [1858 kB]
Get:7 http://deb.debian.org/debian bookworm/main arm64 python3-minimal arm64 3.11.2-1+b1 [26.3 kB]
Get:8 http://deb.debian.org/debian bookworm/main arm64 media-types all 10.0.0 [26.1 kB]
Get:9 http://deb.debian.org/debian bookworm/main arm64 libpython3.11-stdlib arm64 3.11.2-6 [1747 kB]
Get:10 http://deb.debian.org/debian bookworm/main arm64 python3.11 arm64 3.11.2-6 [572 kB]
Get:11 http://deb.debian.org/debian bookworm/main arm64 libpython3-stdlib arm64 3.11.2-1+b1 [9296 B]
Get:12 http://deb.debian.org/debian bookworm/main arm64 python3 arm64 3.11.2-1+b1 [26.3 kB]
Get:13 http://deb.debian.org/debian bookworm/main arm64 nfs-common arm64 1:2.6.2-4 [251 kB]
Get:14 http://deb.debian.org/debian bookworm/main arm64 libtalloc2 arm64 2.4.0-f2 [24.3 kB]
Get:15 http://deb.debian.org/debian bookworm/main arm64 libwbclient0 arm64 2:4.17.12+dfsg-0+deb12u1 [52.8 kB]
Get:16 http://deb.debian.org/debian bookworm/main arm64 cifs-utils arm64 2:7.0-2 [91.9 kB]
Fetched 5768 kB in 1s (5101 kB/s)
Selecting previously unselected package libevent-core-2.1-7:arm64.
(Reading database ... 30108 files and directories currently installed.)
Preparing to unpack .../0-libevent-core-2.1-7_2.1.12-stable-8_arm64.deb ...
Unpacking libevent-core-2.1-7:arm64 (2.1.12-stable-8) ...
Selecting previously unselected package libnfsidmap1:arm64.
Preparing to unpack .../1-libnfsidmap1_1%3a2.6.2-4_arm64.deb ...
Unpacking libnfsidmap1:arm64 (1:2.6.2-4) ...
Selecting previously unselected package rpcbind.
Preparing to unpack .../2-rpcbind_1.2.6-6+b1_arm64.deb ...
Unpacking rpcbind (1.2.6-6+b1) ...
Selecting previously unselected package keyutils.
Preparing to unpack .../3-keyutils_1.6.3-2_arm64.deb ...
Unpacking keyutils (1.6.3-2) ...
Selecting previously unselected package libpython3.11-minimal:arm64.
Preparing to unpack .../4-libpython3.11-minimal_3.11.2-6_arm64.deb ...
Unpacking libpython3.11-minimal:arm64 (3.11.2-6) ...
Selecting previously unselected package python3.11-minimal.
Preparing to unpack .../5-python3.11-minimal_3.11.2-6_arm64.deb ...
Unpacking python3.11-minimal (3.11.2-6) ...
Setting up libpython3.11-minimal:arm64 (3.11.2-6) ...
Setting up python3.11-minimal (3.11.2-6) ...
Selecting previously unselected package python3-minimal.
(Reading database ... 30469 files and directories currently installed.)
Preparing to unpack .../python3-minimal_3.11.2-1+b1_arm64.deb ...
Unpacking python3-minimal (3.11.2-1+b1) ...
Selecting previously unselected package media-types.
Preparing to unpack .../media-types_10.0.0_all.deb ...
Unpacking media-types (10.0.0) ...
Selecting previously unselected package libpython3.11-stdlib:arm64.
Preparing to unpack .../libpython3.11-stdlib_3.11.2-6_arm64.deb ...
Unpacking libpython3.11-stdlib:arm64 (3.11.2-6) ...
Selecting previously unselected package python3.11.
Preparing to unpack .../python3.11_3.11.2-6_arm64.deb ...
Unpacking python3.11 (3.11.2-6) ...
Selecting previously unselected package libpython3-stdlib:arm64.
Preparing to unpack .../libpython3-stdlib_3.11.2-1+b1_arm64.deb ...
Unpacking libpython3-stdlib:arm64 (3.11.2-1+b1) ...
Setting up python3-minimal (3.11.2-1+b1) ...
Selecting previously unselected package python3.
(Reading database ... 30878 files and directories currently installed.)
Preparing to unpack .../python3_3.11.2-1+b1_arm64.deb ...
Unpacking python3 (3.11.2-1+b1) ...
Selecting previously unselected package nfs-common.
Preparing to unpack .../nfs-common_1%3a2.6.2-4_arm64.deb ...
Unpacking nfs-common (1:2.6.2-4) ...
Selecting previously unselected package libtalloc2:arm64.
Preparing to unpack .../libtalloc2_2.4.0-f2_arm64.deb ...
Unpacking libtalloc2:arm64 (2.4.0-f2) ...
Selecting previously unselected package libwbclient0:arm64.
Preparing to unpack .../libwbclient0_2%3a4.17.12+dfsg-0+deb12u1_arm64.deb ...
Unpacking libwbclient0:arm64 (2:4.17.12+dfsg-0+deb12u1) ...
Selecting previously unselected package cifs-utils.
Preparing to unpack .../cifs-utils_2%3a7.0-2_arm64.deb ...
Unpacking cifs-utils (2:7.0-2) ...
Setting up media-types (10.0.0) ...
Setting up libnfsidmap1:arm64 (1:2.6.2-4) ...
Setting up libpython3.11-stdlib:arm64 (3.11.2-6) ...
Setting up rpcbind (1.2.6-6+b1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/rpcbind.service → /lib/systemd/system/rpcbind.service.
Created symlink /etc/systemd/system/sockets.target.wants/rpcbind.socket → /lib/systemd/system/rpcbind.socket.
Setting up libwbclient0:arm64 (2:4.17.12+dfsg-0+deb12u1) ...
Setting up libtalloc2:arm64 (2.4.0-f2) ...
Setting up libevent-core-2.1-7:arm64 (2.1.12-stable-8) ...
Setting up keyutils (1.6.3-2) ...
Setting up libpython3-stdlib:arm64 (3.11.2-1+b1) ...
Setting up python3.11 (3.11.2-6) ...
Setting up python3 (3.11.2-1+b1) ...
running python rtupdate hooks for python3.11...
running python post-rtupdate hooks for python3.11...
Setting up nfs-common (1:2.6.2-4) ...

Creating config file /etc/idmapd.conf with new version

Creating config file /etc/nfs.conf with new version
Adding system user `statd' (UID 104) ...
Adding new user `statd' (UID 104) with group `nogroup' ...
Not creating home directory `/var/lib/nfs'.
Created symlink /etc/systemd/system/multi-user.target.wants/nfs-client.target → /lib/systemd/system/nfs-client.target.
Created symlink /etc/systemd/system/remote-fs.target.wants/nfs-client.target → /lib/systemd/system/nfs-client.target.
auth-rpcgss-module.service is a disabled or a static unit, not starting it.
nfs-idmapd.service is a disabled or a static unit, not starting it.
nfs-utils.service is a disabled or a static unit, not starting it.
proc-fs-nfsd.mount is a disabled or a static unit, not starting it.
rpc-gssd.service is a disabled or a static unit, not starting it.
rpc-statd-notify.service is a disabled or a static unit, not starting it.
rpc-statd.service is a disabled or a static unit, not starting it.
rpc-svcgssd.service is a disabled or a static unit, not starting it.
rpc_pipefs.target is a disabled or a static unit, not starting it.
var-lib-nfs-rpc_pipefs.mount is a disabled or a static unit, not starting it.
Setting up cifs-utils (2:7.0-2) ...
update-alternatives: using /usr/lib/aarch64-linux-gnu/cifs-utils/idmapwb.so to provide /etc/cifs-utils/idmap-plugin (idmap-plugin) in auto mode
Setting up homeassistant-supervised (1.7.0) ...
[info] Reload systemd
[info] Restarting NetworkManager
[info] Enable systemd-resolved
[info] Restarting systemd-resolved
[info] Set up systemd-journal-gatewayd socket file
[info] Enable systemd-journal-gatewayd
[info] Start nfs-utils.service
[info] Restarting docker service
PING checkonline.home-assistant.io(XX:XX:XX::XXXX:5ee (XX:XX:XX::XXXX:5ee)) 56 data bytes
64 bytes from XX:XX:XX::XXXX:5ee (XX:XX:XX::XXXX:5ee): icmp_seq=1 ttl=58 time=9.36 ms

--- checkonline.home-assistant.io ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 9.361/9.361/9.361/0.000 ms
[info] Install supervisor startup scripts
[info] Install AppArmor scripts
[info] Start Home Assistant Supervised
[info] Installing the 'ha' cli
[info] Switching to cgroup v1
[info] Within a few minutes you will be able to reach Home Assistant at:
[info] http://homeassistant.local:8123 or using the IP address of your
[info] machine: http://.88:8123
[warn] A reboot is required to apply changes to grub.
Processing triggers for systemd (252.22-1~deb12u1) ...
Processing triggers for libc-bin (2.36-9+deb12u4) ...
root@rpi4:/usr/local/src#

Nice that you got it sorted out. Although having ignored the advise to create a standart non-privileged user and continue installation as that very user.

I asume you didn’t even bother to create a “normal” user for your system but all is running exclusively as “root”.

The one-timers:

adduser YOUR_USERNAME
usermod -aG sudo YOUR_USERNAME

is not that hard to accomplish :wink:

To understand the very basics of the Linux permission scheme you might want to have this 5 minutes reading at least:

Linux Permissions: Dos and Dont’s

There is a reason why it is not advised to work as the root user whenever it is not absolutely necessary. Thus if you run into unexpected issues please refrain from posting into this thread.

Obviously you know better and didn’t follow the guide by the book.

Section 2, paragraph 2.1 clearly states the command:

sudo -i
...
apt --fix-broken install

which would have saved you from the:

1 Like

Not at all!
I followed every step as it is described in the guide. Normal user created, “–fix-broken install” was followed etc.
I didn’t follow your advise to proceed with sudo “cmds” because I had already started to follow the initial steps (with sudo -i). If this try was about to fail also, I would follow your advise by starting over all the steps again.

If you wish I can make a clean install again and share with you the results. Not an issue.

Really?

:rofl:

You refer to my first installation.
Not the one I followed today.
And as I said. I had already started with sudo -i, before you suggest to go with sudo “cmds”.

For your record

I’m confused, I haven’t been able to get my home assistant up and running for a while now. I looked it up and saw that the error:
exec /init: exec format error, is due to incompatibility of the docker version.
I changed the version, nothing happened, I installed the latest one that I read solves the problems but still the same, why is there so much instability?
Ever since I switched to raspberry pi 4, I’ve been frustrated, the pi3 with raspbian was much more stable.
I’m seriously considering whether I will go to raspberry pi 5 in the future, really.

I’ve noticed a cople of things… why are you running 2023.10.3?

I am definately a noob with docker but this is what I get. I would suggest you install everything new from scratch and then only restore from a HA backup - ?

Im tried few times to re install the home assistant version and seems to be succesfully installed with that command that should be the latest version:

wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb

but for some reason on docker is the same version…

Make sure you have deleted older versions of `homeassistant-supervised.deb which might be still existent in the download directory before using a newer version of the script .

If you have followed the above Upgrade Guide to Debian 12 note the paragraph saying:

cd /usr/local/src
sudo rm -f homeassistant-supervised.deb
sudo wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
sudo dpkg -i homeassistant-supervised.deb
2 Likes