As the title indicates, this is an introduction level video. My purpose is to explain the basics of smart home control options and then talk a bit about Home Assistant. What it is, and why you would want to use it.
This is really about creating a “Smart Home”. Having a smart home means you have additional ways of controlling devices in your house. In a smart home you can turn your lights on and off, change the temperature on your thermostat, lock or unlock doors, open and close curtains, and control almost any appliance, by either pushing a button on your phone, or using your voice, or ultimately by doing nothing. In the perfect smart home all these things would happen automatically based on who is home, where people are in the house, what time it is, and other information from sensors and even cameras. If you don’t have any “smart” devices in your home yet, you will soon. It is the way of the new world.
One common problem faced by people who have started smartening up their homes, is that each device comes with it’s own app. It kinda defeats the purpose of a smart home if you have to sort through a dozen different apps to control your new fancy lights. To bring all your different smart devices together you need a hub. The hub gives you one place to control all your various devices, even if they are all made by different companies. More importantly a hub lets those devices interact with each other. So motion detected on your brand X camera can turn on your lights made by brand Y, and close your brand Z window shades. If you have a Smart Home, it is very smart, to have a hub.
When it comes to choosing a hub, you have a few conceptual choices to make. At this point in the evolution of the smart home, pretty much every device you can buy works with Alexa, or Google Home. Using Her or Him as your hub is probably the easiest way to bring all your smart devices together. If your device says “Works with Amazon Echo or Google Home” then after you set up the device with it’s own app, you add the Skill (Alexa) or the App (Google) for that device. Both have apps for your phone that brings in any smart home device you’ve connected, and of course you can control all those devices with your voice. To get smart devices to interact together in Alexa you make Routines, with Google Home you make Actions.
So why would you not just use Alexa or Google Home as your hub? For one thing, every time you add a new device from a different manufacturer you introduce another point of possible failure if their servers ever have an outage, or if they go out of business. For many people the biggest reason not to go this route is privacy. Every smart device that asks you to sign in to their app is collecting data about you. Who you are, where you are, when you’re home, and even things like when you’re asleep or awake. When you add your devices using Alexa or Google Home as your hub, they also get all that data and they can put all the information from all those various devices together to figure out even more about you. Worst of all, if some villain ever gets access to your home network through one of those connected devices, they can get information about you to steal your identity or otherwise cause you serious grief in all kinds of fun ways.
If you aren’t concerned about data leaks, or you don’t care about Google, Amazon, or all these device manufacturers having your data, then just go ahead and use Her or Him as your hub. Simply buy whatever devices you want and live long and prosper. Honestly, in all likelihood, you’ll probably be fine. But, if you want more privacy and more direct control of your smart home, then you want Home Assistant as your hub.
https://www.home-assistant.io/
Home Assistant is an open source, community developed, smart home hub. It’s free to download and use. The purpose of Home Assistant is to bring all your smart home devices together, but also to provide the option of keeping all your information private. When you buy a smart device, you won’t see a label on the box that says “Works with Home Assistant” (yet), but as of today, HA includes over 1200 different components. Most components represent a different device brand that can work with HA. You can kind of think of a Home Assistant Components as similar to Alexa Skills or GH Apps. If HA has a component for your device, then you set up that device using their app, add that device’s Component to HA, and then you can use HA to control that device. In that way, HA functions as a hub, but it doesn’t stop the device manufacturer from getting data about you or how you are using their device. If you want to truly keep all your smart home workings private, then you’ll need to not use the device manufacturer’s app. That usually requires opening the device and changing the firmware on the device to one of the available alternatives that allow for local control. That is one of my favorite things to do.
To categorize these different levels of smart home control I would say;
- Using Alexa or GH as your hub is the easiest for a non-technical user
- Using HA with the device apps and components is more technical and requires some curiosity or ability to edit configuration files and tinker with things.
- Using HA without device apps and local-only control (meaning no information leaves your home network) is the most technical option since it requires editing configuration files, touching circuit boards and maybe some soldering, but it provides maximum privacy.
Before you dismiss the idea of the 3rd option, I want to tell you that I am not an engineer. I just do this as a hobby. Not long ago I had never really messed with these kinds of things, but now I’m pretty comfortable with config files, circuit board components, and even soldering. Also, it’s quite fun and empowering to be able to take apart a device, figure out how it works, and bend it to do my will! Muwahahahah!
That being said, you can mix and match these levels of use. If you’re unsure about messing with configuration files, you can start by just using Alexa, then start playing with HA, but still use the device apps, until you decide you’re ready to play with circuit boards and eventually converting to total local-only control.
That explains a bit about why you might want to use Home Assistant. Now let’s talk about what HA can do. HA can be installed on a lot of different kinds of hardware. Many people start by using a Raspberry pi. You can also use any old computer. If you really like Home Assistant you will probably grow out of the rpi, but it is a good place to start because it’s cheap. I’m not going to go through the installation process in this video. JuanMtech has a good video on how to do that. If you already have some smart devices, it’s possible that Home Assistant will find them as soon and you start it up. If that’s the case you’ll find those listed at the top of the Integrations page. Click the configure button and it’ll tell you what to do to finish linking those devices with Home Assistant.
If your device isn’t auto-discovered then the next place to look is on the Components page.
https://www.home-assistant.io/components/
You can search by device brand, or look at the categories and see if your branded device is listed there. If you do find your device, there will be a page that tells you how to connect it to HA. These setups require a little more work than if your device is auto-discovered and listed on the Integrations page. Usually that means editing your HA configuration file. There are a few ways you can get access to your configuration file. All of them require you to use what HA calls Add-ons. You can find the available Add-ons in the Hass.io menu then Addon Store. The add-ons that give you access to edit the configuration file are:
- Configurator
- Samba Share
- IDE
There are videos by me and others that explain how to set them up and use them. But it is usually pretty simple. You choose your addon, install it, read the instructions, change anything you might need to change in the Config box, then start it up. My favorite is IDE, but if you’re running HA on a raspberry pi, IDE can be a little slow. For simplicity the Configurator-inator is probably the best choice. You need a user and password, then click save and start. Click Refresh on the Log to see if there are any errors. If it looks good click “Open Web UI”, put in the user/pw you just used in the Config box and you’re in! The Configurator opens into the config folder. To get into your configuration file click the folder icon then look for “configuration.yaml” and click it. Once you’re here the instructions from your device’s component page will tell you what you need to add or change.
The configuration files use a format called YAML (Yet Another Markup Language). There are headings for each different kind of device. When you list more than one device under a heading you start with a dash. Yaml is pretty picky about things like spaces and punctuation. When you’ve added your device save the configuration, then if you’re fairly confident you did it correctly you can restart HA right here for the changes you made to take effect. If you’re not as sure about what you changed in the configuration file or just to be sure you didn’t screw something up too badly, go to the Configuration page then General then Check Config. If you get the green light then you can restart HA with confidence. If you did something wrong it will tell you where to find the mistake so you can fix it. When it comes back up your new devices will be on the front page.
There are a lot of different kinds of devices you can add to HA. When you’re first getting started the most common will probably be Lights and Switches, but pretty soon you’ll want to include Covers (which is HA-speak for things like garage doors, blinds and curtains), Climate (which is for Thermostats), Door and Window Sensors, Motion Sensors, Door Bells, Presence Detection, Alarm Systems, Locks, Cameras, Media Players, Remote Controls, Power Monitoring, and pretty much anything else you can think of. The real magic of getting all these devices connected to Home Assistant happens when they start interacting with each other. There are three methods for getting your devices to interact in HA.
- Scenes
- Scripts
- Automations
The easiest of these is Scenes. A scene is a list of devices and the state you want them to be in. For example, you might make a scene called Bedtime and in your Bedtime Scene you set the State to Off for your Bedroom light, Living Room light and Kitchen light, but your Front Porch light, white noise machine and ceiling fan you set the State as On. When you “Activate” a scene it makes sure all those devices are in the proper state according to what you set in the scene. You can find a list of all you devices and their current state on the states page < >. To create a scene you make an entry in your configuration file according to the instructions on the Scenes page in the HA docs.
If Scenes are the easiest, then Automations are the most common. An Automation says when this thing happens, make this other thing happen. It has a Trigger, maybe some Conditions, and some Actions. The Trigger is something that happens that gets the Automation started. A lot of different things can serve as the Trigger; a switch turning on or off, motion being detected, someone coming home or leaving the house, a sensor hitting a set temperature, the sun coming up or going down, the time of day, the weather, a button being pressed, or again, pretty much anything you can think of can be a Trigger. When the trigger occurs the automation checks the Conditions. Conditions can also be all kinds of different things, the state of certain devices, time of day, time of year, who is home, and on and on. If the conditions are not met then the automation stops. For example if you have an automation that turns off the porch light at 10pm every night, but you set a Condition that all family memebers must be home. If your teenager isn’t home at 10pm, then the Automation will stop and the porch light won’t be turned off. If all the Conditions are true then the Automation will move on to the Actions. The Actions are what you want to happen, like lights turning on or off, alarms sounding, cameras taking a picture and sending it to your phone, a text to speech message telling everyone it’s time for dinner, and once again, pretty much anything you can think of can be the Action. You can write Automations in the configuration files using Yaml, but when you’re getting started the easiest thing to do might be to use the Automations editor. The more time you spend using HA the better and more creative your Automations will get.
Automations are the main way your devices will interact with each other, the last thing to talk about is how You interact with HA. For most things you’ll probably use the web interface. Recently the developers added a nice way to customize the web interface. You can change which devices you see and how they are grouped together, and you can add themes to change the color layout as well. There are ways to show your devices on a floor plan of your house and ways to create a touch screen interface. There is an app for iphone but no official app for Android but there should be one soon. Should. Should… In the meantime you can use the web interface on Android since it scales nicely for mobile devices. You can also interact with HA using your voice. You can use Amazon Echo or Google Home. The easiest way to use those with HA is through a service called Nabu Casa. It cost $5 a month, but it supports the future development of HA and for me it’s totally worth the price. If you don’t want to, or can’t pay for Nabu Casa you can still use both Her or Him, the setup is just a little more involved. There are also other voice command platforms you can use like Snips and Mycroft. In our family I’m pretty much the only one that uses the web interface, everyone else uses voice control.
Well, that’s it. That was a brief introduction to Home Assistant. If you want to make your home more smarter, you have a lot of options. But if you want maximum control and maximum privacy and you don’t mind or even enjoy getting under the hood, Home Assistant is you best option. If you want to know more you can join us on discord and facebook. I’ve done lots of videos about HA and I do live streams every Sunday. Besides me there are a lot of other great tutorials by these fellas.
That’s all for now!