Close

Setting up HomeAssistant

A project log for Modernizing an Alarm System

Put existing door and window sensors on the network

andy-castilleAndy Castille 05/22/2017 at 03:250 Comments

Before embarking on a hardware journey, I wanted to get the easier (for me, as a programmer, at least) part out of the way: getting a program to coordinate this system with existing home systems and handle alerts. I just followed their official setup guide and didn't die.

I first found OpenHAB, but Java is a bit too resource-intensive for the Raspberry Pi I tried to run it on. After about 5 minutes of researching alternatives, I stumbled across HomeAssistant, which is like OpenHAB but is instead written in Python (more on this in a bit) and offers a lot more "Components" (equivalent to OpenHAB "Bindings") to get up and running. I installed it on the same Raspberry Pi I use to run ZoneMinder and they work together perfectly. You can look through my complete HomeAssistant configuration if you wish, but I'll post the relevant code as needed.

As I promised, I have a note about Python. I had previously avoided it (and will probably again in the future) for several reasons, which I won't enumerate here to avoid angry private messages. Anyway, this means that I struggled through writing a custom component (for the Rachio sprinkler system) in a programming language that was completely new to me. I got it done (see above for the result at the time of writing) with help from the HomeAssistant developers on Gitter, who also guided me through setting up WAN access to it with an SSL certificate and API password. This allows Push Notifications to be enabled through Google Cloud Messaging.


The next big step was "installing" the "mobile app". Those scare quotes are actually the opposite of scary. Rather than have a separate mobile app for each mobile platform, the HomeAssistant developers opted to make their webapp mobile-friendly, including notifications while the page isn't open. If you want, you can place it on your home screen from Chrome for an experience that is virtually indistinguishable from that provided by a native app.

Once all this was done, I played around with the configuration and data collection for a while before I had time to move on to hardware.

Discussions