[Home Assistant] Basic Setup Guide | Installation

Home Assistant is one of the most powerful and robust home automation system that can be started for free. Unfortunately, the system is not for everyone due to its current user interface (UI) challenge/limitation. There are many excellent installation/setup guide about the Home Assistant. This is a yet another basic setup guide, but focusing to the basic users who are interested in knowing what we are doing. This is a step beyond those guide where you just follow instruction and in the end things to magically work.

One of the reason for this is because Home Assistant have many potential points of confusion. One should probably not be using Home Assistant without any understanding of what one is doing. This guide is also not for intermediate users who believes Home Assistant is already perfect as it is. If you prefer Linux over MacOS for OS, Home Assistant may be perfect choice and this is too simple guide for you. The first in the series will be focusing on “adding new integrations”. What appears many random variant of integration installation method can be conceptually categorized into four main types.

Background

Home Assistant (HA) was initially released on September 17, 2013. Similar to its competitions, this is a home automation software/platform designed to be a central control system for wide range of smart home appliances with emphasis on local control (ref). As of today, HA is considered to be one of the most popular local home automation platform. If anyone is serious about a home automation using local control, this is one platform you cannot ignore.

If you have no idea what I am talking about, Home Assistant have nice online demo.

https://demo.home-assistant.io

Imagine the picture above are all different types of smart home devices you own from various venders that cannot be added Homekit, Alexa, nor Google Assistant. Home Assistant may provide you the solution like above with all working together.

What’s home automation?

Let’s talk about Home Automation itself. Home Automation is an integration of various network connected so called, smart home devices to perform sequences of actions i.e. routine. Amazon’s Alexa, Google Assistant routines or Homekit’s automation function are the examples of home automation.

https://www.apple.com/ios/home/

For example, rather than voice control to just turn on the kitchen light, you can create automation such as when you say “good morning”, the blinds throughout home opens, multiple lights and TV in the kitchen turns on, coffee maker power turns on and unlock front door while turning off bedroom lights and living room fan.

Platform and cloud independence

If big 3 already supports home automation, why do you want home automation hub/controller unit like home assistant (HA)? There are several reasons but the biggest reason are two forms of independence, platform and cloud.

Platform independence

We live in Apple ecosystem; however, my security camera system is UniFi Protect. Unfortunately, they are not compatible with Homekit. I was able to make UniFi Protect to be Homekit compatible by using a software called, homebridge. This works really well and my Unifi Doorbell can make ring sounds to HomePod minis. If someone is looking for way to make a device Homekit compatible unofficially, my recommendation is try Homebridge first.

However, in my case we have other areas in home with Sonos speakers and not able to hear doorbell ring. So the real automation I like to do is UniFi Protect Doorbell push to announce “someone is at the door” on all my Sonos speakers throughout home. In fact, I want to do this in Japanese.

This is where dedicated home automation hub like HA plays a role. HA acts as home automation controller/brain unit and ties otherwise completely independent products from different venders to integrates together and allows to make an automation.

Cloud independence

Cloud independence means home automation runs independent of internet connection. Both Alexa and Google Assistant always use internet connection as that’s where brain of the automation located. Local operation of home automation provide 3 primary benefits.

  1. Reliability: Home automation will continue operating even while internet service is down.
  2. Improved speed/low latency operation.
  3. Security/Privacy: No information sent across internet; therefore, much reduced risk for privacy breech.

Home Assistant Installation Guide

Official Home Assistant installation instructions are very well written. I cannot do any better job than that. However, there are quite a bit of text and many decisions to make, which may overwhelm some. In this guide, I’d provide some personal tips that I learned after installing a few instances of Home Assistant myself recently.

The overall installation process can be thought of as five major steps:

  1. Choose type of Home Assistant Installation
  2. Choose hardware to use
  3. Follow official step by step instruction
  4. Access Home Assistant
  5. Essential Configurations

STEP 1: Choose type of Home Assistant installation

