Installing Home Assistant Supervised on a Raspberry Pi using Debian 12

Supposedly apparmor was enabled in the kernel, but still got problems, so I installed, just to be sure. Problems gone :slight_smile:

Lucky for you, thereā€™s a search optionā€¦https://github.com/home-assistant/core/issues/49009#issuecomment-860020095

1 Like

Can anyone share how to disable starting up of home assistant installed using this method?

I understand the install does not work. Here is my 3rd log from a Pi 3, maybe it will help.
Looking forward to a fix, thanks!


[email protected]'s password:
Linux rpi3-20220807 5.18.0-3-arm64 #1 SMP Debian 5.18.14-1 (2022-07-23) aarch64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
rrrr@rpi3-20220807:~$ sudo -i
[sudo] password for rrrr:
root@rpi3-20220807:~# apt update && sudo apt upgrade -y && sudo apt autoremove -                                                                y
Hit:1 http://security.debian.org/debian-security bookworm-security InRelease
Hit:2 http://deb.debian.org/debian bookworm InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@rpi3-20220807:~# apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@rpi3-20220807:~# apt-get install jq wget curl udisks2 libglib2.0-bin network-manager dbus apparmor-utils -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
dbus is already the newest version (1.14.0-2).
dbus set to manually installed.
The following additional packages will be installed:
  dirmngr dns-root-data dnsmasq-base eject exfatprogs fuse gdisk gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server
  gpgconf gpgsm groff-base libassuan0 libatasmart4 libblockdev-crypto2 libblockdev-fs2 libblockdev-loop2 libblockdev-part-err2
  libblockdev-part2 libblockdev-swap2 libblockdev-utils2 libblockdev2 libbluetooth3 libbrotli1 libcurl3-gnutls libcurl4 libfuse2 libglib2.0-0
  libglib2.0-data libgpgme11 libgudev-1.0-0 libicu71 libjim0.81 libjq1 libksba8 libldap-2.5-0 libldap-common libmbim-glib4 libmbim-proxy
  libmm-glib0 libmpdec3 libndp0 libnetfilter-conntrack3 libnfnetlink0 libnghttp2-14 libnm0 libnpth0 libnspr4 libnss3 libntfs-3g89 libonig5
  libparted-fs-resize0 libpcap0.8 libpolkit-agent-1-0 libpolkit-gobject-1-0 libpsl5 libpython3-stdlib libpython3.10-minimal
  libpython3.10-stdlib libqmi-glib5 libqmi-proxy libqrtr-glib0 librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db libsqlite3-0 libssh2-1
  libteamdctl0 libuchardet0 libudisks2-0 libusb-1.0-0 libvolume-key1 libxml2 media-types modemmanager ntfs-3g pinentry-curses pkexec
  policykit-1 polkitd ppp publicsuffix python3 python3-apparmor python3-libapparmor python3-minimal python3.10 python3.10-minimal
  shared-mime-info usb-modeswitch usb-modeswitch-data xdg-user-dirs
Suggested packages:
  vim-addon-manager pinentry-gnome3 tor parcimonie xloadimage scdaemon groff libparted-dev libsasl2-modules-gssapi-mit
  | libsasl2-modules-gssapi-heimdal libsasl2-modules-ldap libsasl2-modules-otp libsasl2-modules-sql libteam-utils iptables pinentry-doc
  python3-doc python3-tk python3-venv python3.10-venv python3.10-doc binutils binfmt-support btrfs-progs f2fs-tools libblockdev-mdraid2 mdadm
  nilfs-tools reiserfsprogs udftools udisks2-bcache udisks2-btrfs udisks2-lvm2 udisks2-zram xfsprogs comgt wvdial
