Home Assistant, Part 2: Installation and Hardware Considerations

...

First off, the official Home Assistant “Getting Started” page has a bunch of information that is VERY useful. The problem with options is that sometimes it take a lot of trial and error (which could take a significant amount of time and virtually limitless frustration) before you find out what is “right” for you. Note that what is “right” for me may not be “right” for you, but I’ll explain what I did, the lessons I learned, and the reasons I went with the solution I did.

Basic Considerations

If you want to play around with Home Assistant, all you need is a Raspberry Pi 3 B+ or higher, an Application Class 2 microsd card (at least 32GB), a case, and a power supply that will give you at least 2.5A. It’s also recommended to connect this to your home network via ethernet rather than WiFi. Alternatively, you can use an Intel NUC i3 or higher (though I’d suggest an i5 or i7). I didn’t have a Pi handy, and I had some of the other options below readily available, so I went down that route instead.

The next option is a virtual machine. VMs give you a lot of benefits (snapshots, ease of setup, ease of management, ability to run multiple lower-powered computers on one piece of hardware, reduced electrical and heat considerations, speed of setup, ability to migrate VMs to another physical host, etc.

Round One: The Experiment

That’s the option I went with first: a Ubuntu workstation running on Windows Hyper-V, running Home Assistant in Docker. That was a fantastic setup and I learned quite a bit, but didn’t have access to the USB ports on the host, so I couldn’t use any USB Zigbee or ZWave hubs. This was an experimental build which I didn’t intend to be a long-term solution, but there’s no reason why it couldn’t be (other than the USB port access)

Round Two: The Hassio Virtual Machine

My second setup used Hassio as a virtual appliance in Windows Hyper-V. The Home Assistant website even provides a .VHDX file to make setup super-quick and easy (a little too quick): https://www.home-assistant.io/hassio/installation/

Just like the last VM, this one didn’t give me access to the USB ports (if you’re using ESX, that’s probably not going to be a problem for you, but I was running Hyper-V). This version was where I really started to get integrations and automations set up. Everything would have been great and I probably would have stayed with this solution if it weren’t for one fatal flaw: the supplied .VHDX is set to have a working partition of 6GB. After a month I ran out of space (with all my logging, snapshots, and plugins).

This shouldn’t be a problem since I have a total of 45TB (yes, TB) of disk space on the server hosting. So, I expanded the space in the .VHDX, and rebooted the VM… Nope, it still wouldn’t boot into Home Assistant – apparently, Hass.io only expands its volume to fill the available disk space on install, and no one I asked could figure out how to get to a command prompt that would allow me to execute a command to expand it. I could have mounted the .VHDX in Windows and deleted enough files to get the VM to boot, but this would only delay the inevitable on that VM. Rather than starting over on the .VHDX solution, and since I had a couple bare-metal computers laying around, I opted for a physical solution.

Round Three: Current

Since the best solution for me (thus far) has been Ubuntu with Hassio running in Docker, that’s how I proceeded with this round. I started with Ubuntu Server and went through the software setup, but Home Assistant always hung at the “setting up… this may take up to 20 minutes” screen… An hour and multiple reboots later, I decided to go back to Ubuntu Workstation. Here’s the setup that my buddy TJ put together (based on work by Frenck and others).

After installing Ubuntu run:

sudo apt update
sudo apt upgrade

After the updates have completed, run:

sudo add-apt-repository universe
sudo apt update
sudo apt install -y apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq network-manager socat software-properties-common
sudo systemctl disable ModemManager
sudo apt purge modemmanager
sudo curl -fsSL get.docker.com | sh
sudo curl -sL "https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh" | bash -s

Once that’s done, you should have a fully updated Ubuntu installation, Docker installed, and Hassio installed into a docker container.

From here, from any computer on your network, navigate to your server at the Home Assistant port: http://111.111.111.111:8123 (using your server’s IP address, of course). That may take up to 20 minutes, but mine took significantly less time (like under 2 minutes — this will depend on the speed of your CPU, etc.).

From there, I set everything up locally, but that sounds like information for another post. 😉

Leave a Reply