The Home Automation Hub Project

The Home Automation Hub  Project

Submission by Derek Kennedy: Why the Home Automation Hub?  I’ve always been keen on the notion of Home Automation, but two factors put me off getting started.  One, the cost of a decent HA controller (and I don’t mean a 24×7 PC).  Two, She Who Must Be Obeyed hates wires running around the place.

So, I worked with a friend to develop a low entry cost HA controller which we call the ‘Home Automation Hub’ (or HAH). We are now nearly two years into the project; it has taken a lot of effort (especially on the software side) but has been great fun.  Best of all it’s based on a re-purposed WiFi router that can usually be purchased on eBay for around £10.

Getting started – The first thing that was done was to create the project Wiki which we’ve used to track all ideas and work done.  Time was taken to replace the Operating System on the unit with one which we have ALL of the source code for (and open source back to the community). The unit runs the BusyBox mini-unix kernel. Auto-update of firmware from our website was also implemented.

Then, we started to think about what to control and monitor. Keeping the SWMBO ‘no wires’ thing in mind, we experimented with controlling RF mains sockets via a custom built micro and RF transmitter. After some work with our ‘scope and on a MEGA8 development board, we had code to control these which are very reliable in operation and with a good range too.

Brett, my software guru friend, started to architect the core functions on the HAH. He does this stuff very thoroughly. We were keen to use ‘open standard’ protocols, so that the HAH can plug and play with other HA kit. Brett quickly found xAP – a cool broadcast based HA protocol. All ‘modules’ on the HAH are fully xAP compliant.

Custom Hardware – The link between our ‘custom hardware’ and the core router hardware is via the serial port on the router. Not many routers expose a serial port, but fortunately this model does.  Next I designed a small PCB that would fit inside the router case. This adds four inputs, four relays, the RF transmitter, an LCD, an I2C bus and a 1-wire bus for reading upto 16 x DS1820 temperature sensors. We sent this off for manufacture and fortunately, the board that came back worked 1st time without any track alterations.

The HAH connects to your broadband router and gets its IP address via DHCP. The allocated IP address is displayed on the LCD, so you know where to point your browser at. My Sherline CNC desktop mill was ideal for cutting the aperture in the router case for the LCD.

The cool software – Meanwhile, Brett turned out code like a man possessed. The browser based UI started with a couple of simple pages to allow the RF remote sockets to be controlled, the values of the inputs to be read and the relays to be driven. Temperature readings followed soon after this. Pics of the UI are here.  An xAP adaptor was developed to talk to our custom hardware. A Current Cost support module was developed to allow electricity usage to be tracked. Then an xAP to Pachube module allowed the unit to log all datastreams up to pachube.com Scheduled control (rather than via the UI control) was next. An xAP to Google calendar module allows the unit to be driven via events in a Google calendar.  Twitter seems to be all the rage these days, a twitter module allows control of the unit via tweets. Of course, the BusyBox OS allows the sending of emails too.  The unit can also send SMS messages – just plug in a Nokia phone.  We have ‘Wake on LAN’ support too. Great for reducing power by having PCs go to standby until you need them.

The Home Automation Hub Project

HAH interfaces overview

Custom scripting – With all these modules in place, there seemed to be a need to allow interactions between the modules. e.g. if the temperature on sensor on goes over 25C, send an email alert; if the heater has been on for more than an hour, turn it off; when input one closes turn off all RF switches. The ‘plugboard’ module, with its easy to use scripting language allows all of this sort of thing.

Practical Use – In practice, it all works very well, solid and reliable in operation. Pretty ‘green’ because we reuse an old router that might otherwise be thrown away and it only draws 6 Watts of power, so not expensive to run.  I do keep an eye on temperatures in my basement workshop and can turn heating on ahead of arriving home. I can also get a tweet if somebody leaves the fridge door open. A dawn/dusk sensor, connected to an input line, allows me to script that lighting be switched on.  SWMBO is happy since the unit (with the 1-wire bus connections and the other ‘wired’ sensors) sits in the basement. The RF mains sockets mean little wiring is needed around the house.

What’s next for the HAH – Well, things aren’t so frantic now. Brett and I have lots of day-job commitments. I’m tinkering with a RF receiver subsystem idea. This would use the xAP Bridge (which Brett has already coded) to hook up to the HAH.  We’ve tried to document everything in as much detail as is needed to allow others to make up their own HAH – hard to know if anybody has done this.  Would be happy to hear if anybody thinks this a worthwhile effort. Messages can be left on the HAH forum or on the AutomatedHome.com comments below.

Home Automation Hub  :  LiveBox on eBay  :  xAPAutomation.org

Want More? – Follow us on Twitter, Like us on Facebook, or subscribe to our RSS feed. You can even get these news stories delivered via email, straight to your inbox every day

7 Comments on "The Home Automation Hub Project"

  1. Very cool 🙂

  2. This looks like just what I need, where can I buy one?

  3. agreed very nice if it does what it says on the tin. where can we get one and crucially how much?

  4. I got mine from my local Freecyle group so cost me nothing 🙂
    When I last looked there were a few on ebay – all sold for under £15 with most well under £10.

    I haven’t re-flashed it yet so can’t comment on anything else.

  5. Yes, eBay is the place to get these. Don’t pay more than £15 inc delivery. If you want a ‘pre-reflashed’ unit, you should read the article thoroughly – there is a link to the project wiki. Look at the wiki for the link to the site where these can be ordered.

  6. Hi, as Derek knows I have already purchased the HAH kit and I am waiting on it eagerly so I can put my rusty soldering skills back to use.

  7. Well, kit was delivered, all components soldered together. And it works first time.

    Great design, now I can turn the Kids PC and TV off at bed time, even when I am away on business….

    Regards

    Mean Dad

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.