The following NEW packages will be installed:
  apparmor-utils curl dirmngr dns-root-data dnsmasq-base eject exfatprogs fuse gdisk gnupg gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client
  gpg-wks-server gpgconf gpgsm groff-base jq libassuan0 libatasmart4 libblockdev-crypto2 libblockdev-fs2 libblockdev-loop2
  libblockdev-part-err2 libblockdev-part2 libblockdev-swap2 libblockdev-utils2 libblockdev2 libbluetooth3 libbrotli1 libcurl3-gnutls libcurl4
  libfuse2 libglib2.0-0 libglib2.0-bin libglib2.0-data libgpgme11 libgudev-1.0-0 libicu71 libjim0.81 libjq1 libksba8 libldap-2.5-0
  libldap-common libmbim-glib4 libmbim-proxy libmm-glib0 libmpdec3 libndp0 libnetfilter-conntrack3 libnfnetlink0 libnghttp2-14 libnm0 libnpth0
  libnspr4 libnss3 libntfs-3g89 libonig5 libparted-fs-resize0 libpcap0.8 libpolkit-agent-1-0 libpolkit-gobject-1-0 libpsl5 libpython3-stdlib
  libpython3.10-minimal libpython3.10-stdlib libqmi-glib5 libqmi-proxy libqrtr-glib0 librtmp1 libsasl2-2 libsasl2-modules libsasl2-modules-db
  libsqlite3-0 libssh2-1 libteamdctl0 libuchardet0 libudisks2-0 libusb-1.0-0 libvolume-key1 libxml2 media-types modemmanager network-manager
  ntfs-3g pinentry-curses pkexec policykit-1 polkitd ppp publicsuffix python3 python3-apparmor python3-libapparmor python3-minimal python3.10
  python3.10-minimal shared-mime-info udisks2 usb-modeswitch usb-modeswitch-data wget xdg-user-dirs
0 upgraded, 105 newly installed, 0 to remove and 0 not upgraded.
Need to get 44.7 MB of archives.
After this operation, 161 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main arm64 libfuse2 arm64 2.9.9-5 [125 kB]
Get:2 http://deb.debian.org/debian bookworm/main arm64 fuse arm64 2.9.9-5 [71.3 kB]
....

DELETED
....
Created symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service ā†’ /lib/systemd/system/NetworkManager.service.
Setting up python3-apparmor (3.0.6-1) ...
Setting up modemmanager (1.18.10-1) ...
Created symlink /etc/systemd/system/dbus-org.freedesktop.ModemManager1.service ā†’ /lib/systemd/system/ModemManager.service.
Created symlink /etc/systemd/system/multi-user.target.wants/ModemManager.service ā†’ /lib/systemd/system/ModemManager.service.
Setting up apparmor-utils (3.0.6-1) ...
Processing triggers for libc-bin (2.33-8) ...
Processing triggers for dbus (1.14.0-2) ...
Processing triggers for initramfs-tools (0.142) ...
update-initramfs: Generating /boot/initrd.img-5.18.0-3-arm64
root@rpi3-20220807:~#
root@rpi3-20220807:~# curl -fsSL get.docker.com | sh
# Executing docker install script, commit: b2e29ef7a9a89840d2333637f7d1900a83e7153f
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c mkdir -p /etc/apt/keyrings && chmod -R 0755 /etc/apt/keyrings
+ sh -c curl -fsSL "https://download.docker.com/linux/debian/gpg" | gpg --dearmor --yes -o /etc/apt/keyrings/docker.gpg
+ sh -c chmod a+r /etc/apt/keyrings/docker.gpg
+ sh -c echo "deb [arch=arm64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
E: The repository 'https://download.docker.com/linux/debian bookworm Release' does not have a Release file.
root@rpi3-20220807:~# wget https://github.com/home-assistant/os-agent/releases/download/1.3.0/os-agent_1.3.0_linux_aarch64.deb
--2022-08-14 15:22:05--  https://github.com/home-assistant/os-agent/releases/download/1.3.0/os-agent_1.3.0_linux_aarch64.deb
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/346652840/086e57ef-f86d-4433-aa59-9552bb72e403?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220814%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220814T152206Z&X-Amz-Expires=300&X-Amz-Signature=f68b7c490c907f5b390b9aec4ed4be77e5cc0c4e8d57107426b0465fe6c7615f&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=346652840&response-content-disposition=attachment%3B%20filename%3Dos-agent_1.3.0_linux_aarch64.deb&response-content-type=application%2Foctet-stream [following]
--2022-08-14 15:22:06--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/346652840/086e57ef-f86d-4433-aa59-9552bb72e403?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220814%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220814T152206Z&X-Amz-Expires=300&X-Amz-Signature=f68b7c490c907f5b390b9aec4ed4be77e5cc0c4e8d57107426b0465fe6c7615f&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=346652840&response-content-disposition=attachment%3B%20filename%3Dos-agent_1.3.0_linux_aarch64.deb&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2458516 (2.3M) [application/octet-stream]
Saving to: 'os-agent_1.3.0_linux_aarch64.deb'

os-agent_1.3.0_linux_aarch64.deb    100%[===================================================================>]   2.34M  4.54MB/s    in 0.5s

