Category Archives: Automation

Upgrading homeassistant: the easy way

Notice. These instructions will restart all Docker containers. That might not be what you want. Use caution.

Since my Gui upgrade did not work. Here are two easy ways that should work. Always backup your config before doing any of these.

1. Use the original Debian package:

Since I previously created a Debian package, I could just reinstall that: sudo apt-get install –reinstall ./homeassistant-supervised.deb

This would pull all the latest images from repositories and restart all Docker containers. This package was from my earlier post’s section 4. Home assistant Supervised install.

Package source was: https://github.com/home-assistant/supervised-installer/archive/refs/tags/1.4.3.zip

Alternative, and even more easily upgrade should be to just restart all Docker containers.

docker restart $(docker ps -q)

As I used the Debian package way, I noticed that docker start homeassistant did not work anymore.There was no such container. I remedied this by starting a new container named as homeassistant: docker run -d  –network=host  -v /usr/share/hassio/homeassistant:/config  –name homeassistant homeassistant/home-assistant

In general, I have noticed that homeassistant container usually needs a manual intervention to get going. It is always good to use docker ps to verify that all is actually running after the restart.

Note. Using –network host is important. Without it we do not gain Gui access.

Note. It is also important that you bind your existing config to homeassistant container with: -v /usr/share/hassio/homeassistant:/config  – Notice that your path might be different. I am using the default.

Home assistant with an unsupported Debian based system

In my case, the server was running: Linux Mint 21.

1. Docker install

curl -fsSL get.docker.com | sh

sudo groupadd docker

sudo usermod -aG docker $USER

newgrp docker

2. Home assistant os agent install

sudo apt install apparmor jq wget curl udisks2 libglib2.0-bin network-manager dbus lsb-release systemd-journal-remote -y

wget https://github.com/home-assistant/os-agent/releases/download/1.5.1/os-agent_1.5.1_linux_x86_64.deb

sudo dpkg -i os-agent_1.5.1_linux_x86_64.deb

Continue reading