Tag Archive: Home Automation

Despite still having a handful of unfinished projects I decided to take the plunge and have some solar panels installed. I found a local MCS accredited installer MAH Solar Solutions and in no time had the kit up and running. My house faces east/west so I have 8 panels on each side.


The panels are Canadian Solar 250W, total 16 to form a 4KW system fed into a Aurora ONE/PVI 3.6 inverter in the loft.


The solar install was the perfect opportunity to finally replace my ancient fusewire consumer unit. Which got me to thinking of ways I may be able to better monitor my energy consumption. I hoped to find “a magical fuse box” but hours, days, weeks of research and the best solution I could come up with were DIN rail mount KWH meters.

Unfortunately no amount of searching could find a single image of the KWH meters in use or a diagram of how to wire them in a consumer unit. Instinct told me to have each meter mounted alongside each breaker, but this would prevent me from using the busbar. Then I thought about mounting them upside down, but this would cause similar issues and mean running the neutral far too close to the busbar! The next idea was to either mount 2 consumer units side by side, having the breakers in one and the meters in the other… Then I found some information about twin/dual rail consumer units which seemed like a winning idea.

MAH Solar Solutions were to be installing the new consumer unit and despite having never seen or used the KWH meters before they were more than happy to install them. They came up with the idea of mounting the meters at the end of each block of breakers. With a big enough consumer unit this meant the busbar could still be used. I will try and add some diagrams and more images at a later date.


I’m still working the best way to read so many pulse counters simultaneously and log/process the data. Currently http://openenergymonitor.org/emon/buildingblocks/12-input-pulse-counting looks like one of the most promising, but I will need to start from scratch with a way to count, store, transmit etc. So for the time being I decided on the fluksometer which can handle 4 pulse inputs- which will do for now: mains, solar, oven & gas meter.


The flukso service itself provides quite nice graphing- you can see here my mains consumption (blue), oven consumption (green), solar pv generation (red) and gas consumption (orange).


Which feeds nicely to pvoutput.org.


You can see the rj11 cable coming out of the gas meter (to the fluksometer). The purple cable runs from the RS485 port on the inverter in the loft. I am waiting on a USB to RS485 device so I can start pulling some detailed data using Aurora Monitor or similar.


I understand the fluksometer has an onboard RFM12B configured on the 868Mhz band to understand communication from jeelabs devices- which is ideal as I meter my water using jeenodes.


I just don’t know how to get them talking… yet!

An update on my latest project

Further to: https://tickett.wordpress.com/2012/12/31/a-new-year-a-new-project/ I have discovered quite a few things, and it looks like I’m not going to have to start from scratch (although I may still be designing some form of hardware, it’s hard to tell at this point).

Existing projects/products set out to do something similar:

NPlug- http://www.indiegogo.com/projects/283102/x/2060579

  • Consumption measuring (believed to be more accurate than existing devices)
  • Remote switching
  • WiFi connected (requires no bridge/gateway device)
  • Zigbee 802.15.4 for connecting to other devices
  • USB option (add 3G dongle, additional RF interface etc)
  • SoC running OpenWRT Linux
  • Open source
  • Lots more…
  • £100 (estimate)

This is really meant as a single device and not to be used with every appliance in the home. The device acts like a gateway itself and aims to connect to existing consumption/switching devices such as the IRIS / AlertMe suite.
I have pledged as a sponsor for this project, and hope to get my hands on a prototype- however, the funding has been a bit slow, so please help out :)

AlertMe (IRIS)- https://www.alertme.com/shopping

  • Consumption measuring
  • Remote switching
  • Zigbee
  • Requires the SmartEnergy pack as a bridge/gateway to the internet
  • £25

Ubiquiti mFi mPower- http://www.ubnt.com/mfi#m-Power

  • Consumption measuring
  • Remote switching
  • WiFi connected (requires no bridge/gateway device)
  • Comes in 3 flavours: Single, 3 socket extension cord and 8 socket extension cord
  • Only currently available with US / EU plugs
  • No EU stock currently available (when it is, I will try one with a UK plug adapter)

Belkin WeMo Switch- http://www.belkin.com/uk/c/WSWH

  • Switching only by the look of it
  • WiFi connected (requires no bridge/gateway device)
  • £40

