Home Assistant Supervised on DietPi Topic is solved
-
- Posts: 8
- Joined: Fri Jan 17, 2020 4:02 pm
Home Assistant Supervised on DietPi
Has anyone successfully installed the Supervised version of HA on a DietPi install? I didn't want to wipe my Pi and start from scratch, so I followed instructions for installing it on Debian 10 from the HA site https://community.home-assistant.io/t/i ... -debian-10. At the end I have the container running and can see the Observer when I access <myip>:4357, but there's no web interface on :8123. After several people mentioned the incompatibility with HA and Docker v20, I downgraded docker to docker-ce=5:19.03.13~3-0~raspbian-buster. That didn't have an impact on my install. Any suggestions?
Re: Home Assistant Supervised on DietPi
Have you ever used portainer...a webgui for working with docker images
Might be able to pull up the docker and see if it has a different port aimed at 8123
nice thing is, it allows you to make changes and rebuild the docker image on the fly with minimal issues
https://dbtechreviews.com/2020/08/updat ... uper-easy/
Digging around also found other howto's
https://peyanski.com/home-assistant-sup ... er-how-to/
This one from dockerhub has over 100 million downloads
https://hub.docker.com/r/homeassistant/home-assistant
here is the howto I finally found from the page above
https://www.home-assistant.io/docs/inst ... erry-pi-os
I can confirm I just installed the docker image on my test Orange Pi PC and it built the container...it DID however take 30-45 min to uncompress all the downloaded images it needed to run!!!! (my OPiPC has a heatsink, active cooling, and cpufrequtils set to performance)
I used this command and it worked flawlessly
Change your -v directory to one on your machine...
Might be able to pull up the docker and see if it has a different port aimed at 8123
nice thing is, it allows you to make changes and rebuild the docker image on the fly with minimal issues
https://dbtechreviews.com/2020/08/updat ... uper-easy/
Code: Select all
#Run this command to install Portainer 2.0
docker run -d -p 9000:9000 -p 8000:8000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
https://peyanski.com/home-assistant-sup ... er-how-to/
This one from dockerhub has over 100 million downloads
https://hub.docker.com/r/homeassistant/home-assistant
here is the howto I finally found from the page above
https://www.home-assistant.io/docs/inst ... erry-pi-os
I can confirm I just installed the docker image on my test Orange Pi PC and it built the container...it DID however take 30-45 min to uncompress all the downloaded images it needed to run!!!! (my OPiPC has a heatsink, active cooling, and cpufrequtils set to performance)
I used this command and it worked flawlessly
Code: Select all
docker run --init -d --name="home-assistant" -e "TZ=America/Chicago" -v /home/warhawk/homeassistant:/config --net=host homeassistant/raspberrypi3-homeassistant:stable
Re: Home Assistant Supervised on DietPi
Not sure but I guess there is a difference between HA Supervised and HA Core. If I understood correctly, HA Supervised require some software components on the host. I have seem somewhere network manager, which is not used on DietPi.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Re: Home Assistant Supervised on DietPi
Yup looks like managed might need more stuff running to be managed
https://diyi0t.com/home-assistant-raspb ... ker-setup/
https://diyi0t.com/home-assistant-raspb ... ker-setup/
In our case also want to install Mosquitto MQTT boroker, InfluxDB and Grafana but we have to create a new docker container for each of this applications.
Re: Home Assistant Supervised on DietPi
I did this...still no go 

