Transisition from Home Assistant on Docker to Hassio

This is on Ubuntu 18.04. I am reinstalling everything on a different instance of Ubuntu on same machine. I am considering moving from Home Assistant in Docker to Hassio, which I believe is also in Docker. Can I make this move? I do have Aeotec Zwave stick and several zwave nodes if this makes a difference.

Yes, it’s pretty easy actually using the steps at this link.

One thing to remember is that only one HA instance can use the USB stick at a time so don’t set up zwave on the new Hassio until you turn it off on the old HA.

You’ll have to copy over all of your config files to the new /config directory which by default will be located at /usr/share/hassio/homeassistant.

I started to make the move to hassio from regular HA in docker but there were some quirks that I didn’t want to deal with at the time (that I can’t remember what they were off the top of my head) so I went back to my regular HA and haven’t been back to try it again.

One thing I do know that kind of put me off of it was the recent automatic supervisor update that wrecked some peoples dns set up. I really don’t like the idea of silent updates that have the potential to break things without any warning.

thanks. I am getting the feeling that there is more integration more easily with Hassio. I see no instructions for example on how to integrate Lutron without Hassio.

Huh?

@jmcgee, Did you search the forums at all? What you have posted about is currently being discussed in about 3 other threads. Try doing a search next time before starting a new thread. Here is the same info I have posted in those threads for Hass.io on Ubuntu;

EDIT

Full guide here…
https://drive.google.com/open?id=1oKhnQ1rz-Yd5HheA8rNk5YNq8e67-5Kh

Original Post
This, in my experience, is the fastest and simplest way to deploy Hass.io on a NUC (or other PC, RPi, etc) running Ubuntu Desktop or Server as the OS in this case (or using Raspbian on an RPi3). I have used this method myself on a NUC, an RPi3 and an old i5 Dell Optiplex 990. The method is repeatable and simply, it just works.

1.) Get ubuntu from Here. Use the torrent link - either 16.04 LTS, or 18.04 LTS. Server or desktop won’t really matter. I have recently changed to using Server 18.04.03 LTS myself.

2.) Make a bootable Ubuntu USB using Rufus. Available Here

3.) Install Ubuntu to the NUC using the bootable USB you have just made, once the install and setup is complete, update the OS via a terminal window, or via Putty from a Windows PC.

To connect via Putty, check your router for the IP address or your NUC / PC / RPi and use Putty to connect via SSH, on port 22 by default. Putty is available Here.

Copy/paste this into terminal/Putty, and let it run.

sudo apt-get update && sudo apt-get upgrade -y

4.) If you have a current HA install on another machine, backup all your yaml files, lovelace config, etc to your PC, USB or HDD. A handy way to do that is using WinSCP, available Here. Connect to your current install on port 22 and copy/paste all your config to a PC.

5.) Now to install Hass.io. Follow this guide, specifically from the line, “To prepare your machine for the Hass.io installation, run the following commands”

Copy each line of the below commands and paste them into a terminal/Putty window, and execute them one at a time.

sudo -i
apt-get install software-properties-common
add-apt-repository universe
apt-get update
apt-get install -y apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq network-manager socat
curl -fsSL get.docker.com | sh

Now the machine has everything it needs to run Hass.io. The following command will download, install and get Hass.io ready you;

curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh" | bash -s

The time it takes to install and launch Hass.io will vary depending on the machine you are using. On a NUC or PC, it normally takes under 5 mins, on a RPi3, it takes 15-20mins. You can check the progress of Hass.io setup by connecting to the IP address of the machine in Chrome/Firefox on port 8123. Once you can see the login screen, the setup has been completed and you can move on.

6.) Copy your yaml files to the NUC /PC/ RPi, normally in the location /usr/share/hassio/homeassistant.

7.) Install Portainer to manage your Docker containers for anything that you might want to run that isn’t available through Hass.io or HACS.

Run this command in terminal/Putty;

sudo docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer

8.) Reboot your machine via Terminal/Putty using this command

sudo reboot

Once your machine is back online, you will be able to access Hass.io at http://MACHINE_IP_ADDRESS:8123 and login in to Portainer at http://MACHINE_IP_ADDRESS:9000

I use this guide myself, it has worked successfully on a NUC, an i5 Dell Optiplex SFF 990 (circa 2011) and on an RPi3 (running Raspbian instead of Ubuntu) and the entire process took me 19mins (on the Dell PC). I timed it just to see. This included making the bootable USB, Ubuntu install, updates, installing and having HA up and running. Very easy.

The time it takes will change depending on the speed of the CPU of the NUC/PC/RPi you use, but this should give you a good indication of just how fast and easy it is.

2 Likes

Thanks. I tried again, I had posted earlier and got no responses.

[email protected]:~/homeassistant$ python get_lutron_cert.py
Traceback (most recent call last):
  File "get_lutron_cert.py", line 37, in <module>
    from urllib.parse import urlencode
ImportError: No module named parse
[email protected]:~/homeassistant$ python3 -V
Python 3.6.8

In one of these commands you tell it to use Python. In the other you tell it to use python3. Which is it?

FYI: the script can be run on any machine with python3 installed. It doesn’t have to be the same machine your home assistant is running on

To use Lutron Caseta devices in your installation, you must first log in to your Lutron account and generate a certificate that allows Home Assistant to connect to your bridge. This can be accomplished by downloading and executing get_lutron_cert.py, which will generate three files: caseta.key, caseta.crt, caseta-bridge.crt when you run it. See the instructions at the top of the script for more information.

The first command was to run the script.
The second command was to display the version of Python in case that was the reason the script had an error.

This instruction to login to my Lutron account and generate a certificate by running that script on my machine. Why do I need to login to my Lutron account?

But it appears you ran the first command in python 2.7

The second command, you specified python3 instead of python. You used 2 different pythons

Thank you all. I reran the command using Python3 and sudo I think had to be used. In any case, it created the keys. I put the info in configuration.yaml and now Lutron shows up in Lovelace. I will put off hass-io I guess for another day.

Hey there, I’m running HA on Docker and I’m quite pleased.

Just out of curiosity, what would be the benefits to move to Hass.io ? Is it for performance or ease of maintenance? Thanks!

one (hyphenated) word…add-ons.

Other than that it works no better than running in docker. Even then it’s not that it’s that much better. It’s just different. It’s an easy “one-click” install of Docker containers for those add-ons instead of you having to do it manually.

And I’d say there are some downfalls to running hassio, as well. Just ask all of those people who woke up to find their networks not working because they had their DNS set up locally and when the supervisor auto-updated in the middle of the night it broke their DNS.

1 Like

Oh okay! Thanks!

So basically, if I don’t mind installing add-ons manually, then I should stick with docker… this is my understanding. :wink: