Routine Tasks; Upgrading Home Assistant to Latest Beta!

Friday, November 16, 2018

Cargo taxi automation delivery service poster. Robotic driver moving baggage vehicle. Taxi stickers on yellow pink boxes. Green background

Once you are running in Docker, upgrading Home Assistant (or rolling back for that matter) is really just a few clicks away.  The release cycle of Home Assistant is every 2 weeks so there are always new features, fixes and enhancements waiting once you upgrade.  I have a special script on my Docker machine that I use to quickly upgrade all the containers in my stack.

HAUpgrade.sh

#!/bin/bash
cd /home/hass/docker_files
docker-compose pull
docker-compose down
docker-compose up -d
docker system prune –fa
docker attach --sig-proxy=false hass

This script will pull down all the new images defined in my Docker-Compose file (located in /home/hass/docker_files) and then after downloading and extracting, down the existing containers.  Once down, they are restarted in the background (-d) and then any old files and images are pruned from the system.  These old files and images can take up quite a bit of space over time.

Once those tasks are completed, we attach to the hass container to watch the log as it boots up.  The –sig-proxy=false allows me to connect to the container and then use CTRL-C to exit out without passing that CTRL-C to the HASS application running (forcing the container to quit).

In my Docker-Compose file, I have the rc branch defined for Home Assistant which is the Beta versions.

To watch it all in action, check out the video below and consider subscribing to catch all my content.

Happy Upgrading!

- Carlo

Previous
Next Post »