Installing Home Assistant Supervised on a Raspberry Pi using Debian 12

I found the problem. In /etc/dhcpcd.conf there was and entry “inform 192.168.0.8”. I took it out and added “static ip_address=192.168.0.8/24”. As soon as I rebooted following this change, no more problems. It’s strange though that this became a problem as soon as I added anything to docker. My guess is that the queries were overwhelming the system

Thanks for the help… Much appreciated

How did dhcpcd.conf end up on your RPI in the first place? It is part of the dhcpcd5 package and does not get installed by default and is not needed: DHCP = ( Dynamic Host Configuration Protocol ) Server to assign IP addresses to client hosts in local network.

Your Home Assistant Supervised on a Raspberry Pi with Debian 11 is a client host and typically not a DHCP server. As per default the RPI gets its public facing IP address either through your router or you can assign it statically on the RPI itself.

dhcpcd.conf is installed by default on 2022-01-28-raspios-bullseye-arm64. When you change the IP settings in the Wireless & Wired Network settings GUI, dhcpcd.conf gets populated with the following below

interface eth0
inform 192.168.0.8
static routers=192.168.0.1
static domain_name_servers=8.8.8.8 8.8.4.4
static domain_search=dns.google

As soon as I add Docker and a Docker container, everything slows down to the point it takes for ever to do anything on the PI. When I add “static ip_address=192.168.0.8” to dhcpcd.conf, everything responds fast.

That can be.

This community guide is for installing HA Supervised on a RPI with Debian 11, 20220121_raspi_x_bullseye (bare metal) though and not for installing HA Supervised on Raspberry Pi OS (which is based on Debian). You are posting into the wrong thread.

1 Like

I have a problem to get Raspbee 2 running.
I think its not recognized. I disabled bt in config.txt
Anyone using a Raspbee with a Pi 4b and Debian 11?

Welcome to the forum, @Er1c.

Unfortunately you also posted into the wrong thread. The OP has nothing to do with installing and configuring Raspbee 2 on a RPI but it is about installing Debian 11 and HA Supervised on RPI’s.
Straight and plain.

A little search through the forum about your Rasbee 2-problem would have brought you i.e. here and here.

2 Likes

I’m currently running a supervised install still on Debian 10 with Raspberry Pi 4 booting from an attached SSD with USB3 adapter (no MicroSD).

There is a safe way to upgrade to Debian 11 without reinstalling and restoring a snapshot?

Some months ago me and other faced an issue with some 5.9 vs 5.10 files in RASPIFIRM partition that made system unbootable, and we had to reconfig booting to use old 5.9 version. This is stille the case for me.

There is, if you are running Home Assistant Supervised on a Raspberry Pi with Debian 10 (but not for RaspberryOS !).

Look upwards at post 387.

1 Like

Thanks for reply. I made the steps in that post and Pi booted.

However all docker containers failed to start: hassio_supervisor was trying to start every few second without success.

This was the output of docker events