Meter Polug- http://www.indiegogo.com/meterplug/x/2060579

  • Consumption measuring
  • Remote switching
  • Bluetooth only- so unless you’re within range and carrying a bluetooth equipped device, it’s not much good. This being said, the project has been fully funded, so there is clearly demand for such a device.
  • I have asked whether they’ve considered building a gateway device to enable internet connectivity but yet to hear back. Fingers crossed.


  • I have purchased a USB Zigbee packet sniffer in the hope that I can make sense of some of the traffic floating around my house from various “smart” gadgets.
  • Still waiting on delivery of my EVE Alpha board- http://www.kickstarter.com/projects/ciseco/eve-alpha-raspberry-pi-wireless-development-hardwa this should allow me to start doing some cool stuff with a raspberry pi using the gpio pins rather than dozens of USB sticks!
  • The guys over at flukso have confirmed that they will be continuing work on their enhanced hexabus plug once they have another project out of the way: https://www.flukso.net/content/hexabus-plug
  • I sent some details to a few companies in an attempt to understand costings for PCB design, production and assembly. Just one company has responded to date: http://www.newburyelectronics.co.uk/ – for something like the Hexabus plug they’re suggesting (rough figures): £1,000 PCB design (£500 each of the 2), £80 PCB production (£40 each of the 2), £60 parts (excluding several parts they can’t source), £130 assembly & inspection. Bringing the total in at about £270/device (forgetting PCB design)- ouch!

That’ll likely be my last update for a few weeks, as I’m off to Thailand shortly :)


A new year, a new project

*EDIT*: Update on this project https://tickett.wordpress.com/2013/01/10/an-update-on-my-latest-project/

So I realise I have been a little quiet on here lately, and so will make it my new year’s resolution to get back in the habit of blogging regularly.

I would like to share some details of a project I’m assessing for feasibility. It is yet to be named but in essence I’m looking at building an Automated Mains Plug / Socket, let’s call it aPlug.

What do you mean by automated?

  • Remotely switchable / “programmable”
  • Monitor / log power / energy consumption

Don’t these already exist?

  • A lot of rf controllable plugs exist but there are a number of limitations- # cannot integrate with other equipment, # cannot operate from outside of the home, # cannot operate without the supplied remote, # cannot determine current state
  • Some power / energy consumption monitoring plugs exist but again, bare limitations- # cannot integrate with other equipment, # require a gateway device to post data to the internet
  • A few devices even exist which address both requirements but- # cannot integrate with other equipment, # cannot operate from outside the home, # require a gateway device (possibly even an entire pc to post data to the internet), # are expensive, # are closed source

There is however, one possible hope! The hexabus plug: http://signup.hexabus.net/ – I am trying to make contact with the guys behind the hexabus plug to determine where the project is currently, where it’s headed etc. Regardless, the great thing about the project, it is open source- which means the schematic / parts list (BOM) have been published: https://github.com/mysmartgrid/hexabus – unfortunately the PCB layout doesn’t appear to’ve been, but again, I’m hoping it will be shortly.

This project has also sparked the interest of the guys over at flukso, and became the center of a talk at one of their meetings: https://www.flukso.net/files/presentations/flukso.20121026.hack_hexaplug.pdf – where they have suggested a minor tweak to enable interconnectivity with jee labs devices (they include a PCB layout, which suggests they likely have them- I am trying to make contact with them too!)

Even if I manage to make contact and get details of the existing device I still have a lot to tackle…

Network connectivity
I’m currently looking at options, but it makes sense to try and learn from the lessons the guys behind LIFX: http://www.kickstarter.com/projects/limemouse/lifx-the-light-bulb-reinvented
They have essentially gone down the route of creating a mesh network with “slave” devices, then using a “master” device to bridge to the local area network (LAN) and essentially the internet. This ultimate is a gateway device but “in disguise”- and unless I can miraculously find a way of driving down the cost I can’t see any other approach being feasible?

I am making contact with a number of companies who design, produce and assemble printed circuit boards (PCBs) as a number of the components involved in the device cannot be soldered by hand nor can the circuit(s) likely be built using a simple breadboard. I imagine this is going to be a real challenge as the cost for “one-off” or very limited production runs is likely to be extremely high.

Software / Firmware
I have coded some simple arduino / atmega programs in the past, and worked with some of the jeelabs devices but I will certainly be needing assistance to build something as complex as this if it’s going to be robust enough to put “out in the field”. My hope is that developers will show a keen enough interest and we can build something as a community. The devices will be reprogrammable so new firmware can be flashed with relative ease. The problems will come when a hardware change is required…