Re: Home Assistant Supervised on DietPi
what is the difference of the 2 version?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
-
- Posts: 8
- Joined: Fri Jan 17, 2020 4:02 pm
Re: Home Assistant Supervised on DietPi
Thanks for the insights. I haven't used portainer and am trying to avoid going down any other installation rabbit holes to make this work. I followed the instructions here https://community.home-assistant.io/t/i ... -10/247116 changing "debian" to "raspbian" when it was necessary to force version 19 of Docker. at the end I have a running docker instance and the expected homeassistant containers:
I can run some "ha" commands from the command line, although I don't really know what I can accomplish from there. The website at port 4357 just shows a page titled "Home Assistant Observer" that reports the Supervisor is running. There's nothing at port 8123. It seems like I need to figure out how to tell docker to make the supervisor available on 8123, but I don't know where to go from here. In the forum I cited above, the answer was to downgrade docker from v20 to v19. When I did that and restarted, there was no change for me. I don't know much about docker and don't know where to look for the configuration file that might tell me how to display the supervisor on port 8123. I found some ha files in /usr/share/hassio, but the "homeassistant" directory there is empty.
I wanted the Supervisor version to take advantage of addons that aren't available in Core, namely the ESP Home addon. I have some generic Tuya bulbs I was planning to flash OTA with ESP Home, and the Home Assistant addon is supposed to make that easy. I really liked HA Core from the few days I used it before deciding to uninstall and move up to Supervised. I was hoping to get this up in time to flash my new generic wifi plug, but since it's to control the Christmas tree I guess I'm going to have to go with the rebranded Tuya app for now.
Code: Select all
sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
433bcf6a8c6f homeassistant/armv7-hassio-multicast:3 "/init" 43 hours ago Up 43 hours hassio_multicast
e2909f90b123 homeassistant/armv7-hassio-cli:2020.11.1 "/init /bin/bash -c …" 43 hours ago Up 43 hours hassio_cli
bfe59806ee08 homeassistant/armv7-hassio-audio:17 "/init" 43 hours ago Up 43 hours hassio_audio
1e91f0226155 homeassistant/armv7-hassio-dns:2020.11.0 "/init" 43 hours ago Up 43 hours hassio_dns
884ed2331d1b homeassistant/armv7-hassio-observer:2020.10.1 "/init" 3 days ago Up 43 hours 0.0.0.0:4357->80/tcp hassio_observer
55322c099bc0 homeassistant/armv7-hassio-supervisor "/init" 3 days ago Up 43 hours hassio_supervisor
I wanted the Supervisor version to take advantage of addons that aren't available in Core, namely the ESP Home addon. I have some generic Tuya bulbs I was planning to flash OTA with ESP Home, and the Home Assistant addon is supposed to make that easy. I really liked HA Core from the few days I used it before deciding to uninstall and move up to Supervised. I was hoping to get this up in time to flash my new generic wifi plug, but since it's to control the Christmas tree I guess I'm going to have to go with the rebranded Tuya app for now.
Re: Home Assistant Supervised on DietPi
ok I did a test myself with this.
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
There you go. Port 8123 is used/provided by a pythons script and not by a docker container. Let's check it
So it's a HA process outside docker
The whole stuff seems to be controlled by hassio-supervisor.service
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
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.
The HA Supervised installer will modify /etc/network/interfaces as well
Means, you will loos DietPi functionality to manage your interfaces using dietpi-config. This is a downside of this installer but not something blocking.
- running DietPi on RPi3B+ 32bit
- update DietPi to v6.34 BETA
- Install Portainer CE + Docker (20.10.1) using dietpi-software
- install some prerequisite for HA Supervised
Code: Select all
apt install -y software-properties-common apparmor-utils apt-transport-https ca-certificates curl dbus jq network-manager
- run the installer
Code: Select all
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
- after installation finished, I was waiting 10-15 minutes as indicated by the installer at the end of the installation process.
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
Code: Select all
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:~#
Code: Select all
root@DietPi3:~# ps -ef | grep 13952
root 13952 13948 1 16:33 ? 00:00:37 python3 -m homeassistant --config /config
The whole stuff seems to be controlled by hassio-supervisor.service
Code: Select all
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:~#
as well the Supervisor point is visible

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.
Code: Select all
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.
Code: Select all
[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?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Re: Home Assistant Supervised on DietPi
ok after a reboot the stuff is not working anymore. Looks like a couple of docker images are missing now. Strange
EDIT
OK it's needed to restart the service.
It looks like the missing images get downloaded all the time again. Quite useless to download all the stuff each reboot. Not counting all the r/w operation on the SD card
Question is, why all images getting cleaned
EDIT
OK it's needed to restart the service.
Code: Select all
systemctl restart hassio-supervisor.service
Question is, why all images getting cleaned

Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
-
- Posts: 8
- Joined: Fri Jan 17, 2020 4:02 pm
Re: Home Assistant Supervised on DietPi
I appreciate the detailed walkthrough. I will try to replicate your steps above if I get a chance the next few days. Looks almost foolproof except for the constant container downloading that's happening.
EDIT to add: one difference I noticed was the lack of a "raspberrypi4-homeassistant" container on my system where you have raspberrypi3-homeassistant. That's a clue that not everything was installed and/or running correctly. Any insights on uninstalling all of the containers and starting from scratch? Will portainer help with that?
EDIT to add: one difference I noticed was the lack of a "raspberrypi4-homeassistant" container on my system where you have raspberrypi3-homeassistant. That's a clue that not everything was installed and/or running correctly. Any insights on uninstalling all of the containers and starting from scratch? Will portainer help with that?