2022-03-11T15:40:23.179487749+01:00 container create a3a47903e3879dc4cd2e0433ab254136bf9e312b0e7cc223a9f983655f68b827 (image=homeassistant/aarch64-hassio-supervisor, io.hass.arch=aarch64, io.hass.base.arch=aarch64, io.hass.base.image=homeassistant/aarch64-base:3.14, io.hass.base.name=python, io.hass.base.version=2022.02.0, io.hass.type=supervisor, io.hass.version=2022.03.3, name=hassio_supervisor, org.opencontainers.image.authors=The Home Assistant Authors, org.opencontainers.image.created=2022-03-10 12:24:42+00:00, org.opencontainers.image.description=Container-based system for managing Home Assistant Core installation, org.opencontainers.image.documentation=https://www.home-assistant.io/docs/, org.opencontainers.image.licenses=Apache License 2.0, org.opencontainers.image.source=https://github.com/home-assistant/supervisor, org.opencontainers.image.title=Home Assistant Supervisor, org.opencontainers.image.url=https://www.home-assistant.io/, org.opencontainers.image.version=2022.03.3)
2022-03-11T15:40:23.182858877+01:00 container attach a3a47903e3879dc4cd2e0433ab254136bf9e312b0e7cc223a9f983655f68b827 (image=homeassistant/aarch64-hassio-supervisor, io.hass.arch=aarch64, io.hass.base.arch=aarch64, io.hass.base.image=homeassistant/aarch64-base:3.14, io.hass.base.name=python, io.hass.base.version=2022.02.0, io.hass.type=supervisor, io.hass.version=2022.03.3, name=hassio_supervisor, org.opencontainers.image.authors=The Home Assistant Authors, org.opencontainers.image.created=2022-03-10 12:24:42+00:00, org.opencontainers.image.description=Container-based system for managing Home Assistant Core installation, org.opencontainers.image.documentation=https://www.home-assistant.io/docs/, org.opencontainers.image.licenses=Apache License 2.0, org.opencontainers.image.source=https://github.com/home-assistant/supervisor, org.opencontainers.image.title=Home Assistant Supervisor, org.opencontainers.image.url=https://www.home-assistant.io/, org.opencontainers.image.version=2022.03.3)
2022-03-11T15:40:23.226870461+01:00 network connect caf4ec5ffcf6e30ae7ce4433a4e1000935c8f2173388a05693f1a58083d81e2c (container=a3a47903e3879dc4cd2e0433ab254136bf9e312b0e7cc223a9f983655f68b827, name=bridge, type=bridge)
2022-03-11T15:40:23.861375470+01:00 network disconnect caf4ec5ffcf6e30ae7ce4433a4e1000935c8f2173388a05693f1a58083d81e2c (container=a3a47903e3879dc4cd2e0433ab254136bf9e312b0e7cc223a9f983655f68b827, name=bridge, type=bridge)
2022-03-11T15:40:29.820824826+01:00 container attach a3a47903e3879dc4cd2e0433ab254136bf9e312b0e7cc223a9f983655f68b827 (image=homeassistant/aarch64-hassio-supervisor, io.hass.arch=aarch64, io.hass.base.arch=aarch64, io.hass.base.image=homeassistant/aarch64-base:3.14, io.hass.base.name=python, io.hass.base.version=2022.02.0, io.hass.type=supervisor, io.hass.version=2022.03.3, name=hassio_supervisor, org.opencontainers.image.authors=The Home Assistant Authors, org.opencontainers.image.created=2022-03-10 12:24:42+00:00, org.opencontainers.image.description=Container-based system for managing Home Assistant Core installation, org.opencontainers.image.documentation=https://www.home-assistant.io/docs/, org.opencontainers.image.licenses=Apache License 2.0, org.opencontainers.image.source=https://github.com/home-assistant/supervisor, org.opencontainers.image.title=Home Assistant Supervisor, org.opencontainers.image.url=https://www.home-assistant.io/, org.opencontainers.image.version=2022.03.3)
2022-03-11T15:40:29.876597305+01:00 network connect caf4ec5ffcf6e30ae7ce4433a4e1000935c8f2173388a05693f1a58083d81e2c (container=a3a47903e3879dc4cd2e0433ab254136bf9e312b0e7cc223a9f983655f68b827, name=bridge, type=bridge)
2022-03-11T15:40:30.065898273+01:00 network disconnect caf4ec5ffcf6e30ae7ce4433a4e1000935c8f2173388a05693f1a58083d81e2c (container=a3a47903e3879dc4cd2e0433ab254136bf9e312b0e7cc223a9f983655f68b827, name=bridge, type=bridge)
2022-03-11T15:40:30.223447089+01:00 container destroy a3a47903e3879dc4cd2e0433ab254136bf9e312b0e7cc223a9f983655f68b827 (image=homeassistant/aarch64-hassio-supervisor, io.hass.arch=aarch64, io.hass.base.arch=aarch64, io.hass.base.image=homeassistant/aarch64-base:3.14, io.hass.base.name=python, io.hass.base.version=2022.02.0, io.hass.type=supervisor, io.hass.version=2022.03.3, name=hassio_supervisor, org.opencontainers.image.authors=The Home Assistant Authors, org.opencontainers.image.created=2022-03-10 12:24:42+00:00, org.opencontainers.image.description=Container-based system for managing Home Assistant Core installation, org.opencontainers.image.documentation=https://www.home-assistant.io/docs/, org.opencontainers.image.licenses=Apache License 2.0, org.opencontainers.image.source=https://github.com/home-assistant/supervisor, org.opencontainers.image.title=Home Assistant Supervisor, org.opencontainers.image.url=https://www.home-assistant.io/, org.opencontainers.image.version=2022.03.3)
2022-03-11T15:40:30.389909659+01:00 container create a6ed97dee7da931940bbad88e6d92385adba2b54225d8280fa564b269243402c (image=homeassistant/aarch64-hassio-supervisor, io.hass.arch=aarch64, io.hass.base.arch=aarch64, io.hass.base.image=homeassistant/aarch64-base:3.14, io.hass.base.name=python, io.hass.base.version=2022.02.0, io.hass.type=supervisor, io.hass.version=2022.03.3, name=hassio_supervisor, org.opencontainers.image.authors=The Home Assistant Authors, org.opencontainers.image.created=2022-03-10 12:24:42+00:00, org.opencontainers.image.description=Container-based system for managing Home Assistant Core installation, org.opencontainers.image.documentation=https://www.home-assistant.io/docs/, org.opencontainers.image.licenses=Apache License 2.0, org.opencontainers.image.source=https://github.com/home-assistant/supervisor, org.opencontainers.image.title=Home Assistant Supervisor, org.opencontainers.image.url=https://www.home-assistant.io/, org.opencontainers.image.version=2022.03.3)

It’s likely I had problems in the past with docker because…

root@homeassistant:~# apt-mark showhold
containerd.io
docker-ce
docker-ce-cli

After unholding these and upgrading, containers now start again.

Unfortunately there are other problems. Home Assistant become unresponsive (http or even SSH) some time after every reboot. It seems it’s busy in something. Maybe MariaDB addon?

It’s this related to the upgrade? How to further diagnose and solve?

If you do a full upgrade between major versions of the OS all packages which were put on hold before have to be set to unhold before initiating the full upgrade to avoid problems with packages for older versions which wont get replaced by newer versions coming with the new OS.

You are running the RPI4 from SSD with an USB3 adapter. There is a known problem about cases where HA is getting very slow or even unresponsive especially when accessing the logs, Logbook and History.

What helped me to overcome this issue effectively you can find here and here.

It seems that my problems were not related to Debian upgrade but to Home Assistant core upgrade and the database schema change. An index creation on statistics table was failing because of duplicates. It turned out that I had around 50million records for 2021-10-31. Wasn’t easy, but I managed to remove those records (losing 2021-10-31 statistics I suppose) and the database schema change seems now successful.

Likely there was a bug handling DST change that caused the problem I didn’t noticed until upgrading HA core. Likely the database schema changing was repsonsible of making at some point my system unresponsive.

At least, I hope so.

Installation of home-assistant / supervised-installer Release 1.1.1 will partially fail:

grep: /etc/default/grub: No such file or directory
[info] Switching to cgroup v1
cp: cannot stat '/etc/default/grub': No such file or directory
dpkg: error processing package homeassistant-supervised (--install):
 installed homeassistant-supervised package post-installation script subprocess returned error exit status 1

The solution as described by fcastilloec is:

If you need to enable cgroups v1, the values cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory must be added to /boot/cmdline.txt.

The above didn’t fix the issue on my clean debian 11 build as the install script still wanted to access grub files. Here’s what I did.

I guess one way to fix the problem is to do the following

touch /etc/default/grub

Then put a script named update-grub in /bin that doesn’t do anything

#!/bin/bash
echo $@ > /tmp/update-grub.out 

Not a good solution but the install will complete and it appears HA is up and working.

1 Like

As I pointed out on github supervised-installer PR #201:

fcastilloec’s recommendation helped me!
But as stated before: Installing the HA supervisor on Raspberry Pi OS is not supported. Doing so has the following consequence:

[...]
1 not fully installed or removed. <--

And each invocation of apt install / remove/ ... leads to these few lines repeated over and over:

[info] Switching to cgroup v1
cp: cannot stat '/etc/default/grub': No such file or directory
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)

To solve this issue comment the lines concerning grub + cgroup in /var/lib/dpkg/info/homeassistant-supervised.postinst.
Then just run apt autoremove and the installation will successfully conclude and stop nagging.

1 Like

I like your solution. But to be clear I’ve installed on a clean debian bullseye system, not on raspberry os. Looking for grub shouldn’t be something this package does on an arm system. There is no grub on any arm based system I’m aware of. Seems a few lines of code in the package could fix this. My kernel parameters are in /boot/extlinux/extlinux.conf, which I believe is standard on most debian arm installs. When the package see it’s an arm install, or grub file isn’t present, it could just post a message about the need to fix. Thanks for the response.

Where did you get the image from? This?

This site has scripts that builds for a few different boards. I’m using the N2+ builld.

https://github.com/pyavitz/debian-image-builder

You have to build the image on a debian bullseye system and it’ll cross compile anything special required for the specific image you’re building. The guy that runs the site is very responsive and its only a couple commands to get a full image. He has an image build for PI4, but I haven’t used it.

So if I understand you correctly you are installing HA Supervised on an Odroid N2+ but not on a Raspberry Pi?

Yes, I think the N2+ is the best option for HA. If you use a raspberry pi that same guy has a site specifically for Raspberry pi image builds

https://github.com/pyavitz/rpi-img-builder

The guy recommends this builder if you’re going to run on a pi.

He actually has some full images posted here

https://github.com/pyavitz/binary/releases/tag/images