All this smart stuff is great while you have an internet connection. If that dies, your home is very, very dumb. You’re left having to kill your smart bulbs by turning them off at the wall. None of your automations work. Your significant other will curse as all the clever things that were taken for granted are now taken away. Luckily it doesn’t happen often. We have a VirginMedia 350mbps connection and for the most part it’s stable. But just this year we’ve had a couple of long outages that have been challenging to say the least.
I’ve had a couple of tries at making everything local and that’s been frustrating. I tried Domoticz but found that a lot of the devices I have aren’t supported. I tried OpenHab but found that the latency with devices was just not acceptable. You expect a bit of a lag but when it takes over 10 seconds for a light to come on when you enter a room or operate a smart switch then it starts to grate.
Last on my list was HomeAssistant. I’d tried it in the past but just found that the interface wasn’t up to scratch. The Lovelace UI is very utilitarian. Then I found HADashboard which is part of the appdaemon ecosystem. It’s quite a learning curve but the end results are definitely worth the time spent.
So this is what I have now. A Raspberry Pi 4 with a Conbee II Zigbee controller. The Pi runs HomeAssistant with a plugin called deCONZ. If a device is in pairing mode then it gets added by deCONZ and made available to HomeAssistant. Once available to HomeAssistant, it can be used in automations. I have a mix with this. Some use the built in automation platform within HomeAssistant but I also use Node-RED for more complicated automations where I want lots of different conditional statements.
The beauty of this setup is that it’s completely local. If the internet goes down, my house stays smart. It all communicates using the Zigbee mesh so I have a robust network. Each device (in most cases) acts as a repeater so distance isn’t an issue. A bulb might use another bulb, then a smart plug as “hops” to get back to the Pi. Latency is pretty much zero. I have smart switches around the house and I’d challenge anyone to spot the difference between the response time for one of these vs the response time of a standard switch with a normal lightbulb. Likewise with motion sensors. Running a cloud based solution usually carried a small lag. If I walked into the kitchen I could get 2 or 3 steps into the room before the lights came up. Now, the moment the sensor sees me the lights come on. Placement of sensors is important. You need to think about the direction from which you enter a room and whether or not you can be seen just passing a door. By placing them carefully it stops lights coming on when you don’t need them to but also ensures that things happen quickly when you need them to.
Cost-wise, this setup can’t really be beaten. The Pi is about £40 including the power supply. The Conbee II stick can be trickier to get hold of and they’re around £30 to £50. A Samsung Smartthings Hub will cost you about £80 but that’s cloud based.
HomeAssistant is free, as are all the plugins that I’ve used. So for £70 to £90 you’ve got a very robust, locally running solution that’s scaleable with TONS of support in the forums, etc.
Despite that fact that most of my tech and smartness is invisible, it’s still nice to have some sort of interface. HomeAssistant and HADashboard can be easily accessed through any device with a browser. For me, I use it a lot on my phone. But I also have a couple of Amazon Fire tablets that just display the dashboard. For the money, you can afford to dedicate a device or two around the house for this.
In the hall we have this. This is the home screen of the dashboard. I’ve tried to ensure that the icons act as waypoints for anyone needing to use this to control any devices. The home screen shows date and time, the temperature and heating set point for the house with controls to adjust it, the lux reading for the main sensor that determines whether the lights need to come on, and 3 buttons to control the mode that the house is is. When it’s light enough, the house switches to day mode. None of the lights should be on. Once it starts getting dark, regardless of the time, the house goes into evening mode. Lights come on and the motion sensors and other automations are activated. When we go to bed, the house goes into night mode. Some sensors are deactivated, others change behaviour. For example, if you go into the kitchen at night, only some of the lights come on and at a lower level. Enough to find your way to the fridge and the biscuit barrel but not so bright that it’s overpowering.
The tablet goes to sleep after 15 minutes of inactivity but uses the camera to wake up if it detects movement. So the interface should always be visible if someone needs to use it.
Next we have the kitchen dashboard – just one example of a room dashboard as they all follow the same pattern. This controls all the lights in the kitchen but also shows whether motion has been detected, the temperature in the kitchen and controls for the Sonos.
I’ve tried to use icons that give an idea of the light being controlled without having to read the text. So you can see if a light is a lamp, a ceiling light or some other light. They use FontAwsome and the one that is missing from their collection is one for LED strips.
Another useful feature in HomeAssistant, and other platforms like this, is that you get access to lots of different bits of data from the sensors and other devices. All of these are battery powered and usually you would have to check the battery level on each device or just wait until the battery runs out. I’ve set up a dashboard that just displays the battery levels of all my devices. So phones, sensors, cameras, etc are all displayed in one place.
And lastly, I have a dashboard so that I can see the temperature of anywhere in the house that it’s being measured. I’ve got a weather station in the garden and temperature sensors all around the house in most rooms. In some cases it’s a specific temperature sensor but in most cases the motion sensors also detect temperature so I just tap into those.
We do have a smart thermostat but we don’t have smart valves on the radiators. Just because of the way that we prefer things, it’s unlikely that we’ll ever want a room warmer than where the main thermostat is. For the most part, we keep the radiators in other rooms turned quite low anyway. But what we have got are things like fans and an electric blanket. So if it’s hot in our bedroom, the fan comes on. In the winter, if it’s cold in our bedroom a smart plug gets turned on to switch on the electric blanket if it’s after 9.30pm. This works really well. Generally, in the winter, the temperature will drop over a period of time. So if it’s 17 degrees at 9.30 then the blanket will come on then. But it checks constantly. So if it’s a bit warmer and the temperature doesn’t drop to below 17 degrees until 9.55pm then it just means that the blanket will be on for less time before we get into bed. Then, as soon as the house goes into night mode, that automation is disabled and the blanket gets turned off. It did take one night of waking up at about 1.00am sweating to realise that the animation was flawed and adjust it!
All in all, this works pretty flawlessly. You get the odd time where a bulb will decide to ignore commands but it’s usually a case of killing the power to it using the old physical switch and turning it on again. 99% of the time it’ll re-sync. Every now and again you’ll need to remove it from the Zigbee network and re-add it but I can count on one hand the number of times I’ve had to do that.