Installing Home Assistant Supervised on a Raspberry Pi with Debian 11

I just dusted off my Pi3 and used the guide to test - HA up and running in 25 mins. No issues.

I’m not sure what you are doing wrong through the install process, I would suggest you start over with a freshly formatted drive, and follow the guide step by step, exactly.

I would also suggest that if you having this many issues, you may be better off just using the HA OS image instead of a Supervised install.

1 Like

For those who want to upgrade from Debian 10 (Buster) to Debian 11 (Bullseye) without starting from scratch, here comes how it can be done easily (tested on RPI4 4GB devices):

In a console as the unprivileged user (not root) :

sudo sed -i 's/buster/bullseye/' /etc/apt/sources.list
sudo sed -i 's/buster/bullseye/' /etc/apt/sources.list.d/*.list
sudo sed -i 's|bullseye/updates|bullseye-security|' /etc/apt/sources.list

Only if you previously have installed Debian’s MQTT broker (mosquitto) on the OS level (not as a HA Add-on):

sudo sed -i 's/bullseye/buster/' /etc/apt/sources.list.d/*mosquitto*.list

Continue with the OS upgrade:

sudo apt update

Only if you see the following error message after “sudo apt update”:

The value 'buster' is invalid for APT::Default-Release as such a release is not available in the sources

Run:

sudo sed -i 's/buster/bullseye/' /etc/apt/apt.conf
sudo apt update

Important note for those who have set:
sudo apt-mark hold linux-image-arm64
due to the boot problems with the newer official kernel versions on Debian 10 on RPI4, run:

sudo apt-mark unhold linux-image-arm64

Now continue with:

sudo apt upgrade
sudo apt full-upgrade
sudo apt autopurge

The above will take some time. After it has finished it’s time to reboot the host:

sudo systemctl reboot

After the system has rebooted, open a new console and execute (again, as non-root):

sudo apt --fix-broken install
sudo apt-get install udisks2 wget
cd /usr/local/src

Now visit the OS Agent page and then replace the version number with the latest available, into the commands below. (i.e. replace all references to 1.2.0 with the latest available release):

sudo wget https://github.com/home-assistant/os-agent/releases/download/1.2.0/os-agent_1.2.0_linux_aarch64.deb
sudo dpkg -i os-agent_1.2.0_linux_aarch64.deb

sudo systemctl reboot

All done. Your HA on the RPI4 should now run on Debian 11 (Bullseye).

Addendum:
The above guide is also valid for HA Supervised on the Intel architecture (i.e. on a Intel NUC). The only step different is the OS Agent part.

Instead of:

sudo wget https://github.com/home-assistant/os-agent/releases/download/1.2.0/os-agent_1.2.0_linux_aarch64.deb
sudo dpkg -i os-agent_1.2.0_linux_aarch64.deb

do:

sudo wget https://github.com/home-assistant/os-agent/releases/download/1.2.0/os-agent_1.2.0_linux_x86_64.deb
sudo dpkg -i os-agent_1.2.0_linux_x86_64.deb
14 Likes

They’re in /boot/firmware.

Hello. Shouldn’t you use os-agent_1.2.1_linux_armv7.deb package instead of os-agent_1.2.0_linux_aarch64.deb?

When I run uname -m command on my RPI4B, it shows me armv7l so I suppose that os-agent armv7 is the correct file. Am I wrong?

1 Like

1.2.1 only released a few hours ago. Always check and install the latest.

It looks like you are running the RPI4 in 32-bit ARMv7 mode. If uname -m says aarch64 then it is 64 bit. If it says armv7l then it is 32 bit.

So as for your case this is correct: Use the arm7 package instead of the aarch64 package.

1 Like

And how many time Pi3 worked? As I already wrote I was able to run ha before @Tamsy help, but os freezes after 1-7days. I’m using ha since 3 years - started with core, next docker, and from 1-1,5 year as supervised, so I’m not interested in HA OS. I decided to not waste more time on debian and this instruction. I installed again raspbian and used official script

https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh

and from 4 days it’s working. I hope it will stay that way and recommend it everybody with similar problems with freezes on raspberry 3. I know that it makes my installation unsupported, but better running unsupported that not running supported.

Still running, no problems.

The script in this guide is identical, so that has made no difference. I merely forked the script way back when Supervised was announced to be deprecated.

Unless you have some specific need to run Supervised, you would be better off running HA OS on a Pi3 and having a supported installation.

1 Like

After I updated to the 1.2.1 agent my logs load very slowing under supervisor /system/ logs. Sometimes not at all. Tamsy told me in a private message he see this also. Are you?

I actually noticed this behaviour since OS Agent v.1.1.1 already. Loading the Log at Supervisor → System takes up to 45 sec. Nothing in the logs (daemon.log). It seemingly also does not affect any functionality.

[email protected]:~$ sudo lsusb
Bus 001 Device 004: ID 0658:0200 Sigma Designs, Inc. Aeotec Z-Stick Gen5 (ZW090) - UZB
Bus 001 Device 005: ID 0451:16a8 Texas Instruments, Inc. CC2531 ZigBee
Bus 001 Device 006: ID 0424:7800 Microchip Technology, Inc. (formerly SMSC) 
Bus 001 Device 003: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Is there any special reason why you have connected the Aeotec Z-Stick Gen5 and the TI CC2531 ZigBee-Stick to a USB2-hub which is connected to one of the USB ports of the RPI3?

Sudden freezes after some time with HA Supervised on Debian are discussed multiple times on this very thread and the culprit is often discovered as a power issue.

Are you aware that the Aeotec Z-Stick Gen5 pulls up to 5V from the USB port?

Is your USB2-hub externally powered? I would try to connect the two sticks through 2 extension cables to individual USB-ports on your RPI3 and monitor whether it still freezes after some time when run with Debian 11.

Please also note that not every externally powered USB-hub seems to be compatible with the RPI. Proper research should be done before. You might find some information about compatible USB-hubs, besides also from other sources, here.

No I am not seeing any slowdown or failure to load.

You did a fresh install with Debian 11 but not an upgrade from Buster to Bullseye, did you? :thinking:

@tamsy @DavidFW1960 I believe that David is not on a Pi4 either?

No I have upgraded from stretch>Buster>bullseye. I have played with Proxmox VM’s with fresh bullseye but my main HA was upgraded from Buster.

Correct but you specifically asked if I was seeing a slowdown. My machine is an Intel NUC for my main HA.

1 Like

You are correct. I was just pointing out to @Tamsy that your setup is different than ours. Both of us are using a pi4.

@Tamsy
There is an existing GitHub issue on the logs slow to load. Looks like it has effected others longer.

Thank you for the information. Studying it now…

Thanks, I wrote ‘dtparam=sd_poll_once’ in /boot/firmware/config.txt, but nothing changes, I get the error messages every 10-12 second.

Hi All,

I have some trouble during the fresh Debian 11 on my Raspberry pi 4 4gb.

I success to copy an image on my SD Card (I didn’t test yet with an SSD). But when I start my Rpi4, I have a lot of lines which scroll but the screen goes black and nothing…

I have tested with 3 different SD Card and I can easily install the Raspberry Pi OS. I also tried :

  • to download again the file xz image : same problem
  • to restore the EEPROM backup and restart the Rpi4: same problem.

I think that I have a problem with a 32/64 bits version…

Thanks for your help.

Smilorel