Years ago, I saw a video on YouTube - the emergency party button. In those three minutes I knew I wanted to get into home automation. The challenge back then was that it was technically complicated, expensive, and I didnât have the time or my own place. It went onto the wish list for âsome time in the futureâ. Roll forward a few years, and now home automation technology is abundant, inexpensive and more straightforward than ever to get started with. In this post, and others which will follow, Iâll document my journey with Home Assistant - the incredible home automation platform that has become the source of much joy and frustration in my home automation safari.
Why Home Assistant?
Since around 2015, Iâve had an increasing amount of âsmart technologyâ in my home. A Philips Hue lightbulb here and there, Amazonâs Echos popping up in a copule of rooms, that sort of thing. Then, in 2017, when we finally bought out own place, I started to ramp up my plans. I installed tado smart heating, I bought a SmartThings hub and some sensors, Ring doorbells and floodlights⌠pretty quickly I had half a dozen apps on my phone just to control the basic functions of my house. You can imagine how well this went down with my wife! I did my best to use Alexaâs routines functionality to automate some things (like turning on/off the TV, lights, etc.) but there was no escaping that nothing was really working together very smoothly.
Iâd bought the SmartThings hub as a way to unify platforms and started playing wtih some more advanced scenarios. Let me save you some time - donât bother. SmartThings over-promises and under-delivers. The integrations are poor, relying far too much on community-driven efforts and poor documentation and a complex cloud-based interface. I had to have two versions of the SmartThings app on my phone just to manage everything. Adding devices was frustrating, the list goes on. If this is the best âoff the shelfâ home automation platform out there, weâre really in trouble.
Enter Home Assistant. After chatting with friend, colleague and YouTuber Mark Deakin about our shared interest and frustration with home automation, he suggested I check out Home Assistant. I must admit, at first glace it looked just as complicated as SmartThings and I wasnât sure that it would solve any more problems for me than anything else Iâd tried. Couldnât hurt to give it a go though, right?
Choosing your version
Home Assistant is complicated. Letâs get that out of the way right now. If youâre even a little bit technically minded, patient, and curious then Iâd recommend it. If you like an easy life, turn back now. This is a platform experiencing rapid growth, things change frequently. Documentation isnât amazing, thereâs a lot of assumed knowledge and you will spend more hours than youâd care to researching, troubleshooting and inevitably restoring backup after backup as you change your mind about the right way to do things.
You can install Home Assistant in lots of ways. As a VM, as a Docker container, on a Raspberry Pi, an Intel NUC, and more besides. Each option has pros and cons - this is the first area thatâs poorly documented. In my first attempt I thought Iâd give running it as a VM on Hyper-V a go. I had a home server with enough spare horsepower to host it, I liked the idea of that over âanotherâ Pi to manage, and it seemed to be well supported. WRONG. If you have any designs on using a Zigbee or Z-Wave dongle, or indeed any external USB device give Hyper-V a miss. Initially I didnât think I would need that type of functionality since I was just going to unify my many platforms, but I quickly saw the appeal of âgoing nativeâ and consolidating several cloud-based platforms into one locally-processed one. However, Hyper-V doesnât support USB pass-through, and unless you want to dive into the uncharted territory of trying to attempt USB over IP or other âwork aroundsâ it just isnât a viable option.
Next up, a Raspberry Pi. I had a few lying around from previous projects so I thought Iâd stick in on there and see how I got on. No worries about USB pass-through anymore since it was running natively. Except the Raspberry Pi is underpowered (unless youâre buying one with a decent amount of RAM; I was re-using a RPi 3) and because of its ARM nature, not everything is supported. For example, the rather awesome Visual Studio Code add-in doesnât work if youâre hosting on a Pi. This was frustrating because I felt that this early disappointment would be a warning of more to come. Not to mention the non-existent power-management features on the Pi (when the power goes, it just cuts out), the fact that the SD card will take a beating due to all of the logging that happens, and that without a graceful shutdown thereâs increased risk of corruption and problems re-starting after an outage. There had to be a better way. Damn you Hyper-V and your lack of USB pass-through support!
On to VirtualBox. After a bit of reading up, VirtualBox seemed like it would do. I could still have my VM, but Iâd have to make the switch from Hyper-V on my server, to VirtualBox. No big deal really since it would be the only VM on that box. After some early false-starts I felt I was finally onto somethingâŚ
Turns out, USB pass-through is a pile of crap. Almost every day, despite having put the necessary configuration in place, I was having to restart Home Assistant or re-attach the dongle just to get it working. Turns out that even though VirtualBox supports pass-through, itâs notoriously unreliable and unless youâre going to run a type 1 hypervisor like ESXi, Proxmox or similar, youâre going to hit issues. âTo hell with thisâ, I thought. So instead of finding yet-another-platform for hosting Home Assistant, I sought ways of taking out the Zigbee and Z-Wave functions and handling them another way (it crossed my mind for the briefest moment that maybe trying to ditch Hue and SmartThings was a bad idea). In the end, I ran deCONZ natively on the server, and used an external integration to bring it into Home Assistant. I set up the Z-Wave integration on a separate Pi through Docker, bring it in externally as well. This worked well for a while.
Prepare to design and re-design many times
After getting VirtualBox settled, the Zigbee and Z-Wave integrations handled, and Iâd calmed down from my rage at having to start over so many times, I set about unpicking the numerous platforms and rationalising down to as few as possible. Through this I managed to entirely remove SmartThings and Philips Hueâs bridge from my setup. With the exception of my tado heating system and my Logitch Harmony Hub, I have no other bridges or third-party hardware reliance to communicate with any of my sensors, appliances, lights, and so on. Itâs all integrated and controlled through Home Assistant.
If you choose the same route, and I recommend it because it simplifies things overall, be prepared to re-write automations, re-configure dashboards and generally keep re-configuring your environment as device names change, integrations change and so on. It will take weeks, if not months, for your environment to âsettleâ. One excellent feature of Home Assistant (through the Home Assistant Operating System at least) is the backup and restore confiruation capability. Backup often, restoring is easy enough and it saves a lot of pain.
Have patience and faithâŚ
The learning curve for Home Assistant can be steep, but if youâve got a âgrowth mindsetâ approach to learning and you like solving challenges then as frustrating as it can be, itâs also a lot of fun. Itâs also a slippery slope. Scratching the surface of what can be done caused me to spend more money that Iâd expected buying more sensors, switches and lights as I became excited at the idea of automating ALL THE THINGS.
Current setup and top tips!
As I write this post, Iâve upgraded my old home server to a new QNAP NAS (a story for separate post). Home Assistant runs as a VM hosted on Virtualization Station, with Zigbee integrated directly using USB pass-through. Z-Wave is handled via the NAS through Container Station and is integrated externally. As part of a wider exercise I now have no Raspberry Piâs running home automation or other workloads. Even things like Pi-Hole are now containers on the NAS.
My tips for anyone looking to start playing with Home Assistant:
-
Accept that the first several attempts are likely to be written off and re-done. Donât become disheartened that it isnât a set-and-forget experience. It takes patience, practice and determination to make it work.
-
Whilst it can be difficult, try to think about your longer term needs. If you know that youâre going to invest further into home automation, consider investing in decent hardware to host it on. You can run it on low-power devices, you can compromise on functionality, but I think youâll be disappointed. Budget for something decent.
-
Youâre going to learn a lot as you go. Personally, Iâve learned a lot about virtualisation, containers, Linux, reading error logs, how Zigbee and Z-Wave mesh networks work, Letâs Encrypt, and more. Bookmark all the URLs you find useful because invariably youâll go back to them often. I didnât at first and ended up trying to âre-findâ pages by trawling through my browsing history when I couldâve just created a collection of all the useful things I found - such as how to connect to a container and run commands from within it to set up a password file for my MQTT broker.
I have so much more to write about my experience but Iâll stop here for âpart oneâ. Stay tuned for further posts covering how I set up my containers, creating a touchscreen home control panel, why Z-Wave is expensive garbage, and more as I learn. Let me know about your experiences, tips and tricks in the comments.