Home Assistant can be installed on pretty much any computer platform that one can think of but there are four variants of installations and which version can be installed may be limited by the hardware. Also many hardwares support multiple versions of Home Assistant and this can be a point of confusion for starter. For the starter, official and my personal recommendation is to use Home Assistant OS.

TIP: Install Home Assistant OS

Home Assistant OS should be seen as a true, unlimited version of Home Assistant. Supervised version is essentially the same. The other two options, especially like container may sound attractive to some if you are using dockers on NAS. However, it has severely limited functionality through UI. I personally started with Container version on my NAS and quickly gave up due to too much time spent just to get basic setup that I need.

https://www.home-assistant.io/installation/

STEP 2: Choose hardware

I have intentionally started this guide by Home Assistant version choice/recommendation rather than hardware. Once again I strongly recommend, finding hardware that supports Home Assistant OS version.

Recently, I have installed Container version on Qnap NAS and Home Assistant OS on Rasberry Pi 3B. I was almost gave up on Home Assistant with Container version installation. In fact, my very first experience with Home Assistant was over two years ago. The container version reminded me the experience and some extent even worse due to severe limitation of UI functionality. It is not impossible to make things work without UI, but it will takes a lot more effort and extra steps. The main reason purpose of the automation system is to simplify our daily life flow. So if setting that up takes a lot more effort/time, that is putting the cart before the horse. After installing Home Assistant OS version on my Raspberry Pi 3B; however, it is not too much to say that two felt distinct product. To experience unrestricted experience from hardware, I have purchased Intel NUC10i7. On it, I have virtual machine setup using ProxMox running with Home Assistant OS running 2 CPU/8GB RAM setup virtual environment.

One strange issue I faced with NUC setup over the Rasberry Pi setup is Unifi Doorbell’s motion and doorbell push triggers kept disconnecting while video stream remain working. The similar issue was noted with Homebridge platform when running on Docker but not on Rasberry Pi. So the issue could have been on UniFi side rather than Home Assistant, but I thought this is worth mentioning as it was a bit surprise to me to see issue was only seen on virtual machine environment despite the same OS, same integration. So here my recommendation for starter is if possible, consider dedicated hub unit for Home Assistant OS.

if possible, consider dedicated hub unit for Home Assistant OS.

Some of the hardware options include:

If you decided to purchase Home Assistant Blue, which is the first and official Home Assistant pre-installed hardware, you can skip installation instructions to here as this comes with Home Assistant pre-installed. If you go with Intel NUC, hardware surely won’t be your limit. However, for basic setup you may not notice any performance difference between my $600 NUC10i7 Virtual Machine setup and last generation Rasberry Pi 3B.

However, there are things you may notice the difference.

My personal recommendation here is if you already have Rasberry Pi or Virtual Machine setup, try using that to install Home Assistant OS. If you end up liking Home Assistant and feels hardware may be limiting the performance, that’s when you should start thinking buying a dedicated hardware.

STEP 3: Follow step by step instruction

If you are going to use Rasberry Pi, see here. If you are going to use Intel NUC, see here. MAC, Windows and Linux can be used via virtual machine. Other options are also listed on the official site here.

Download BalenaEtcher

In many of these options, you will need to download BalenaEtcher. It is an app that allows you to create bootable external storage i.e. SD card, USB drive. It is a free and runs on Both Windows and Mac. You can download it from here.

STEP 4: Access Home Assistant

After following the instruction, Home Assistant should be running in your local network, and can be accessed by typing in http://[IP address of Home Asssistant]:8123/ on local network web browser or often by just typing in http://homeassistant.local:8123 in your browser. You can also install iOS or Android app.

Of note, at this point remote access i.e. accessing from outside of home network is not configured. Some may see this as a major flaw, but one of the main reason why Home Automation platforms like Home Assistant exists is cloud independence. Opening up internet access gives the cloud related potential security risk.

STEP 5: Essential Setups

At this point, you have Home Assistant OS running. However, you can’t do anything at all at this point because you have not configured i.e. registered any device to Home Assistant yet. This will be done by means of installing and configuring “integration(s)” in Home Assistant. Integrations are app equivalent in Home Assistant. Without them, the platform itself has no use.