Regardless of whether a device is faced with mains voltages or whether a device is aimed at developers I anticipate some form of certification being required- this could be tricky (especially on an evolving device).

To gauge interest, boost funding, promote the project and hopefully attract some developers, testers and contributors I would like to run a kickstarter project- unfortunately it’s a little chicken & egg as I need at least some form of prototype before I can reach out to the community. I have however drafted a project so I am prepared if I do get that far: http://www.kickstarter.com/projects/tickett/736265394?token=98a4e52f (so far just some notes, and the reward levels are pure guesswork).

I just knocked the artwork up from a few google images:

I have asked someone to design some artwork for a t-shirt, so I will see if they can come up with a cool concept :)

Where Next?
Yes, it’s far too early to be thinking about that, but I can’t help it!

  • Multi socket extension lead type device with individual socket switching and consumption monitoring
  • aSocket, essentially a mains socket with the device inside so no “plug” is required
  • Other plug types (I am based in the UK so this is where I intend to initially focus)

At this stage I’d appreciate any feedback, or expressions of interest etc

Happy new year to all


At long last I found the time to get Gambas2 compiled and running on Raspberry Pi with Raspbian Wheezy and DomotiGa (http://domotiga.nl).

Things were made extra hard by my determination to not expand the 2GB rootfs so I had to strip some stuff out- but it does mean you can restore to any SD card 2GB or larger.

SSH is enabled but I didn’t put vncserver on this time.

I didn’t document the process- but essentially kept trying to


gambas2 and each time an error came up I used http://www.debian.org/distrib/packages to try and determine what I needed to install. Because of the lack of free space I had to wget and

dpkg –I

to install many of the packages- I couldn’t use


. I used

df –h

to check on free space as I went and

find / -type f -size +5000k

to find and remove large files (cache/docs etc).

Shell login: pi
Shell password: raspberry
Mysql root password: raspberry





Please let me know how you get on!


Thanks to ADH Heating Services I now have jeenodes counting pulses from my mains cold water supply:

Boiler hot water outlet:

And gas meter:

The pulses are being pulled into DomotiGa:

Which allows me to graph with RRDTool:

I also created my own module for DomotiGa to hook up to my custom 433Mhz RF receiving jeenode- I now have my window/door sensors (along with a bunch of rogue devices?) appearing:

I’m not best sure how to tackle the fact that the devices don’t issue an idle command when the alert has finished (i.e. when the door is closed or the fire is put out?). I’m considering trying out the built in DomotiGa feature to revert the values after 1minute or so (the smoke alarm should continue to send data whilst the alarm is being sounded so this shouldn’t be a problem).

I’m still troubleshooting a few problems- for example USB serial ports failing to open with error: "Cannot open serial port (#5)":

And some jeenodes going offline. Hopefully I will have more time to look into this later in the week.


Home Automation Update

Not a lot to say- just a quick update. I’ve ordered a few more bits to add to the home automation project. These have already come:

-RFXCom 433Mhz transceiver
-Byron 433Mhz switch, pir, remote plug/socket & "in ceiling switching module".
-Linksys SPA3102

And I’m still waiting for (or haven’t ordered):

-433Mhz smoke alarms
-433Mhz doorbell
-433Mhz door/window open/close sensors
-Wifi or 433Mhz bathroom scales

Here’s a quick shot of one of the raspberry pis hooked into a little portable LCD, the RFXCOM transceiver, the CurrentCost EnviR and a Jeelabs Jeenode:

The next step I decided to tackle was getting a few real basics pieces of information from my Enigma2 digital satellite receiver into DomitiGa. I decided to use the nifty little shell script module to execute:

rm current
wget -q
cat current | grep "Name:" | sed 's/.*: (.*)<.*/1/'
cat current | grep "Title:" | sed 's/.*: (.*)<.*/1/'
cat current | grep "Recording Status:" | sed 's/.*: (.*)<.*/1/'

Which returns three lines with: The current channel, programme and whether a recording is in progress. I hope to take this a lot further and start capturing stats from my VDSL & ADSL modems, fileserver etc. You can see the satellite details below "Sky: Lounge":

I have been meaning to get my gas meter, hot & cold water monitored for a long time. The gas meter is relatively straight forward as it provides a convenient RJ11 socket with pulses- I just needed a sketch to load onto a jeenode to catch and report these pulses. I decided to try the sketch from the OpenEnergyMonitor project (http://openenergymonitor.org/emon/emontx) found here: https://github.com/openenergymonitor/emonTxFirmware/tree/master/emonTx_Pulse

I made some changes:

-Set freq to 868Mhz
-Set nodeID and networkGroup
-Unset UNO

I think that’s it:

EmonTx Pulse example

An example sketch for the emontx module for
CT only electricity monitoring.

Part of the openenergymonitor.org project
Licence: GNU GPL V3

Authors: Glyn Hudson, Trystan Lea
Builds upon JeeLabs RF12 library and Arduino


#define freq RF12_868MHZ // Frequency of RF12B module can be RF12_433MHZ, RF12_868MHZ or RF12_915MHZ. You should use the one matching the module you have.433MHZ, RF12_868MHZ or RF12_915MHZ. You should use the one matching the module you have.
const int nodeID = 2; // emonTx RFM12B node ID
const int networkGroup = 212; // emonTx RFM12B wireless network group - needs to be same as emonBase and emonGLCD needs to be same as emonBase and emonGLCD

const int UNO = 0; // Set to 0 if your not using the UNO bootloader (i.e using Duemilanove) - All Atmega's shipped from OpenEnergyMonitor come with Arduino Uno bootloader
#include <avr/wdt.h> // the UNO bootloader

#include <JeeLib.h> // Download JeeLib: http://github.com/jcw/jeelib
ISR(WDT_vect) { Sleepy::watchdogEvent(); }

typedef struct { int power, pulse, misc1, misc2; } PayloadTX;
PayloadTX emontx; // neat way of packaging data for RF comms

const int LEDpin = 9;

// Pulse counting settings
long pulseCount = 0; // Number of pulses, used to measure energy.
unsigned long pulseTime,lastTime; // Used to measure power.
double power, elapsedWh; // power and energy
int ppwh = 1; // 1000 pulses/kwh = 1 pulse per wh - Number of pulses per wh - found or set on the meter.

void setup()
Serial.println("emonTX Pulse example");

rf12_initialize(nodeID, freq, networkGroup); // initialize RF

pinMode(LEDpin, OUTPUT); // Setup indicator LED
digitalWrite(LEDpin, HIGH);

attachInterrupt(1, onPulse, FALLING); // KWH interrupt attached to IRQ 1 = pin3 - hardwired to emonTx pulse jackplug. For connections see: http://openenergymonitor.org/emon/node/208

if (UNO) wdt_enable(WDTO_8S);

void loop()
emontx.pulse = pulseCount;
pulseCount = 0;
send_rf_data(); // *SEND RF DATA* - see emontx_lib
emontx_sleep(10); // sleep or delay in seconds - see emontx_lib
digitalWrite(LEDpin, HIGH); delay(2); digitalWrite(LEDpin, LOW); // flash LED

// The interrupt routine - runs each time a falling edge of a pulse is detected
void onPulse()
lastTime = pulseTime; //used to measure time between pulses.
pulseTime = micros();
pulseCount++; //pulseCounter
emontx.power = int((3600000000.0 / (pulseTime - lastTime))/ppwh); //Calculate power

void send_rf_data()
// if ready to send + exit loop if it gets stuck as it seems too
int i = 0; while (!rf12_canSend() && i<10) {rf12_recvDone(); i++;}
rf12_sendStart(0, &emontx, sizeof emontx);
// set the sync mode to 2 if the fuses are still the Arduino default
// mode 3 (full powerdown) can only be used with 258 CK startup fuses

void emontx_sleep(int seconds) {
for (int i=0; i<seconds; i++) {
if (UNO) wdt_reset();


Last post today, I promise!

After my breakthrough earlier getting gambas2 working in debian on one of my Raspberry Pis, then getting DomotiGa running I’ve managed to hook a jeenode up to the pi running the rf12demo sketch and it’s automatically picked up my jeenode running the roomnode.3 sketch:

So much to do, so little time!

The great thing is the data is now being stored in mysql hopefully in just the right way to allow the sort of querying & reporting I want to be able to do (and the main reason I ditched home automation hub).


Now my 2nd Raspberry Pi has turned up I can (re)start work on my home automation project.

Previously I’ve setup a wireless sensor network (WSN) comprised of a number of jeenodes (http://www.jeelabs.org) using the RFM12B to connect back to central jeelink usb plugged into a repurposed orange livebox router (running http://www.homeautomationhub.com). Additionally I installed a number of CurrentCost individual appliance monitors (iams) and a EnviR energy monitor plugged into the home automation hub (hah) to monitor and log household and appliance level energy consumption. Refer to some old blog entries: https://tickett.wordpress.com/category/home-automation/. All of the data was being sent to pachube for logging.

I wasn’t too keen on the home automation hub as I didn’t really fully understand it and couldn’t push it where I wanted to go (although the community was really good and I imagine I will be seeking assistance from them in connection with the new project :)

In my new setup I intend to use a Raspberry Pi the "hub"- with a "full blown" linux distribution (debian?) I should hopefully be able to accomplish everything I am looking for. As python is the first language discussed in conjunction with the raspi I’ve started playing with that, but eventually may move to a LAMP solution (php with mysql backend for logging and apache web front end).

Here’s a high level summary of the steps I’ve covered:

The python example from the link above didn’t produce any output for me so I modified it slightly:

import serial, sys
ser = serial.Serial('/dev/ttyUSB0', 57600)
while 1 :

That’s all I have time for now- watch this space.


Home Security Cameras

I’ve been in the market for a while but couldn’t make a decision. Finally I thought I’d give the Ubiquiti Aircam a go: http://www.ubnt.com/airvision

Here you can see it mounted just below and to the left of the satellite dish:

And a bit closer up:

Quality isn’t amazing (1 megapixel) but price (£100), interface and ease of use make up for it:

I have another camera but have yet to mount it.

Currently the Aircam is running off of the included POE injector but I have ordered a few adapters to allow me to run them straight from my POE switch: http://www.ubnt.com/8023af

I have also ordered a Ubiquiti Unifi access point to try: http://www.ubnt.com/unifi and a pair of Nanobridge M (NB-5G25) combined bridge/antenna: http://www.ubnt.com/nanobridge with which I will attempt to create a link to a house "down the road".

*EDIT* As per request i’ve added a few bits.

Performance at night is pretty poor (no ir night mode) and i’ve got quite a bit of ambient light around. I intend to add a motion activated light in the back garden eventually though.

The web interface does work from my iPhone but it doesn’t look like it’s really designed to:

I’ve not noticed any options for text/e-mail alerts but once i get my hands on a raspberry pi and start using some form of central home automation software I will most definitely be looking at integrating it!


I have been making a lot of changes the network recently so thought it was time to sketch it out:

The left hand stack is housed in the A/V rack/closet and the right stack is housed in the garage rack. To clarify a few points:

  • The two switches are linked using a 2 x 1 gigabit fibre trunk
  • The ESX servers and file servers are connected to the switch using 2 x 1 gigabit ethernet trunks
  • There ET9000, XBMC, Apple TV 2, HDMI Matrix and Sonos devices can all be controlled from smartphones, pcs etc
  • The ET9000 records to the file server
  • The Sonos Connect / ZonePlayer 90 is connected to the Onkyo Amp to allow Sonos to output to my home theatre
  • The Sonos Connect / ZonePlayer 90 is connected to the Apple TV to allow streaming from iTunes/iOS devices to all zones
  • I haven’t bothered to include my router, wireless access points, client pcs, smartphones, printers and various other devices in the diagram

The wireless sensor network provides:

  • Whole house power consumption currently using a CurrentCost EnviR
  • Individual appliance power consumption (currently monitoring 6 appliances using CurrentCost IAMs)
  • Environment information (temperature, light, humidity) using Jeelabs Jeenodes in multiple zones

This is a good reference point for where I’m headed (not much progress since I last listed but alas, still the way forward):

  • Further appliance monitoring and more importantly control (potentially through upcoming project/device: HexaBus – https://github.com/mysmartgrid/hexabus/wiki or plugwise – http://www.plugwise.com/idplugtype-g/)
  • Security cameras (and doorbell integration)
  • Environmental information (I have pulse counters for my gas meter and water/central heating system that need installing)
  • XBMC hardware replacement (once the Raspberry Pi – http://www.raspberrypi.org/ is available to buy I’d like to replace my Acer Revo)
  • Home Automation Hub replacement (once the Raspberry Pi is available to buy I’d like to try Domitiga – http://www.domotiga.nl/ or my own custom solution)
  • Web Interface (to bring all of the information together from the wireless sensor network, along with the state of all network devices (from bandwidth to free space etc) and most importantly allow central control- so instead of me having to use different methods to switch on the ET9000, change the channel on the HDMI matrix, power on the amp etc, I can do it all with one button)

As usual- I imagine I’ve missed a few bits out from the above but it hopefully provides a good overview of my network.


%d bloggers like this: