Well hasn’t 2021 just flown by! Amongst changing jobs (again) and buying a house, there’s been very little time dedicated to my side projects such as The Serpent. That is until I recently discovered Home Assistant!
Now that I can actually drill holes, run cables, install AP’s in the roof and all sorts of other crazy DIY opportunitues I’ve never been afforded, I decided to look into the growing space known as home automation. It’s been around for sometime in the form of Alexa, Philips Hue and Samsung Smartthings, but I knew there was a lot more to it, and that got me thinking about how it can be done securely and with style!
There’s a lot of expensive ways to do Home Automation. Heading out and buying everything smart from Philips, Samsung, Google etc will give you a pretty awesome home, but you’re very likely to run into a problem of old - lack of compatibility. If you’re going to spend £15 on a lightbulb, you’d better make sure it works with everything else.
So I started looking into the community’s answer to this problem. It didn’t take long to find a massive, yet still growing and widely adopted hobbiest culture around Home Automation, centered around a platform known as Home Assistant.
The goal is to create a Home Automation solution that’s pretty cheap, extremely customizable and fun to build. So far it’s certainlly ticking those boxes, and I plan to create a lot more content for this site focused on it (so much so I’ve even created a new category!). I wanted my first project to be something useful, so I created some small sensors used for monitoring temperature and humidity around the house.
Sure you could by a £30 temperature sensor and connect it via Wifi, but my new project has two main goals:
- Be really, really cheap
- Don’t overload the WiFi which cheap Chinese components
To fulfil the first goal, I decided I’d have to avoid the market leading solutions where possible, and to buy the components myself. It’s amazing how cheap the core parts of a sensor or switch really are. For example, from AliExpress, for less than £1, you can get yourself an AHT20 Temperature & Humidity sensor which is compatible with Home Assistant and ESPHome, providing quick and easy programming (more to come on that later).
The second goal took some thought. There’s plenty of devices wanting to get on your wifi, and if you’re still using the standard ISP router, it won’t be long before that poor thing is on fire. Our Wifi setup is pretty, but I wanted to let it focus on Disney+ streaming for 8 hours a day, rather than having dozens of small powered devices taking up little amounts of bandwidth.
ZigBee to the Rescue
Fortunately there’s a solution… an IoT solution! It’s time to check out some of these IoT protocols we’ve been hearing about. There’s really only a few to choose from:
- ZigBee (my choice)
Eventually, Thread will be the way to go, it’s being cooked up right now by an alliance between the top hardware vendors and many other companies, and will be compatible with ZigBee until it takes over. Z-Wave doesn’t seem to have as much market share in Europe from what I can tell, despite having better range across long distances. ZigBee has higher throughput and a lot of support.
However there’s one major drawback with IoT protocols - Because they don’t operate on the Wifi network, yet still rely on radio communication - they require their own dedicated hub. Like the components themselves, these can cost over £100 for a branded Philips, Bosch, or Samsung hub. But agian, the actual ZigBee chip you need, is realitvely cheap and can be installed in a USB stick (for example, the RaspBee II or the ConBee, both of which are around £20 - £40).
The branded ones will work too, and it just so happens I have an old Samsung Smartthings hub laying around from some previous testing, so for the time being, I’ll be using that. It does have a a major downside of being reliant on the cloud.
Raspberry Pi’s Still Got it
For now however, I want to get the basics of electronics refreshed in my head, so I fired up whatever Raspberry Pi still worked and connected my new cheap sensor to the GPIO pins:
I won’t be relying on the Pi’s too much going forward, mostly because I have a bucket of dead ones (they don’t seem to last longer than a year). But they make for good development platforms, especially the Raspberry Pi Pico - a tiny microprocessor with lots of features packed into it, including MicroPython.
Also on the ship over from China are some NodeMCU ESP32 modules. These tiny little chips contain built-in Wifi but also have extensive libraries within ESPHome, making them super easy to program. It’s likely I will settle on these as the main microprocessor to power most things.
That is until Espressif release their new ESP32-H2 microprocessor, which contains built-in ZigBee!
Stay tuned for lots more content around Home Automation (assuming it works!) and also tips on how building your own can really save you some cash. And for those components that need a bit of money spent on them (e.g. screens, lightbulbs) - I’ll look into which ones seem worth their price tags.
|Posted September 22, 2021||Tweet|
|Written by John Payne|