Home Automation Overview

Ever since I was little I have had (on top of my love for computers in general) a fascination for home automation. In The Netherlands we had a ‘House of the Future’, and my dad got me the accompanying book, which I loved to read and scan through over and over again.

Fast forward to today and it seems, finally, the future is here. Sure, things were possible before, but only if you were either willing to pay big bucks for a rather closed system, or if you were willing to go all DIY (and still pay quite some bucks). Now, especially if you’re not afraid of a bit of tinkering and perhaps a bit of DIY, a lot is possible and kind of affordable. Moreover, a lot of things are inter-operable or can be opened up, which is especially fun if you have a programming background.

Everything seems to come together, many companies develop devices, stores are putting them on the shelves, ads are on TV, WiFi, broadband and 3G are (in western world) ominous, small computers are cheaply available and everyone always has a powerful internet-connected computer with build in touch screen at hand.

From a birds eye view, what are some of the currently available options and exciting features?

In The Netherlands, a company called ‘Klik-aan-klik-uit’ came up with a line of cheap actuators and sensors that operate together wirelessly on the 433Mhz channel. It provides a nice entry to the world of Home Automation, but this cheap price comes with some downsides: communication is ‘send-and-forget’. Sensors only send and actuators only receive so missing a radio message can result in inconsistent situations. Also there’s no security at all.

Z-Wave is a wireless protocol operating on 868.42 MHz (Europe) or 908.42 MHz (USA). Although it’s a proprietary standard licensed by Sigma Designs, other companies are also welcome to build their devices around it. This has resulted in a broad range of sensors and actuators from different brands, all operating together. Z-Wave is bi-directional, and uses a mesh protocol where data can hop a few times before it reaches its destination, enabling a network to span more than the square of the 1-to-1 radio range. Z-Wave requires a central controller, of which there are plenty. Z-Wave.me offers RaspberryPi and USB controller modules, which DIY people can use to interact with the Z-Wave network.

Zigbee is, in contrast to Z-Wave, an open standard. It runs on the 2.4Ghz frequency (same as WiFi and Bluetooth) and also uses mesh technology. Just like Z-Wave, it requires a central unit, which is called a ‘coordinator’. At first glance, at least in The Netherlands, there’s less devices available for Zigbee, and interoperability is not always straightforward (see Hue below). Operating with Zigbee devices can be done using a custom coordinator, such as the XBee shield for Arduino.

WiFi requires more power than Zigbee and Z-Wave, offers higher data rates but no mesh technology (so all devices must be in range of a router, although star designs can of course be made using standard ethernet). Devices can use a lot of readily available protocols but also have to worry about different standards, network architectures, and firewalls in order to operate together. A ‘dial out’ solution can be used where devices find each other at a central server (of the manufacturer) on the internet. This brings of course privacy and security issues.

Because of all this, WiFi is less practical for smaller sensors and actuators that need to be placed in great number (ie per lamp, per door, per room), but more so for devices such as the Nest (thermostat). Interacting with these devices will be different on the software level for every manufacturer (Nest, for instance, has an API available).

X10 is a protocol that a bit older than the others, and original ran over the power lines (on the same lines as the power itself), although it is also used on wireless channels. Because of its age it is a bit slow and limited, especially compared to Z-Wave and Zigbee. It has a more ‘industrial’ user base, and I have not really seen consumer products with this protocol like I have seen for the others.

Turning lights on and off over AC current (230V or 110V) is quite straightforward both mechanically (wall switch) and automatically (relais). Dimming them, without side effects, humming noises or other artefacts is a whole different ballgame. This holds true even for LED’s, as long as the dimming is applied already on the AC line. It’s much better to use DC lamps and dim ‘after’ the AC-DC conversion. Since most houses run AC over the wires up unto the lamp, this poses a problem (because this only allows dimming over AC, which is more difficult).

The Philips Hue lamp solves this by combining LED lighting, AC-DC conversion, dimming and wireless control all inside a single bulb that is powered from the E-27 socket. Hue uses the Zigbee protocol, but a variation of it, which makes interoperating with it on the Zigbee level impossible or impractical (depending on hardware / software versions and who you ask). Instead, one can use a Hue bridge and connect to that over the local ethernet network. It has a REST API available for that, including various SDK’s and extensive documentation.

Hue also has switches and PIR sensors available, but sadly there is still no option in the API to react on their events (except for continuously polling their state, but I don’t think the bridge can handle polling fast enough to monitor multiple switches in a way that makes swift responses possible).

Control center
So now you have these devices in your house, how to interconnect them? Well, some solutions provide their own (simple) ways to ‘wire’ your wireless devices together. The Dutch 433Mhz solution ‘Klik-aan-klik-uit’ for instance has a way to pair actuators and sensors directly together, and the Philips Hue system has an app that both controls and programs the system through the bridge.

One step more ‘in control’ would be to buy a device that acts as a ‘heart’ of your system. Inside will be a computer running some pre-installed software, probably with a web interface through which you can configure your system and make rules for it. Some of these central units only work with a single protocol, such as the BeNext with Z-Wave, others can connect to devices with different protocols.

One step further is to ‘build’ the device from the previous step yourself (well, combine a few hardware parts, such as a Raspberry Pi and a Z-Wave module) and run some open source software (such as Domoticz) on it to basically make the off-the-shelve device described in the previous paragraph. Different software modules can be also added, for instance to integrate the Hue lamps.

Myself I am going yet one more step further, because I’d rather program than tinker with existing software that more often than not misses exactly that feature that I would like to see. Therefore, I’ve setup a Raspberry Pi a MQTT broker. This is a lightweight messaging protocol to which others can subscribe and publish. All I need is to make bridges between every different platform and MQTT, and some software that will do some reasoning based on one MQTT subscription and publish the result to another (I could use Node-RED for that, but perhaps I’ll just build it myself). There’s already quite some building blocks available, such as free apps that report your phone’s location to an MQTT server of your choice, offer (Apple) Home Kit integration, C libraries for Arduino and the likes, etc. I’ll describe this setup in more detail in a separate post.

Voice recognition
To bring Star Trek, and probably many other SciFi worlds, be bit more to life, controlling your home with your voice would be a cool thing! There’s roughly two ways to get the audio in: nearby mic (ie your phone) and far-field mics (that hear you from across the room). There’s also roughly two ways to process the audio: locally (in your home), or remotely (at the servers of a company you may or may not fully trust). Currently not all combinations of the above are readily available.

Picking up your voice throughout the room over background noise has currently (to my knowledge) only been demonstrated with the Amazon Echo (and Echo Dot), and the Google Home. Both process data remotely, and have mics always on, which may be a privacy concern. I for one would not mind, but they’re not yet available here.

Voice recognition on your phone is much less cool. Although ‘Ok Google’, may have some custom integration options, Siri comes equipped for home automation out of the box, as long as your setup supports Home Kit. Another solution I want to look into is Tasker (an Android app), combined with plugins for voice recognition and MQTT messaging.

In conclusion
It’s clear that a whole range of home automation devices are flooding the market. You can either lock yourself into one brand (such as Philips Hue), one protocol (such as Z-Wave) or – with a bit more technical knowledge – build a system that integrates multiple systems. Especially the latter approach is in my opinion now, and only just now, feasible. Not being locked in and being able to add a bit of your own hacking and tinkering to a system that otherwise consists of off-the-shelve components convinced me to, after all these years, to make my home into what in my childhood was predicted as the future.

Leave a Reply

Your email address will not be published.