Installing Home Assistant Supervised on a Raspberry Pi using Debian 12

This isn’t required as the docker install script pulls and installs the current/latest version.

It seems there is again an upstream issue with docker-cli causing an issue with the HA Supervisor. Downgrading docker-cli seems to fix this.

or as you have done downgrading to 5.19.x

4 Likes

But that is for the first install. Then you get the latest version. But upgrading Docker means the host version of Docker, not Docker in a Docker container. And the Docker installation on the host is managed by the host’s package management system, like apt or aptitude. And (at least on my system) aptitude was thinking Docker was no longer needed, when it started checking and noticed the version was outdated.
That is what I’d like to solve.

What are you on about?

If you install Docker on the host using the script, that’s all you need to do to run HA Supervised. You don’t need to update the Docker environment of a HA container.

I don’t have this issue on my test system using apt. Perhaps that’s an issue with Aptitude.

I think maybe he’s using raspbian and the docker convenience script? I think that has a different update method than apt-get etc? I could of course be totally wrong lol.

Hi there! Thanks for writing these instructions. I just followed all the steps and everything looks good except that wifi is not working anymore. I really wanna connect PI to wifi and I understand the risks and that LAN is more stable. During setup wifi was working fine, looks like HA’s installation script has blocked wifi interface or smth. Could anybody help me please?

What system are you using, Debian or Raspbian ?

Fresh Debian 10 (Buster) for Raspberry 3B+ from here.

Are you able to ping to your gateway ?
Is your WiFi not working for internet connection (ping 8.8.8.8) or local area connection (ping to your gateway) ?

Can you show result of command “ip route”

Actually I was trying to connect via SSH previously with no success via wifi (for LAN it’s working). I connected monitor and keyboard to the board now and tried to ping. Network is unreachable. Attached the output.

Photo

How connect to your WiFi ? Looks like WiFi interface completely down, since there are no routing table.

Check your wlan0 status with command

ip a

If Interface down, bring it up with.

ip link set wlan0 up

Any try to re-configure your WiFi with network-manager by.

nmtui

ip a

Output

So here smth wrong with wlan0 as I understand. But it’s already up.

nmtui

Tried it… There is no wireless connection option in “Activate a connection”.

Hmm strange :confused: I never have problem with WiFi in Debian with my Raspberry pi 3.
I mainly use WiFi for my Pi too.

Mostly I have problem with Raspbian since Dhcpcd conflict with Network Manager but I able to manage this so I stick with Raspbian since I’m familiar with this.

However, HAS installation script are modify /etc/network/interfaces. you may need to check this, or try to not modify /etc/network/interfaces during HAS installation prompt.

I configured manually wifi connection via network manager. Restarted the interface and it got ip address. I didn’t try ssh though. Restarted the board and wifi is gone again. It’s super strange for me…

Indeed, I use Raspbian. And aptitude, which was going to remove Docker. So I marked it manually as ‘keep’. But I did not pin the version, so apt(itude) upgraded the Docker version.
Everything works now, except that HomeAssistant does not start by itself anymore. hassio_observer starts upon reboot, but I have to manually start the homeassistant container (or was it hassio_supervisor?). I try to understand how Docker works, and how the different containers that depend on each other do start each other.
It did work, before upgrading Docker, so I would like to use the original startup mechanism, but I cannot find much documentation about how this convenience scripts sets-up things. On https://www.home-assistant.io/installation/raspberrypi I read about using Docker-compose. Is that also what the convenience script uses?
Your help is very much appreciated.

There is a bug in docker-ce-cli in version 20.10.4 there is a link to a post with a fix here Installing Home Assistant Supervised on a Raspberry Pi with Debian 10

Raspbian is no longer a supported OS (hasn’t been for close to a year), so keep in mind you may run into issues with the HA Supervisor, update errors, etc. This guide specifically covers the use of Debian 10 on the Pi as well as using apt not aptitude, so YMMV.

Updated to new docker 20.10.5, and all is fine now. After a reboot, everything works.

Next time I configure my Raspberry SD with a new OS, I will use plain Debian, and not Raspbian then.

Still, it’s not completely clear to me how the framework of running Homeassistant supervised in a Docker container works, and how elements depend on each other. To be more specific: which should be started first, and then starts all the rest. I’m beginning to learn, but I could not find an overview somewhere.

  • What starts the framework in the first place, and is that done via init.d or systemd or something else?
  • I the Docker server started separately, and does something start the Homeassistant containers when Docker is up? Or does Docker restart the last running containers? Or is it someway else?
  • Which of the Homeassistant related containers is started first? Is that hassio_observer, hassio_supervisor, or the homeassistant container? Or -again- something else?

Some of my questions may be more generic, but most of the answers may be specific for Homeassistant Supervised in a Docker container on a Rapsberry Pi (either running Debian 10 or Raspbian, that will not matter here I guess).

Q: “A container is based on an image. But when a new image of Homeassistant is installed, the settings, history, etc are maintained. How do I find where is the file (I suppose it is somewhere outside the container) to keep that recovers my complete home-assistant configuration and history and record? I guess that is a configuration option that is passed to the homeassistant container when that is started, but how do I retrieve that on a running system?”
A: I think I resolved this last question. I installed Portainer, and inspected the homeassistant container. And it shows that /data in the Docker container is mounted on (>Mounts>0>Source) /usr/share/hassio, where I can find a file homeassistant/home-assistant_v2.db. This must be the database, and the current configuration is indeed in configuration.yaml.
I cannot find, though, where the configuration is that tells that this is the location that is mounted in the Container, or is that a fixed location set in the image of homeassistant?

Did a fresh install and also had the issue with docker, downgraded as recommended and it started working fine afterwards, sans the power/SD access leds. Is that expected behavior on Debian? Any way to enable them anyway if so?

I do find it very odd I’m getting about 1.7GB of ram usage now while the exact same HA install plus octoprint and a few other things on top of the 64 bit RaspbianOS install I migrated from never broke the 1.2GB mark. Not sure on how I’d go about tracking down the reason, if anyone’s got any pointers they can share that’d be very much appreciated.