2022-08-14 15:22:07 (4.54 MB/s) - 'os-agent_1.3.0_linux_aarch64.deb' saved [2458516/2458516]

root@rpi3-20220807:~# dpkg -i os-agent_1.3.0_linux_aarch64.deb
Selecting previously unselected package os-agent.
(Reading database ... 22063 files and directories currently installed.)
Preparing to unpack os-agent_1.3.0_linux_aarch64.deb ...
Unpacking os-agent (1.3.0) ...
Setting up os-agent (1.3.0) ...
Created symlink /etc/systemd/system/multi-user.target.wants/haos-agent.service ā†’ /lib/systemd/system/haos-agent.service.
Processing triggers for dbus (1.14.0-2) ...
root@rpi3-20220807:~# sudo -i
root@rpi3-20220807:~# wget https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
--2022-08-14 15:23:02--  https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github.com/home-assistant/supervised-installer/releases/download/1.2.2/homeassistant-supervised.deb [following]
--2022-08-14 15:23:02--  https://github.com/home-assistant/supervised-installer/releases/download/1.2.2/homeassistant-supervised.deb
Reusing existing connection to github.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/183216119/c7493e64-4412-4cf5-84c1-2aba27ccc79d?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220814%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220814T152302Z&X-Amz-Expires=300&X-Amz-Signature=66da70e5ce5a131023d3a2af0b5070cf7ecefaccd936f56a340e581a7451a0ec&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=183216119&response-content-disposition=attachment%3B%20filename%3Dhomeassistant-supervised.deb&response-content-type=application%2Foctet-stream [following]
--2022-08-14 15:23:03--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/183216119/c7493e64-4412-4cf5-84c1-2aba27ccc79d?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220814%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220814T152302Z&X-Amz-Expires=300&X-Amz-Signature=66da70e5ce5a131023d3a2af0b5070cf7ecefaccd936f56a340e581a7451a0ec&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=183216119&response-content-disposition=attachment%3B%20filename%3Dhomeassistant-supervised.deb&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.111.133, 185.199.110.133, 185.199.109.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5908 (5.8K) [application/octet-stream]
Saving to: 'homeassistant-supervised.deb'

homeassistant-supervised.deb        100%[===================================================================>]   5.77K  --.-KB/s    in 0.001s

2022-08-14 15:23:03 (4.17 MB/s) - 'homeassistant-supervised.deb' saved [5908/5908]

