Home Assistant Supervised on DietPi

ok I did a test myself with this.

  1. running DietPi on RPi3B+ 32bit
  2. update DietPi to v6.34 BETA
  3. Install Portainer CE + Docker (20.10.1) using dietpi-software
  4. install some prerequisite for HA Supervised
apt install -y software-properties-common apparmor-utils apt-transport-https ca-certificates curl dbus jq network-manager
  1. run the installer
cd /tmp/
curl -Lo installer.sh https://raw.githubusercontent.com/home-assistant/supervised-installer/master/installer.sh
chmod +x installer.sh
bash installer.sh --machine raspberrypi3
  1. after installation finished, I was waiting 10-15 minutes as indicated by the installer at the end of the installation process.

This is how it looks like now:

All active and running container (visible in Portainer)


As you can see, non of the container is exposing port 8123. Therefore I checked all LISTEN ports on my system

root@DietPi3:~# ss -tulpn | grep LISTEN
tcp     LISTEN   0        80             127.0.0.1:3306          0.0.0.0:*       users:(("mysqld",pid=7614,fd=21))
tcp     LISTEN   0        1024             0.0.0.0:80            0.0.0.0:*       users:(("lighttpd",pid=7718,fd=4))
tcp     LISTEN   0        1000             0.0.0.0:22            0.0.0.0:*       users:(("dropbear",pid=409,fd=3))
tcp     LISTEN   0        128              0.0.0.0:8123          0.0.0.0:*       users:(("python3",pid=13952,fd=7))
tcp     LISTEN   0        4096                   *:9002                *:*       users:(("docker-proxy",pid=7982,fd=4))
tcp     LISTEN   0        1024                [::]:80               [::]:*       users:(("lighttpd",pid=7718,fd=5))
tcp     LISTEN   0        1000                [::]:22               [::]:*       users:(("dropbear",pid=409,fd=4))
tcp     LISTEN   0        128                 [::]:8123             [::]:*       users:(("python3",pid=13952,fd=8))
tcp     LISTEN   0        4096                   *:4357                *:*       users:(("docker-proxy",pid=12173,fd=4))
root@DietPi3:~#

There you go. Port 8123 is used/provided by a pythons script and not by a docker container. Let’s check it

root@DietPi3:~# ps -ef | grep 13952
root     13952 13948  1 16:33 ?        00:00:37 python3 -m homeassistant --config /config

So it’s a HA process outside docker

The whole stuff seems to be controlled by hassio-supervisor.service

root@DietPi3:~# systemctl status hassio-supervisor.service
● hassio-supervisor.service - Hass.io supervisor
   Loaded: loaded (/etc/systemd/system/hassio-supervisor.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2020-12-15 16:27:05 CET; 50min ago
  Process: 9827 ExecStartPre=/usr/bin/docker stop hassio_supervisor (code=exited, status=1/FAILURE)
 Main PID: 9838 (bash)
    Tasks: 12 (limit: 2182)
   CGroup: /system.slice/hassio-supervisor.service
           ├─9838 bash /usr/sbin/hassio-supervisor
           └─9883 docker run --name hassio_supervisor --privileged --security-opt apparmor=hassio-supervisor --security-opt seccomp=unconfined -v /run/docker.sock:/run/docker.sock -v /run/dbus:/run/dbus -v /etc/machine-id:/etc/machine-id
:ro -v /usr/share/hassio:/data:rw -e SUPERVISOR_SHARE=/usr/share/hassio -e SUPERVISOR_NAME=hassio_supervisor -e SUPERVISOR_MACHINE=raspberrypi3 homeassistant/armv7-hassio-supervisor

Dec 15 16:34:12 DietPi3 hassio-supervisor[9838]: 20-12-15 15:34:12 INFO (MainThread) [supervisor.homeassistant.api] Updated Home Assistant API token
Dec 15 16:34:12 DietPi3 hassio-supervisor[9838]: 20-12-15 15:34:12 INFO (MainThread) [supervisor.homeassistant.core] Detect a running Home Assistant instance
Dec 15 16:34:13 DietPi3 hassio-supervisor[9838]: 20-12-15 15:34:13 INFO (SyncWorker_0) [supervisor.docker.interface] Cleanup images: ['homeassistant/armv7-hassio-supervisor:2020.12.6', 'homeassistant/armv7-hassio-supervisor:latest']
Dec 15 16:34:13 DietPi3 hassio-supervisor[9838]: 20-12-15 15:34:13 INFO (SyncWorker_0) [supervisor.docker.interface] Cleanup images: ['homeassistant/armv7-hassio-cli:2020.11.1']
Dec 15 16:34:13 DietPi3 hassio-supervisor[9838]: 20-12-15 15:34:13 INFO (SyncWorker_0) [supervisor.docker.interface] Cleanup images: ['homeassistant/raspberrypi3-homeassistant:landingpage']
Dec 15 16:34:13 DietPi3 hassio-supervisor[9838]: 20-12-15 15:34:13 INFO (SyncWorker_0) [supervisor.docker.interface] Cleanup images: ['homeassistant/armv7-hassio-dns:2020.11.0']
Dec 15 16:34:13 DietPi3 hassio-supervisor[9838]: 20-12-15 15:34:13 INFO (SyncWorker_0) [supervisor.docker.interface] Cleanup images: ['homeassistant/armv7-hassio-observer:2020.10.1']
Dec 15 16:34:13 DietPi3 hassio-supervisor[9838]: 20-12-15 15:34:13 INFO (SyncWorker_0) [supervisor.docker.interface] Cleanup images: ['portainer/portainer-ce:latest']
Dec 15 16:34:13 DietPi3 hassio-supervisor[9838]: 20-12-15 15:34:13 INFO (SyncWorker_0) [supervisor.docker.interface] Cleanup images: ['homeassistant/armv7-hassio-multicast:3']
Dec 15 16:34:13 DietPi3 hassio-supervisor[9838]: 20-12-15 15:34:13 INFO (SyncWorker_0) [supervisor.docker.interface] Cleanup images: ['homeassistant/armv7-hassio-audio:17']
root@DietPi3:~#

And finally I’m able to connect to HA using my IP of the DietPi device at http://192.168.0.12:8123


as well the Supervisor point is visible :slight_smile:


Side note: The installation require network-manager which is conflicting as DietPi is using ifupdown. There is a message during installation of the prerequisite pointing to it.

Setting up network-manager (1.14.6-2+deb10u1) ...

The following network interfaces were found in /etc/network/interfaces
which means they are currently configured by ifupdown:
- eth0
- wlan0
If you want to manage those interfaces with NetworkManager instead
remove their configuration from /etc/network/interfaces.

The HA Supervised installer will modify /etc/network/interfaces as well

[info] Creating NetworkManager configuration
[warn] Changes are needed to the /etc/network/interfaces file
[info] If you have modified the network on the host manualy, those can now be overwritten
[info] If you do not overwrite this now you need to manually adjust it later
[info] Do you want to proceed with that?

Means, you will loos DietPi functionality to manage your interfaces using dietpi-config. This is a downside of this installer but not something blocking.