An Introduction to Home Assistant

An Introduction to Home Assistant

January 9, 2023·
Mike

Home Assistant (HA) is a wildly popular open-source application that allows many things in your home or workplace to be automated. In this article I’ll describe some of the reasons you might want to use HA and how it can help your daily life and do some very useful things. This is an intro level doc and I hope to write some more detailed content on our HA config in the near future. If there is something specific, leave a comment and I’ll endeavour to publish something.

The devices and integrations that work with HA are numerous, from light bulbs, lightswitches, security cameras, power switches and air-con to network hardware and even network enabled coffee machines, cars and vacuum cleaners. If you’re really keen it may be possible to add electronics to other appliances so they’re supported integrations too.

Some things that I use HA for,

  • Enabling the building alarm and notifications if no one is there
  • Motion sensors in externally accessible rooms
  • Most of the light bulbs are Philips Hue and controlled by voice or HA
  • Turn on home lights 45 minutes before sunset. Turn them off 60 minutes after sunrise
  • Turn off devices when people aren’t there
  • Control media cast to a Chromecast, adjust the TV volume and channel
  • Provide a central view of weather and local tides
  • Get notified when the washing machine is finished and the kids have done their chores
  • Track the temperature and humidity in some areas of the house

Installation

HA is lightweight in terms of the hardware resources required and can run on a Raspberry Pi in most scenarios. Long term heavy usage and retention of lots of data (e.g. temp readings) has been known to be detrimental to the SD card storage in Raspberry Pis, but I’ve never had an issue after almost two years.

The HA installation docs provide a few different options for installation. The one I would recommend is the HomeAssistant OS option. This is a great starting point for a RPi and you get all the functionality you’ll need including easy add-on features.

HA OS will also run in a virtual machine (VM) with a hypervisor like Proxmox. This allows for a bit more hardware power to be used and takes away any concerns on the SD storage.

Once HA is installed it provides a web server that you can log into from your broswer and create users. By default it will search your local network for any devices it supports by default and add these. Things like a Philips Hue hub/bridge device will show up and you’ll get a default weather integration based on the location info you provide.

Configuration

For the most part the configuration can be done within the browser, but some things will need you do alter YAML files. These are very fussy about spaces and indentation, so ensure you get that right before making too many changes. Adding Add-ons in HA OS for backups (Samba Backup) and easy SSH access (Terminal & SSH) to the HA OS command line are a good idea.

It all starts with the many Integration options in the Settings menu. It’s very possible that many of the smart devices you have also have an Integation that can be installed. Our old Samsung TV was immediately identified and allows for some basic, but useful functionality.

The interfaces (screens, buttons, etc) you use to interact with the Devices and Entities identified by the Integrations are called Dashboards. This lets you build views of the data along side anything you directly need to interact with.

The screen below is our default view in the mobile app. It shows if we’re home or not, or in another common location (like work or school) and the alarm and room motion sensors. If we all leave the house at some point, the sensors and alarm will be enabled. If motion is detected by the sensors I receive a notification in MatterMost that tells me which sensor and when it happened.

Our home screen in the Home Assistant iOS mobile app

Tasks can be automated to happen based on trigger events such as the time of day, the weather, the presence of people or events from your other devices. These are Automations and are one of the main features of HA and how it can benefit you. What you can do depends on the Integrations you have configured but it’s common to use triggers to turn devices on or off based on people. The easiest way to define the presence of a person is to install the HA mobile app on your phone and associate that with your HA user. People can also be grouped so Automations can then trigger on the status or an event from that Group. e.g. everyone has left the Home Zone.

The media screen as shown in a web browser. Controls TV, Chromecast and Alexa speakers

There is also a community store for integrations and front-end config called HACS that provides many more options, although unsupported from the core HA community. I’ve found these to be very useful and 100% reliable, but they do have frequent updates that need tending to (with a simple button click).

Privacy and Vendor Dependency

Other than doing lots of useful things in your home there’s a privacy and independence benefit to using HA.

Many of the IoT devices we buy require the use of another mobile app or an online service from the manufacturer. In some cases this means reducing the security of your home network, it almost certainly means providing them with some of your information and you are then reliant on that company being in business for many years and continuing to operate that service.

By using HA with Devices and Integrations that operate only on your HA server, you remove the need to provide personal information to others and you no longer rely on them to run the service that does whatever you need it to do. Your SO does not care that the “Acme Lights” company went out of business when they can no longer have the lights turn on when they enter a room or when they can’t say “Alexa turn off the kitchen lights”.

What Not to Use Home Assistant For

Not so much the HA part but often relevant to the electronics being used with it. If you want to manage your building alarms and security or safety systems with HA, I wouldn’t recommend it. The downside of power outages or communication issues must be easy to recover from and robust.

As a cost effective option for some time and money saving automation, it is very useful, but like all things, use the right tool for the job.

Last updated on