root@rpi3-20220807:~# dpkg -i homeassistant-supervised.deb
Selecting previously unselected package homeassistant-supervised.
(Reading database ... 22067 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'
Unpacking homeassistant-supervised (1.2.2) ...
dpkg: dependency problems prevent configuration of homeassistant-supervised:
 homeassistant-supervised depends on docker-ce; however:
  Package docker-ce is not installed.

dpkg: error processing package homeassistant-supervised (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 homeassistant-supervised
root@rpi3-20220807:~#



Youā€™ve used the Bookworm (Debian 12) image, which is not yet supported. You need to use the Debian 11 Bullseye image, as per Section 1.

You want this one. 2022.01.21 11 (Bullseye) 3 3B+

2 Likes

There is no fix for the issue you are facing with the RPI3 since nothing is broken here.

Maybe you really should follow the OPā€™s advice within the very first paragraph and

However, coming back to the issue you are facing. Please pay close attention to the topic of this thread. Especially when it comes to which Debian version is to be installed. I count the latter pointed out five times even before starting with ā€œSection 1ā€.

Does the above fit-in with the Debian version to be installed according to this thread? :thinking:

1 Like

i followed this guide exactly, just that my raspi 3B is booting with PXE from NFS. Sadly the system losses the network connection as soon as the supervisor container is started. I supecting that the network is being reset by the supervisor and thus iā€™m loosing the terminal and hassio is loosing its root fsā€¦ :confused: is that a known issue? I canā€™T really imagine iā€™m the first one trying to run supervised hassio from a network booted piā€¦?

You havenā€™t though.

This is outside the scope of the guide.

Dudeā€¦ why be such a pain? Did i offend you? In case I did Iā€™m sorry about that.

ā€œ, just thatā€ sounds like iā€™m introducing a reservations about my previous statement, doesnā€™t it?
Iā€™m aware of deviating from your guide. And Iā€™m not complaining at you or at your guide. Its fantastic and iā€™m grateful you wrote it. Obviously its my personal problem if i want to do it differently and clearly i have no claim for help.

But if anyone has an idea why it doesnā€™t work, what the supervisor does when it starts that might cause the issue, or what I could try to make it work anyway ā€“ and wants to share it ā€“ that would be very nice. Is there something wrong with asking that here?

Looking for some advice from the debian experts here. Normally I can solve these issues myself w/ google. However Iā€™m running into an issue.

Today, I noticed Iā€™m getting connectivity_check unsupported in the system health. So, I enabled it however, it doesnā€™t appear to enable. I run

sudo busctl set-property org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager ConnectivityCheckEnabled b true

The logs NetworkManager logs show

Sep 11 13:33:18 NUC NetworkManager[482]: <info>  [1662917598.8344] audit: op="networking-control" arg="connectivity-check-enabled" pid=7460 uid=0 result="success"

however when I simply check the parameter (sudo or not)ā€¦

busctl get-property org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager ConnectivityCheckEnabled

it returns

b false

Iā€™ve tried setting it with 1, true, and various other CLI routes to set this. What am I missing? How can I set this and move on?

I donā€™t use the RPI with HA anymore so this is a shot in the dark ā€¦

However, if I correctly recall the latter there has been a change back in March regarding that pesty unhealthy/unsupported status with the HA update in March. It is linked to an installed/active avahi-daemon which is not/should not be used anymore after changes to HA since 2022.3.x and which leads to that unhealthy/unsupported HA installation. systemd-resolved is to be used instead and avahi-daemon has to be disabled.

Have you checked whether avahi-daemon is running on you RPI?

sudo systemctl status avahi-daemon

If avahi-daemon is indeed running/loaded do:

sudo systemctl disable avahi-daemon.service
sudo systemctl stop avahi-daemon.service

Recheck to make sure the avahi-daemon has stopped:

sudo systemctl status avahi-daemon.service

If the service has been successfully stopped then do:

sudo systemctl start systemd-resolved

and make sure it has started correctly:

sudo systemctl status systemd-resolved

If it has do:

sudo systemctl enable systemd-resolved

and reboot the host system thereafter.

I hope this helps.

1 Like

Iā€™m not offended, I merely pointing out that what you are trying to achieve is outside of the scope of this guide and therefore getting support in this thread is unlikely.

Your use case is an extremely uncommon way to be running.

Iā€™m not running a pi, running on a NUC. This ended up working. I did have the avahi-daemon service running and disabling did the trick. Howā€™d you know that was running?

I was just guessing :crazy_face: Back in March I received a pm asking for help with a similar problem and we got it sorted out with my above instructions :slightly_smiling_face:

I spoke too soon. After a bit, went back to unsupported. I just checked the connectivitycheckenabled and itā€™s still false. Oddness all around. Iā€™m thinking itā€™s time to move to docker. Been putting that off forā€¦ years now.

Did you run

ha jobs reset healthy

at any time before?

This has to be undone.

To solve this check for the file ā€œjobs.jsonā€

sudo locate jobs.json

The output should be: /usr/share/hassio/jobs.json

sudo cat /usr/share/hassio/jobs.json

If it shows:

{
ā€œignore_conditionsā€: [
ā€œhealthyā€
]
}

do:

sudo cp -Rp  /usr/share/hassio/jobs.json  /usr/share/hassio/jobs.json.orig
sudo rm -f /usr/share/hassio/jobs.json

Now restart host:

sudo systemctl reboot

Empty browser cache: ctrl+F5

Nope, never ran that before. That file doesnā€™t exist either.

Itā€™s definitely still being reported by the supervisor. Warning still exists in the logs. Any other services that could possibly cause conflicts?

Strange indeed. The above is the only solution I can offer :woozy_face: and it has worked for some users including me.

Maybe it is time to either do a fresh install or move to docker.

BTW.: Using HA Supervised on a mini pc. Where has the page to check on system health etc. moved to? I am unable to find it :astonished:

itā€™s temp (?) buried on the system ā†’ repairs ā†’ 3 dots ā†’ system health

Yeah, Iā€™m torn about both. I ran unsupported for 8 months because I knew attempting to fix it would lead to more problems. I updated from buster to bullseye, I wager something went wrong in that process. Iā€™m also not sure if I originally installed it correctly, it was ~2017/2018 when I did it/. I installed prior to the current installation method for supervisor, and I knew a lot less back then.

FWIW, when I run the command used to perform the check, it comes back full.

:man_shrugging:

1 Like