Home Automation with HASS.IO


So recently I started dipping my toes into the home automation space. Having a friend with a fairly advanced set-up already has helped immensely but I wanted to be sure to capture my journey for those that are also interested (or for me in case I accidentally destroy all my hard work and need to start again).

My goal was to have a highly configurable set-up without lock in to a particular brand like the Samsung Smart Things or Philips Hue products. Mostly because I wanted to be able to add any sensors or devices from any manufacturer, supporting a wide range of protocols. But also I wanted to limit the amount of information going back and forth to the internet / cloud. Also I wanted to keep costs down even if that meant more work for me in both configuration and using generic, low-cost devices (e.g. Raspberry Pi, ESP32, etc.).

Enter Hass.io which is a build of Home Assistant running on a Raspberry Pi. The documentation is great and installation very straightforward. There’s a great community behind the project and a whole bunch of add-ons that make integrations and automations quite straight forward.

Installation

Essentially the steps are:

  • Grab an image for your Rasp Pi (or other). In my case it was the 32bit on for the Pi 4.
  • Flash it to an SD card (I used balenaEtcher on PC as it’s awesome for this, works straight from the zip file).

Once you can access your running installation (either at http://hassio.local:8123 or http://{IPAddress}:8123) then you should do your set up and then enable Multi-factor Authentication (especially if you’re going to be exposing it to the internet).

There are steps in the guide detailing how to set up the WiFi or static IP however I just plugged it in to my network and then found the IP it was given by DHCP then connected to it. I did set a static IP but I used the nmcli tool instead following this post.

You will likely need the network manager package in the SSH add-on. Go to the add on in hass.io and add this to the configuration…

"packages": [
    "networkmanager"
  ],

The command to exit is actually “quit” and also there may not actually be a default file in the /etc/NetworkManager/… section as mentioned in the guide.

Multi-factor Authentication

Go to the bottom left, your account and then click ENABLE on Multi-factor Authentication Modules.

Use your authenticator app of choice to complete the process.

Add-ons

Once you’re up and running there are several very useful add-ons to set-up. I’ll cover them in separate posts but the main ones are…