birds like wires


Security, Energy and Home Automation

'Setting up alertme' by bjdawes on Flickr

Everybody loves a bit of home automation, don’t they? Traditionally, geeks such as myself would be toying around with X10 modules, which provide a mature platform for automating pretty much anything in your home. But if X10 isn’t your thing, there may be an alternative.

Here’s my admission. I never figured X10 out. If I’d bought a few modules and started playing I’d probably have got a lot further, but I always held back because of the price of the modules and the fact that I already use powerline communication for ethernet, and didn’t really like the idea of putting more interference into my mains supply.


Not long after we moved into our house, we realised that the burglar alarm was useless. The charging circuit was completely burned out, the battery was leaking, the control panel was a squashed mess (mostly the four keys that made up the code) and nobody ever pays any attention to a burglar alarm going off, other than to get grumpy about the noise. I looked at a number of alternatives, including some very interesting units with GSM modules that could send and receive text messages. But they were super-expensive and required an approved installer with the proprietary programming app on their laptop. The pennies and the ethos didn’t add up for me, and the wall controllers were ugly.

Then, one morning, I was listening to Digital Planet and heard Bill Thompson discussing a system called AlertMe that they’d been testing. Back in those days it was purely a security system with ambition, but it sounded good and the website contained the magical letters: API. Oh, and the magical word: discount. :)

Early AlertMe

I snuck in to the AlertMe club just in time, from my point of view. These days all of their systems require a (relatively modest) monthly fee, but the original ‘Starter Pack’ is a PAYG item, so I just need to top up the text message fund occasionally. The pack arrived containing one motion sensor, one keyfob and the Starter Hub, which doesn’t contain the GPRS or battery backup of it’s (identically sized) big brother. Connecting it to the little UPS for our router skirts around that issue for me. I bought an extra keyfob too, because I’d rapidly become unpopular if I was the only person able to arm or disarm the thing. All of these components chat using an implementation of the wireless protocol ‘ZigBee’, and pairing of devices with the hub keeps their network private.

It took very little time to get up and running, so I spent most of the rest of that evening pretending to be a burglar and setting the thing off. It’s been very reliable over the past year, sending SMS messages to us only when there’s a genuine intruder alert (always me), except when it went crazy because the motion sensor battery died. A warning on that would have been nice. But in them days that was pretty much where the fun ended. The API (which turned out to be a web API to AlertMe’s servers, rather than a direct hook into the box itself) was good, but other than arming and disarming there wasn’t a lot else to do.

AlertMe Energy

Then something happened. Everybody went climate crazy. I’m not going to wade into that overheated debate here (oh, what a pun), but suffice it to say that AlertMe received £8m in investment, development got a shot in the arm and security took a slightly back seat. After all, once you’ve got motion sensors, window sensors, panic buttons and funky lights, where else do you go?

Suddenly SmartPlugs appeared. Then the PowerClamp turned up (they don’t call it that these days, but I still do). There’s even a heating controller in the offing; and you can put me down for one of those if you’re reading this, AlertMe.

I’m not a great fan of the line “smart energy systems will save you money”; I believe that if you’re the kind of person who’s going to buy such a system, you’re probably the kind of person least likely to need it. Regardless, the important thing for us nerdy folk is that the API was updated.


Let’s get the biggie out of the way first. Some hardcore tecchies will be disappointed that for normal use everything needs to be configured using the AlertMe web GUI shown on the right. It’s all drag-and-drop, which is great for quickly putting trigger-response actions in place, but don’t expect to be tinkering with any config files; the hub is pretty locked-down. This means that for in-hub actions you are always limited to what you can arrange in the GUI, so conditional if/then statements (ie. if plug X is on when setting Night Mode, don’t turn plug Y off) are a bit limited at the moment. This is compounded by the rate-limited web API, which is inevitably slower and less reliable than direct access.


Once you get used to the fact that you have to talk to the hub in your hall via servers in Cambridge, you might want to take a peek at AlertMePI. This is a Perl interface to the AlertMe API that I put together. Please don’t laugh at the code. Install a Perl module or two (there are instructions) and you’ll get simple command line access to your AlertMe system.

Where you take it from there is really up to you! I won’t duplicate the AMPI instructions here, but you can grab temperature readings from any device (the smartplugs are inaccurate as they produce their own heat, but AMPI crudely tries to correct for this), check who’s home and for how long, turn smartplugs on and off, check the hub log… pretty much anything. Oh, and it can output XHTML, so you can feed the result straight onto a web page.

That last option I mentioned, checking the hub log, is even more useful than you might first expect because of one handy feature in the web GUI. The hub can be set to add a particular log event when something happens (eg. motion sensor triggered when in Home mode). You could poll the API and watch for this log entry, and then build up any combination of interesting outcomes.

So far I’ve used AMPI to add features to the slimline iPhone interface I made for our little home server, making it quick to check up on battery levels, set the alarm or turn things on and off from anywhere I can get a data signal. I’ve been pretty pleased with it, so I hope you find it handy too.

In case you were wondering: I have no vested interest in AlertMe, I just happen to think that their product is particularly good and thought it deserved looking at from a more tecchie angle than usual.