There may be some network connected devices automatically detected by Home Assistant and you may see suggested integrations to configure, but many devices are not automatically detected. However, based on my experience, there are what I consider essential system add-ons/setups even before configuring each integrations. Technically, these are not mandatory and you could wait until the time when you need these, but my recommendation is set these up now so when time comes you are ready to go. These pieces include:

Install Text File (YAML) Editor

Home Assistant uses text files in a format called YAML. This has been previously criticized and I myself left Home Assistant couple years ago after couple months of playing (ref). Since then, Home Assistant continues to work on graphical user interface to make the system more user friendly. However, it is still a work in progress and you are likely to end up dealing with YAML to some extent. So you need the text file editor for that. Fortunately, Home Assistant OS or Supervised version provide this as add-on so you can access YAML file directly through the Home Assistant app. There are two add-ons (you just need one):

  • File Editor
  • Visual Studio Code

Under supervisor tab, you want to add either File editor or Visual Studio Code add-on.

Supervisor Tab

If you do not see Supervisor option on your left tab, it means your installed version of Home Assistant does not support this. I highly recommend installing Home Assistant Supervised or Home Assistant OS version. Otherwise, you better know how to access YAML file in your setting but you may still encounter several other challenges/extra steps.

Supervisor Tab > Add-on Store

In the Search bar, you want to type in either File editors or Visual Studio Code

Visual Studio Code is more advanced text editor and warns you if your YAML code is malformed while you edit. File editor is more of a basic editor. So if you can install I’d recommend Visual Studio Code.

However, on my Rasberry Pi 3B instance of Home Assistant OS, I was not able to install visual studio code so I went with file editor.

After installing it/them, you need to start the service. You can either have it on “show in sidebar” or always come back to Supervisor Dashboard section and hit open web UI.

You are now set to open and edit configuration.yaml. You just need to this setup once.

Terminal & SSH Access

Besides YAML text file editing, Home Assistant may need you to access command line input (CLI). Once again, supervisor capable version of Home Assistant have add-on to support these access through GUI.

User Profile (User name) at the bottom of the right column > Advanced Mode > Turn ON
Supervisor > Add-on Store > Type in "ssh"

I chose official add-ons i.e Terminal & SSH. You click the tile and hit install.

START the add-on. I personally have this start on boot, auto update, and show in side bar, but those are all optional. Once service is started, you can hit Open web UI.

You will see the screen below.

Now you are ready to access Home Assistant SSH.

Remote Access

Once all is running, you most likely want to have remote access i.e. be able to access Home Assistant outside of your home. One way to set this up is configure through your router. This may be as simple as forwarding port and you may feel a set. The issue for this is you won’t have HTTPS i.e. secure access. The other route may be create VPN to your local network and access from there.

Do we not have a Home Assistant way of configuring this? Well we do.

They have a good instruction here. The easiest way is to subscribe to Home Assistant official cloud service, Nabu Casa. Nabu Casa costs $5 per month but you can have free 31 day trial where you won’t need to provide any credit card info.

This subscription provide following capabilities with an ease:

  • Alexa integration
  • Google Assistant integration
  • Remote Access
  • Neural Network Text to Speech i.e. more natural sounding audio

Technically speaking, you can set everything up for free without the above subscription if you are willing to spend sometime. They also have an excellent instructions for these. My personal recommendation is first play around with Home Assistant locally. If you like it and thinking about any of above feature, give a 31 day Nabu Casa trial a try. This way you know full capability fo Home Assistant. In another word, if you find Home Assistant is lacking at this point, there is no reason for you to waste your time setting up Alexa, Remote access etc.

My personal recommendation is first play around with Home Assistant locally. If you like it and thinking about any of above feature, give a 31 day Nabu Casa trial a try. This way you know full capability fo Home Assistant.

If you decide Home Assistant is your go to Home Automation platform, you can then decide whether to start investing time to set above cloud features or keep using subscription.

Next Step

Now that you have functioning Home Assistant OS, your next step is to start adding new integrations.