My First 2 Hours with Home Assistant

Home Assistant, where have you been all my life? Let me start off by saying if you are thinking about trying Home Assistant, just go ahead and get started. So far, it has been great!

Background on implementing Home Assistant

Last year Google made a change to Google Home/Google Assistant that stopped them from working with the ha-bridge (Phillips Hue bridge emulator). I used this to add voice control to my DirecTV receiver, lights, A/V receiver and more (here is how you use ha-bridge to add voice commands). I use a very old veralite controller, running old software, as my primary home automation controller for my z-wave devices. Why haven’t I upgraded the Vera? It works and I didn’t want to upgrade and possibly break all the work I put in, so it is many years behind in software. Not being able to tell Google to turn on and off lights and feeling the need to plan an upgrade to my vera made me look into other home automation hub options.

Why Home Assistant?

Having already had a home automation hub for years I had a good idea of the features I wanted. The features I wanted in a home automation controller were:

Support for Z-wave

I know eventually I am going to need to replace my Veralite. Home Assistant has z-wave functionality, but you need to buy a Z-wave controller go with it (like the Aeotec Z-Stick or Linear/Nortek HUSBZB-1). Alternatively, Home Assistant also can interact with separate z-wave controllers, like the Vera.

(Update: I migrated all my Z-wave devices to Home Assistant)

Integration with Google assistant without exposing ports on my network

Google used to work with ha-bridge and run commands locally on your network, without having to expose any part of your network to the Internet via port forwarding. Late in 2017 they changed this, which broke my ability to integrate lots of home gear with Google Assistant. There are a few options for getting this to work if you are okay with opening a port to a running service in your firewall, but I’d prefer not to do this. Home Assistant has a cloud integration that works with Google Assistant and Alexa and doesn’t force you to open a port. It creates a secure connection with your Home Assistant instance and still runs all the commands on your local network.

Integration with Vera

I don’t plan on replacing my veralite immediately. Home Assistant has direct integration with Vera and pulls all my vera devices and scenes into its infrastructure.

Runs on Linux

All my servers run Linux. I’m extremely familiar with Linux administration and I feel confident in its stability. Home Assistant can run on various Linux platforms. It can also run on all kinds of hardware.

See also  Airrobo P20 Robot Vacuum Review: Budget Excellence

Ability to simply execute RESTful commands

I currently control a few devices through RESTful APIs (like my DirecTV receivers). I want to make sure I can continue to control these devices even if the automation controller doesn’t have direct integration with them. Home Assistant can easily execute REST commands, but even better,  I ended up not needing them as Home Assistant directly supports all of my equipment!

Other systems I investigated

I looked at quite a few systems but quickly focused in on the popular options Home Assistant, OpenHab, and Domoticz. I’ll be honest, I didn’t do a whole bunch of in-depth investigation as I knew I could always switch pretty quickly. Domoticz seems to lack the level of community involvement that the others have, and it didn’t support as many of the devices as I was interested in. Which is a shame. I was interested in it as it uses Lua as a scripting language, which I’m already familiar with from using the veralite.

That left me with OpenHab and Home Assistant. I asked a couple of times on Twitter and Instagram for advice. I heard tons from the Home Assistant supporters, but not a peep from OpenHab. Many remarked that Home Assistant had a faster development pace. This both worried me and excited me, as I like stability, but staying up to date is good. So in the end, I went with Home Assistant.

Editor’s Note: Check out my comparison of Home Assistant alternatives.

Home Assistant or

The first confusion I ran into was what to install. I already have customized Ubuntu virtual machine (VM) image that I use and I wanted to install Home Assistant there. At first, I couldn’t tell the difference between “Home Assistant” and I knew was newer. But was it a separate platform? Which one could I install on Ubuntu? Which one would be better for a beginner?

What I learned was that Home Assistant was just a Python program that could be installed, whereas was a combination of Home Assistant and tools to allow someone to very easily install and manage Home Assistant. More to the point, is really just another way of installing Home Assistant.

I saw multiple ways to install Home Assistant. The primary ones seemed to be using, Hassbian, or the Python virtual environment install. As I already have VM ready for this I chose the Python virtual environment install. The official install instructions seemed to assume you are using a Raspberry Pi and Raspbian, but I’m well versed enough in Debian based Linux distros that I was not worried by that. Just keep in mind you’ll need to keep your Python virtual environment updated.

The first 2 hours

After 30 minutes – Install and up and running!

As I already had my VM configured (Ubuntu 18.04) I simply stepped through the advanced Python virtual environment install instructions and everything worked! After waiting around for a few minutes Home Assistant auto discovered almost everything I wanted, with the exception of my Veralite, without me doing anything. The devices it detected included:

  • DirecTV receivers
  • All my cast devices (Google Home and Google Chromecast)
  • Roku
  • Panasonic Viera TV
  • Panasonic Blu-Ray
  • Denon Receivers
  • My TP-Link HS105 Smartplug
See also  Make Your Own Air Quality Sensor Using ESPHome
Home Assistant UI
Home Assistant UI

