So I’m still on Ubuntu 16.04, and from version 0.65, Home-Assistant.io now needs Python 3.5.3 or later to run.
Issue is, by default Ubuntu 16.04 only goes up to Python 3.5.1.
I can update to 3.6 but ran into backwards compatibility issues. So I thought this would be a good excuse/opportunity to try Docker.
And my oh my is it awesome. No need to worry about any prerequisites, it takes care of everything that’s needed to run HA. It also means updating and downgrading HA is a breeze.
Only issue I’ve seen so far is that the python scripts that I have running to update some of HA’s devices no longer work as they use libraries that aren’t installed in HA’s docker. I looked at a few options but ended up moving them completely out of HA and having them publish on MQTT instead of interacting with HA directly.
Moving scripts to communicate via MQTT also means that should I lose internet connection, my HA instance will keep updating as I’m not attempting to connect out and back via HTTPS.
I’ve already added InfluxDB and Grafana on Docker and I use Portainer to manage it all, I’m now planning on moving other apps to docker (Plex, WordPress, OpenALPR, etc)
Finally I use docker-compose instead of docker run to launch my containers, it’s easier to manage all options and means I don’t need a separate bash file to launch each container. Here’s the container I use for HA, InfluxFB and Grafana:
version: '3' services: influxdb: image: influxdb:latest container_name: influxdb ports: - "8086:8086" volumes: - /NAS/influxdb:/var/lib/influxdb restart: always grafana: image: grafana/grafana:latest container_name: grafana ports: - "3000:3000" volumes: - /NAS/grafana:/var/lib/grafana links: - influxdb restart: always homeassistant: container_name: hass image: homeassistant/home-assistant:0.75.3 volumes: - /home/cctv/docker_ha:/config - /etc/localtime:/etc/localtime:ro - /home/cctv/docker_ha/shell_scripts:/shell_scripts:ro devices: - /dev/serial/by-id/usb-RFXCOM_RFXtrx433_A1XETWB5-if00-port0:/dev/serial/by-id/usb-RFXCOM_RFXtrx433_A1XETWB5-if00-port0 depends_on: - "influxdb" restart: always network_mode: host