This seemed great. Not only were they discovered, but I was able to interact with the devices. After playing around a bit I discovered I could:

  • See what was playing on the DirecTV receivers and pause and play
  • Turn on and off the TV, Blu-Ray player and receivers.
  • I could see and select the source of the receivers, and control their volumes.

After 60 minutes – Welcome to all my Vera devices!

What I was missing, however, was all the lights, switches, locks and sensors from my Veralite. These weren’t auto-discovered, but I was quickly able to add them by following the Home Assistant vera configuration instructions, which consisted of adding 2 lines to my /home/homeassistant/.homeassistant/configuration.yaml file:

  vera_controller_url: http://<your IP>:3480/

This was my first foray into the world of YAML (YAML Ain’t Markup Language – gotta love recursive acronyms). It is very picky about spacing, and don’t even try to use a tab character. Once I understood those constraints and found I could use a configuration checker in the UI I was able to play with a few things in the configuration file. After adding those two lines and restarting Home Assistant all of my Vera devices and scenes showed up in the UI. Too many in fact. I had test scenes I had written, and phantom devices (vera has a few bugs) that I didn’t want to clutter Home Assistant. Next up for my google skills was how to delete or hide devices.

I found two ways to hide my devices. Home Assistant provides a hidden attribute for entities that hide them from showing up in the UI. But even better, for Vera devices, there is an option to exclude devices by device ID from the vera discovery so that they aren’t a part of Home Assistant at all. I went with option B.

The other issue was that all of my Vera light switches showed in the Home Assistant UI as power switches instead of lights. Home Assistant has a ready-made solution for that too – the Vera configuration has an option to reclassify switches as lights by providing a list of device IDs. After making these changes I restarted Home Assistant and the Vera devices and scenes I wanted gone were gone, and the ones I wanted to show up as lights showed up as lights!

After 2 hours – Integration with Google Assistant and Alexa

Replacing the Google Home integration I used to have was the biggest factor I had in looking for a new home automation controller. That was even easier than I thought it would be. I set up an account with their Home Assistant Cloud through the Home Assistant UI. Then I added the skill to Google Assistant by opening the Google Home app, going to Home Control, and tapping the “+” icon (just like adding any other skill). After Google synced devices, Google assistant could control all my supported devices via my phone, my Google Homes, even Android Auto. There are a couple of key changes I needed to make and luckily Home Assistant provides the configurations I need in this documentation.

  • I needed to change the name of some of my devices controlled by Google Assistant. With voice command, how you name things is extremely important. Using the alias capabilities of Home Assistant I was able to customize entity names.
  • Some devices (like power switches to some electronic devices) I don’t want to be controllable via voice. You can exclude entities from Google Assistant in the configuration as well.
See also  Shelly Plus Plug US: Improvement on Excellence
YAML Snippet
Vera/Google Cloud snippet of the configuration.yaml file

Setting up Alexa integration was pretty similar, including the configuration. I enabled the Alexa skill and I was ready to go with my Echo Dot. Configuring names and excluded devices was the same as it was for Google.

I have since found out that the Home Assistant Cloud will eventually have a monthly charge of $5. I think it is worth it to have this functionality and to support the development. There are other ways I could do the Alexa/Google Assistant integrations for free, however, this is easier and more secure.

Wrap Up

That was a productive couple of hours. Home Assistant is pretty well polished for my needs. In two hours I was able to:

  • View and control my DirecTV Receivers, Denon A/V Receivers, Panasonic TV and Blu-Ray player
  • Control and view my Vera devices (lights, temperature sensors, locks, etc.)
  • Configure which devices were available in the Home Assistant UI
  • Integrate voice control with Google Assistant and Alexa

This was so easy I’m definitely sticking with Home Assistant. Next up for me (and googling has already pointed me to how to do these things):

  • Add my Global Cache Itach IP2IR controller (I have a couple of devices without network interfaces *gasp*)
  • integration
  • Setting up IP based presence detection (Google, say hi to me when I get home 🙂 )
  • Decommission ha-bridge (it only works with Alexa, and I won’t need it anymore with Home Assistant Cloud)
  • Start automating! All of this so far has just been implementing remote control, but I have a few things around lighting and security that I would like to automate
    • Update: I started a lot of this work and documented it here.
  • Customize the UI. I downloaded the app, but I prefer the responsive website on my phone at this point.

Home Assistant 3 Years Later…

I’ve been using Home Assistant for years now and I’m even happier with it. Here’s how things have grown with Home Assistant over the last three years.

Final Thoughts

I really couldn’t be happier with my choice to go with Home Assistant. Install and basic configuration (including cloud integration) are a snap, and now I’ll get out of it the work I put into programming logic into the automation. I’m a newbie, but I already feel like I can do some advanced things, and I feel like all the resources I need to do what I want to do are readily available. Resources I have available for you are:

Let me know your thoughts and experiences with Home Assistant. Connect with me in the comments below or using the social media links on this page. Also, consider subscribing to our site for access to our newsletter and content we don’t publish here.

Editor’s note: This page contains affiliate links. For more information read our disclosures.

Share this:

My First 2 Hours with Home Assistant

by HomeTechHacker time to read: 9 min