Outdoor lighting

Unless you are lucky enough to have pre-wired lighting in outdoor spaces, it can be hard to link outdoor lighting to a home automation setup.  There aren’t many wireless and battery powered lights that can be controlled with radio signals, because ‘listening’ for the radio signals all the time will drain the batteries pretty quickly.

As part of my ‘ready for summer’ programme, we’ve just attached a reed fence to the back balcony, primarily so we can let our cat out for a bit of sun now and then so she doesn’t launch herself off the 3rd floor.  But me being me, I wanted some form of home control out there,  Of course, I could take out the Hue Go and I’m sure I will especially when summer (and wine) comes.  But it would be nice to have something permanent out there.

I remembered that I had a couple of the Lightwaverf LED lights we used to use in the kitchen and bathroom.  These are small white blocks, with a cluster of 3 bright LEDs (powered by 3 AAA batteries) encapsulated in a transparent circle that also acts as an on/off button.  The boffins at Lightwaverf have managed to work out how to use very little energy with these lights, so replacing the batteries does not need to happen as often as you might guess.

They’re perfect for mood lighting so I guessed they would have enough oomph for a double balcony.  They do indeed as the below images will testify!



The lights themselves are not waterproof, so after some careful consideration (and rummaging around the house) I gathered together 2 old (clean!) takeaway boxes and some trusty super-strength double-sided sticky foam.  I stuck the top (the flat end) of the box to the wall, then the whole LED unit onto the surface, then pushed what was the bottom of the box (now the front of the light) on.  To replace the batteries I’ll just have to remove the ‘cover’ and then slide out the LED from its integrated holder.

Although (as in the picture) the lights look rather industrial, I like them!  Of course, you could encase the lights in whatever waterproof enclosure you want, just remember that you will have to open them at some stage to replace the batteries.

Now the lights were not accessible by human hands, I had to devise a way of switching them on and off.  I’d already linked them up with Domoticz, so we could use the app to control the lights.  But that’s not enough, is it!  As all 3 doors to the flat (and some doors inside the flat) have open/closed sensors, I hooked up the lights to the balcony door.  When the door opens, the lights come on for 5 minutes.  That’s enough to find a seat, set up a table and then decide if you’re staying out there, in which case you can use the Domoticz interface to keep the lights on.

One more thing… I didn’t want the lights to come on during the day when the door is opened.  That would just be wasteful.  As I had already set up a dummy switch called ‘Dusk’ that switches on just before sunset and switches off at sunrise, I could add this to the mix.

Just this much text as a script in your domoticz folder on your Pi achieves this.  It’s really that simple.

commandArray = {}
if (devicechanged['DOOR Chester Balcony'] == 'Open' and otherdevices['VAR Dusk'] == 'On' and otherdevices['Rear Balcony Lights'] == 'Off') then
 commandArray['Rear Balcony Lights'] = 'On FOR 5'
return commandArray

So even for someone who has no knowledge of programming, you can see what’s going on here.  In English:

If Chester’s door has just opened, and it’s dark enough to need lights and the balcony lights are not already on, switch on the balcony lights for 5 minutes.

Interestingly, the lights as in the picture were just too far away from the transceiver attached to the Pi to receive the signals reliably.  So there could have been the potential for one or both of the lights to stay on, even after they had been told to switch off.  To solve this, I used a LightwaveRF branded signal repeater, a really useful device that acts like a wifi repeater, but for home automation radio commands.


As for the balcony, it’s going to be great for summer.  But the cat might not be allowed on it as much as we’d hoped – within 5 minutes of her exploring her new space, I was prising her off the banister as she determinedly tried to fling herself off from the third floor.  I’ll have to think of a way that our home automation setup can prevent this!


Hue Go

My latest purchase is a Hue Go.  It’s a rechargeable (and therefore totally mobile) version of a Philips Hue bulb, encased in a bowl shaped frosted enclosure.

After a 1 and a half hour charge the light is good to go for 3 hours.  There’s a build in ‘bulge’ stand to allow for it to be pointed towards a surface, like the Iris or the Bloom.

What makes the light more usable for the whole family is that there’s a button on it to cycle through moods and colours, and to switch the light on or off.  The moods include such campness as Warm white, Cozy candle and Night adventure (which has a pink hue and a heart icon, I wonder what that mood is for…)

I like it, and think it’s going to make a great addition to the 20 or so Hue lights we already have.  For one thing, it can be moved in the dry to a balcony table – perfect for the approaching summer nights.

bowl2From a home automation point of view, there may be issues with having the light in ‘mobile’ mode, i.e. unplugged.  According to the literature, the light switches from ‘standby’ to ‘off’ after 2 hours of inactivity when in battery mode, so I’m guessing that means even if an ‘on’ command is sent, it won’t respond until either plugged in again or the button is pressed.  Obviously this is a fail-safe to ensure the battery does not drain completely.

£80 puts the Hue Go at the same price point as the Lightstrips, and I can see why.  It’s well made and even looks pretty when in standby mode.  I like the modern, ‘glossy glass’ look of the front panel and this continues even to the back where the understated function button resides.

The pros far outweigh the cons though, especially as after testing the Hue Go with the homemade disco controller I made, it is very responsive to commands even when in battery mode.

The brightness and saturation (although not seen well in these pictures) is as expected for a Hue product – read: amazing,

The literature seems to suggest that on battery mode, the brightness is reduced to extend battery life.  I can’t say I’ve noticed that, unless they mean that when displaying the pre-set moods that feature is enabled.

The charging cable (reminiscent of a cable for the Living Colours lamps) looks strong enough to be plugged and unplugged regularly.  The charging port on the unit itself is also recessed quite a distance which is good for protection purposes.


Overall, a great product and another reason to get excited about Hue!

Homemade disco using Sonos and Hue

I’ve used Hue Disco and other apps to sync up my Philips Hue lights with my music, but what I really wanted was something that I could start during a party, and just leave to get on with it.  I wanted the lights to change reasonably often, but I wanted them to respond to the type of music being played.

This program is written in Python 3 and uses the Echonest database to get the energy and danceability, as well as the tempo of the currently plying track from the Sonos player (obtained by this great program: node-sonos-http-api.  The program then selects a brightness and saturation range and randomly changes all the hue lights you specify.  The lights change in a frequency relating to the tempo of the track playing.

The program must be started AFTER you’ve started playing a track on the Sonos, and then continuously runs until you pause the Sonos player, and then raises the lights to a medium white light, and then the program quits.

I’ve got this program running on my Raspberry Pi, and am really pleased with it, obviously more tinkering can be done, but I’ve not seen any similar apps that do this.  I have a Domoticz ‘switch’ that can start running this program, and then to end the program, you just pause playback.  But you could just run the program from the command line each time you want to have a disco!

Best used when you have a night of partying, with a large random playlist going.  Don’t forget that as long as the player you specify in the variables is part of the playing ‘group’, you can play music to different rooms and include those Hue bulbs into the list too!

You can download the code here: Hue-BR-Analyse

Here’s the code:

import urllib
from urllib import request 
from random import randint 
import base64,requests,json,time,datetime

Hue Sonos Analyser by Harry Plant 2015

This program changes the hue, brightness and tempo of Philips Hue lights depending on the energy and danceability of the track,
as reported by Echonest.


*Philips Hue bridge and at least one Hue Light (http://www2.meethue.com/en-gb/)
*At least one Sonos player (http://www.sonos.com/)
*Python 3 (I have it installed on my Raspberry Pi)
*Echonest api key (obtainable at https://developer.echonest.com/ - click 'Get an API Key')
*node-sonos-http-api (https://github.com/jishi/node-sonos-http-api)

change the following variables to match your setup:

zone is the name of the sonos player you will be listening to
my_list is an array of the hue lights you want to control
sonosinfo is the address of the node-sonos-http-api server
hue_bridge is the address and key that you use to control the hue
echonest_apikey is the key you obtained from echonest

I have used this program with success (great parties) on multiple occasions but do not accept 
responsibility for any loss or damage caused by using this code.


zone = 'Kitchen'
my_list = ['3', '4', '5', '7', '15', '17', '19', '20']
sonosinfo = ''
hue_bridge = ''
echonest_apikey = '02MKNPMXXXXXXXXXX'


currenttrack = 'No track'
min_bri = 100
max_bri = 100
secs_waited = 0
secs_to_wait = 10
sat = 100
tt = 10
trackfound = 1
std_assumptions = 0

for r in range(1,999999):
 secs_waited = secs_waited + 1

 req = request.urlopen(sonosinfo + zone + '/state')
 encoding = req.headers.get_content_charset()
 obj = json.loads(req.read().decode(encoding))
 if obj['zoneState'] == 'PAUSED_PLAYBACK' or obj['zoneState'] == 'STOPPED':
 print('Player has stopped playing. Returning lights to white and exiting program.')
 my_list_len = len(my_list)
 for i in range(0,my_list_len):
 hue = 10000
 bri = 200
 sat = 50
 tt = 50
 payload = '{"on":true,"sat":' + str(sat) + ',"bri":' + str(bri) + ',"hue":' + str(hue) + ',"transitiontime":' +str(tt) + '}'
 r = requests.put(hue_bridge + "lights/" + my_list[i] + "/state",data=payload)

 req = request.urlopen('')

 track = obj['currentTrack']['title']
 artist = obj['currentTrack']['artist'] 
 elapsedtime = obj['elapsedTime']
 playing = obj['playerState']

 if track == currenttrack:
 print('Waited ' + str(secs_waited) + ' out of ' + str(secs_to_wait))
 if track != currenttrack:
 std_assumptions = 0
 print('This is a new track!')
 print('Now playing : ' + track + ' by '+ artist + ".")
 requeststring = 'http://developer.echonest.com/api/v4/song/search?api_key=' + echonest_apikey + '&format=json&artist=' + urllib.parse.quote(artist) + '&title=' + urllib.parse.quote(track)
 req = request.urlopen(requeststring)
 encoding = req.headers.get_content_charset()
 obj = json.loads(req.read().decode(encoding))
 if not obj['response']['songs']:
 std_assumptions = 1 
 print('Song not in database - using standard assumptions')
 if std_assumptions == 0:
 songid = obj['response']['songs'][0]['id']


 requeststring = 'http://developer.echonest.com/api/v4/song/profile?api_key=' + echonest_apikey + '&id=' + songid + '&bucket=audio_summary'
 req = request.urlopen(requeststring)
 encoding = req.headers.get_content_charset()
 obj = json.loads(req.read().decode(encoding))
 if not obj['response']['songs'][0]['audio_summary']:
 print('Although song was in database, there is no energy and danceability data. Using standard assumptions for this track.')
 std_assumptions = 1

 if std_assumptions == 0:

 dancepercent = int((obj['response']['songs'][0]['audio_summary']['danceability'])*100)
 energypercent = int((obj['response']['songs'][0]['audio_summary']['energy'])*100)
 pulserate = obj['response']['songs'][0]['audio_summary']['tempo']
 print('Danceability is '+str(dancepercent) + '% and energy is ' + str(energypercent) + '% with a tempo of '+str(pulserate) +'bpm.')
 currenttrack = track

 if std_assumptions == 1:
 dancepercent = 50
 energypercent = 50
 pulserate = 100
 print('Danceability is '+str(dancepercent) + '% and energy is ' + str(energypercent) + '% with a tempo of '+str(pulserate) +'bpm.')
 currenttrack = track

 if pulserate < 100:
 secs_to_wait = 20
 tt = 20
 if pulserate > 99 and pulserate < 120:
 secs_to_wait = 6
 tt = 10
 if pulserate > 119 and pulserate < 160:
 secs_to_wait = 4
 tt = 7

 if pulserate > 159:
 secs_to_wait = 2
 tt = 5
 secs_to_wait = int((pulserate/60)*2)
 if energypercent < 20:
 sat = 50
 if energypercent > 19 and energypercent < 40:
 sat = 100

 if energypercent > 39 and energypercent < 60:
 sat = 120

 if energypercent > 59 and energypercent < 80:
 sat = 170 

 if energypercent > 59 and energypercent < 80:
 sat = 200

 if energypercent > 79:
 sat = 255

 if dancepercent < 20:
 max_bri = 60
 min_bri = 40
 if dancepercent > 19 and dancepercent < 40:
 max_bri = 100
 min_bri = 80

 if dancepercent > 39 and dancepercent < 60:
 max_bri = 150
 min_bri = 80

 if dancepercent > 59 and dancepercent < 80:
 max_bri = 200
 min_bri = 50 

 if dancepercent > 59 and dancepercent < 80:
 max_bri = 255
 min_bri = 50

 if dancepercent > 79:
 max_bri = 255
 min_bri = 10

 print('Changing hue lights now.')
 my_list_len = len(my_list)
 for i in range(0,my_list_len):
 hue = randint(0,65000)
 bri = randint(min_bri,max_bri)
 payload = '{"on":true,"sat":' + str(sat) + ',"bri":' + str(bri) + ',"hue":' + str(hue) + ',"transitiontime":' +str(tt) + '}'
 r = requests.put(hue_bridge + "lights/" + my_list[i] + "/state",data=payload)
 secs_waited = 0
 if secs_waited >= secs_to_wait:
 print('Changing hue lights now.')
 my_list_len = len(my_list)
 for i in range(0,my_list_len):
 hue = randint(0,65000)
 bri = randint(min_bri,max_bri)
 payload = '{"on":true,"sat":' + str(sat) + ',"bri":' + str(bri) + ',"hue":' + str(hue) + ',"transitiontime":' +str(tt) + '}'
 r = requests.put(hue_bridge + "lights/" + my_list[i] + "/state",data=payload)
 secs_waited = 0


The Family Factor

Unless you live with other home automation geeks, there’s a fine balance to achieve when designing your system.  Although you can be as creative and innovative as you like behind the scenes, there still needs to be a point of contact between the system and the users.  It is this point of contact that can prove the most difficult.  You need to strike a balance here: it’s important that the end users feel comfortable with the controls and get some kind of feedback that what they have requested has been carried out.

padThe simplest and one of the most common ways to provide an interface is via a touch screen.  Family members may not want to whip out their mobiles every time they want to turn on a light, so a permanent touchscreen is useful in that situation.  We have a Sony Tablet S permanently standing on its charger in the living room for this purpose, but what to do when you are not in the living room?  My choice was to place LightwaveRF Mood Controllers next to every light switch.  These controllers are wireless and the battery can be changed easily.  A blue LED illuminates to confirm that a button has been pressed.  The only downside is that the markings are not very clear, especially in the dark, and there are only generic symbols on them (1, 0 on the two large pads, and ‘Standby’, ‘1’, ‘2’, and ‘3’ on the 4 smaller buttons).  Because each “pad” (as I call them) does something different in each room, I printed custom covers for the pads and stuck them on.

Because all the mood switches do is send an RF signal, the clever stuff can be done behind the scenes by Domoticz.  For example, by pressing one button on the pad,  all lights in my room switch to maximum, change colour to bright white, and my Sonos switches to a ‘daytime’ volume and starts playing This American Life.  A great button to have when you’re back home from work and want to get changed in your room!

The ultimate test of a user interface is to see how users react to it.  It seems like guests to the flat understand what the buttons would do, even if they are sometimes afraid to press them!

I just asked Chester what he thinks of the pads.  He was non-plussed in a kind of ‘well, they just work’ way. This is a good thing as it means the pads have seamlessly integrated into the flat and are taken for granted by the users, which is of course the ultimate aim for home control user interfaces.

Are Hue serious?

I cannot overstate the impact that equipping the flat with Philips Hue lights has had.  These seemingly innocuous light bulbs behave much like any other.  You can switch them on and off at the wall like normal bulbs, but the magic happens when you command them to change colour, brightness and saturation via the Philips Hue app, or like me via a direct command to the Bridge via a http request.

The Bridge is a puck-shaped device that you plug into your router and this then communicates with all the bulbs within its radio-range.  For bulbs that are too far away from the Bridge, the message is communicated through all available bulbs.  This way a command can reach all the way through a large house (or comfortably through a small flat like ours).


Here’s the Hue Bridge (the circular device with the blue lights).  You can see that I’ve found a cool place to tidy away all my home control devices: in the empty space previously occupied by a obsolete hot air heating system vent.  The Hue Bridge shares its home with a Hive controller, a Sonos Bridge and a LightwaveRF Link.  All devices are out of view until I need to look at any of them.

The Philips Hue App vs. direct control

The app itself is not great, purely because it takes a while to load up, and I don’t like the way that it behaves.  I think the app was not designed for someone like me, who wants to press one icon and get the lights exactly how I want them.


A rather extreme example: how lighting can change the atmosphere within a split second (don’t worry, our bathroom isn’t often that pink!)

Direct control (http request) is the best way to control Hue as far as I am concerned.  I do away with the app altogether and use the control pads throughout the flat.  This incidentally was before Philips brought out a new device that can do this – the Hue Tap.

Basically, the pad is pressed to select a colour, this sends a radio signal which is picked up by the transciever attached to the Raspberry Pi.  Domoticz acknowledges that the button was pressed, and then sends an appropriate request or requests to the Philips Hue Bridge via the network.   I say requests because you can send as many commands in one go as you like, up to about 10 per second.

You can get a list of all the commands you can send to the Bridge, as well as how to set up the Bridge to accept these commands at the Philips Hue API site.

Speaking to the Pi


I use Putty to connect to the Raspberry Pi, so that I don’t need to connect a screen and keyboard to the Pi.  I just fire up Putty from a computer on the same network and then use that computer’s screen and keyboard to control the Pi.  Read the installation instructions (and the legal information) before installing Putty.

Once you have launched Putty, enter the network address and port of the Pi into the boxes, and click connect.


You’ll then see a login screen.  Enter the login credentials as supplied by the place you downloaded the Raspberry Pi image from (I got my image from the Domoticz website – use the Raspberry Pi file.  More instructions available here).


You’ll then be able to change the folder you are looking in to domoticz.

Type cd domoticz and press enter.

pi@domoticzpi ~/domoticz $

will be displayed.

That’s it!  You’re connected to your Pi and you can command it from any computer with Putty installed on your home network.

Why Domoticz is a no-brainer

When I first decided to connect all my devices centrally, I looked around the internet for a solution.  There are many options to choose from, almost too many.  Some you pay for, others you don’t.  Some come with a ‘hub’ that you connect to your router and the hub sends out radio and network commands to your devices.  Others rely on external hardware that you purchase separately.  There are some really good paid services out there, but I wanted to try it on the cheap.  That’s when I found Domoticz.

rfxcom433Domoticz is a small-footprint program that you can install on pretty much any computer, but if you want to connect to your devices via radio waves, to send on/off/dim signals, and receive temperature or movement sensor data, you’ll need to buy a separate piece of hardware.  I bought an rfxcom rfxtrx433.  It’s a matchbox-sized box with a stubby aerial sticking out of the top.  You connect it to your computer via USB.

At first we used a Windows PC that was left on all day every day as our ‘home server’ (one of the terms used to describe the ‘brain’ of the home control system).  It worked reasonably well, and Domoticz almost never crashed.  The thing was, we were probably using far more power than we needed to.  So I looked at using the Raspberry Pi, a small and cheap computer.From the Domoticz website you can download an image to transfer to the Raspberry Pi via an SD card.  This image contains all you need to start using Domoticz straight away, right from the second you plug in the Raspberry Pi.  This makes life sooo much easier.  You can even plug in the rfxtrx433 into one of the Pi’s USB ports and it will start working straight away.  It’s that simple.


domoticz-screenshotThen, the exciting part.  When you type in the Pi’s network address (eg and add on the port number (the default of the Pi when Domoticz is first installed is 8080), you’ll see an unpopulated screen with no devices.  Adding devices is done in quite an innovative way: devices that send information routinely, like temperature sensors for example, appear in the ‘unused devices’ tab and with a few clicks they can be added to your dashboard.  Adding other hardware that uses network commands, such as the Philips Hue Bridge, is done via the Hardware Setup page.

domoticz-blockyAfter some or all of your devices are added, you can create decisions that Domoticz can make on your behalf.  You can make these as sophisticated or easy as you want: and there are two ways of programming these decisions.  The easy way is using ‘blocky’.  This is a drag-and-drop way to quickly build up a program.  A great feature of blocky is that the blocks you drag around will only fit together if they can interact in the way you’re trying to get them to interact.  The more advanced way to tell Domoticz what to do is to edit and create mini-programs that run either when a device changes state, or every minute.

This is a really quick summary of what Domoticz can do, I would advise that you visit the website and forum, grab a Raspberry Pi, install the Domoticz image onto an SD card and have a go yourself.  You’ll be amazed at what a free piece of software can achieve to realise your home control dreams.

I’ll be posting a lot more about Domoticz.  After all, pretty much everything in our flat is controlled by it one way or another.

Sentri: Maybe the prettiest all-in-one option out there

This looks nice…

Home Automation for Idiots

I was cruising through all the CES news today and gearing up for some posts and saw a video interview over at TechCrunch with a member of the Sentri team. Sentri is another entry in the “all-in-one” as I like to call it solution to home automation/monitoring. This device is much more akin to something like Piper or Canary where you get a device that does a lot more than just control other things like a SmartThings hub or Wink. Like the Piper and Canary, Sentri includes an HD camera and many other sensors like motion, light, humidity, CO2, etc. The biggest difference between the three is probably evident on first glance…Sentri has a screen!. Now don’t get me wrong, Piper and Canary are two of the best looking devices on the market, but they don’t have a screen. And while form should definitely play second fiddle to function in this…

View original post 343 more words

DIY: Make a better handset controller

Although I like the look of the standard LightwaveRF hanset controllers, the user of said controller has to remember what device is switched on and off when a numbered button is pressed.  This requires Mastermind-level memory.

Besides, I don’t use the controllers for ‘On’ and ‘Off’ per se, rather just to send a signal to Domoticz, so that the computer can decide what to do (or to reject the command altogether).  This means that the same button can be used for ‘On’ and ‘Off’, and therefore the same handset can be used for multiple functions (lighting moods and audio for example).

So a way to make these controllers more intuative is to add personally created templates to them so that the controller becomes part of your home setup.  You can choose a theme and run with it (as shown).

Firstly, this procedure is reversible, so if you don’t like what you’ve done, you can undo it all and revert back to your original handset.  Just remember to keep all the bits that come off the controller safe.

Secondly, you will lose some functionality.  Because the switch is removed, you don’t have the ability to select button set A, B, C or D.  I personally don’t care about this because the whole reason I wanted to make a custom cover for my remotes was to make them as user friendly as possible.

And if your family can remember that C4 controls the TV power, and D2 controls the garage door, and B1 to B4 control the kitchen lights, then you shouldn’t be reading this blog: you should all be at Cape Canaveral getting ready to take off a-la-Lost in Space.  Danger, Will Robinson!

Basically, you’ll end up with 10 buttons per customised handset.


1. Peel off the backing sticker from the controller to expose a screw and unscrew it.


2. Prise open the controller.  The things that should come off (quite easily are: The front cover, the rubber keys, the switch (which may come off in one part or may split into the plastic part of the switch and the metal part).  And the screw of course.  If the circuit board has come off from the base of the remote then I think you used a little too much force!  Get you, butchy.


You’ll notice that the rubber buttons are not needed – the ‘pads’ you can see in the image are self-contained switches.  Like the ones you get on blister-remotes.

3. Design your overlay.  I will post a template that you can use (search for the ‘Templates’ tag).  Don’t forget to leave a space where the led will shine when a button is pressed.

I used icons from Flat Icon.

4. Print and cut out the overlay.  I found that good quality bright white matt card worked best.

You may need to cutoff tiny strips from any side to make the overlay fit correctly.


5. Put one or two layers of the same card underneath the overlay (between the keys and the overlay).  This will make the control pad seem more springy.

6. Tape on the overlay onto the front of the controller.  I used normal tape here but I should have used a thick tape so that I only needed to use 1 pass, rather than 3 passes as I have done in the above picture.

Make sure that you don’t tape up the drawer on the back, otherwise you’ll have probelms when it comes to changing the battery.

7. Voila!  The below example is for the kitchen.  That’s why there is a cute chef as one of the buttons: when you press the chef button, all the devices in the kitchen switch on.


8. Now it’s time to program what happens when you press the keys.  More on that elsewhere in this blog.


Here’s an example handset (this one is for my bedroom).  It’s been created in the same style as all the ‘hardware controllers’ in the flat, so that picking it up and using it should be second nature.

You can for once use your creative side and your geek side together for this project.  Why not speak to members of your family to get an idea of what they’d like to see on the controllers (favourite colours, family member/pet’s faces etc).  Maybe they could even design the templates for you!



The bits and bobs what we have

Here’s a starter for 10.  An initial list of the items I’ll be talking about on this blog.  This is not exhaustive, even though I feel exhausted writing this down!

We’ve collected these various disparate systems over the past few years.  It’s my job to make them speak to each other.  Like some kind of flamboyant interpreter at an important European parliament discussion.


3 x Oregon Scientific thermo/hygro sensors to monitor temperature and humidity throughout the flat, and outside on one of the balconies.  They send messages to the computer, roughly once a minute, giving up to date temperature and humidity data.  They also include in the message, a request for batteries to be changed.  That’s polite, isn’t it?

Available from: John Lewis

4 x LightwaveRF door sensors to determine if doors in the flat are open or closed – these send one signal when the contacts are moved apart – door open, and one signal when the contacts come back together – door closed. Open, closed.

Website: LightwaveRF

3 x LightwaveRF PIR sensors. These send out a signal when they detect movement, and then another signal when there is no longer any movement.  You can set how long the sensors wait before checking if there is no movement by selecting a time period using a switch on the back.  This can be from 5 seconds, to 10 minutes.  To literally never.

Website: LightwaveRF


10+ LightwaveRF plug-in units.  These units do one of two things, depending on which ones you buy.  One type is ON/OFF which means that a signal is received and then ‘ping’, the device you’ve plugged in comes on.  Used for things like TVs or Microwaves.  The other type is DIMMER which means that not only does the device plugged in switches on and off when a command is received, but also that the device can dim from between 0% and 100% brightness.  Or it should go down to 0%, but doesn’t.  More on that in another post.  You really should not use dimmer switches to control the power level of a Microwave.

The plug-in units are really, really useful, and they were especially so when we rented, because they can be removed from a plug socket when you move, instead of frantically tugging out every electrical outlet in the last 5 minutes of your tenancy.

Website: LightwaveRF

1 x Belkin WeMo plug-in unit. I bought this from Maplin as an impulse buy, as it links with another recent purchase, my Ivee Sleek.  I’ll be doing interesting things with both of these items in the coming weeks.  Mainly when Ivee becomes more than a fancy alarm clock that chirps up randomly whilst you’re watching television.


20140706_163537We have 17 Philips Hue bulbs and lightstrips in the flat.  These are what really shook up the home control thang, and made our lives better, more relaxing, and simpler.  Quite simply these are the best home control things I have bought.  Not only do they look good, they also behave 99% of the time, and they can be controlled from practically any computer program.  This is the holy trinity as far as home control goes.  Honestly, I can’t say too many good things about Philips Hue.  More gushing to come.

Where it is physically impossible to get Philips Hue bulbs, we have LEDs.  So the flat is very nearly 100% LED lit.  There are three exceptions in the kitchen where LEDs cannot be used at the moment.  Damn you, kitchen!

We also have a few LED downlighters that can be controlled by the LightwaveRF signals.  These are cute and can be used under shelves to create mood lighting.  The only downside is that they go through AAA batteries like our cat goes through litter.

Heating and Environmental Controls

We have an app-controlled heating system called Hive.  You can control the heating from wherever you can get online with your phone (which means everywhere).

Any flat can get problems with high humidity, so we have a dehumidifier.  It’s quite a cheap one, but I’ve made it very intelligent.  It only comes on when necessary, and only when we’re home.  I’ll blog about that some time.

We also have an air purifier which is also similarly automatically controlled.  The air purifier has a lovely colour changing effect and belches out lavender fragrance.  This is nothing to do with home control, but is very much to do with my other hobby, which is being incredibly and breathtakingly gay.


To ensure we can ‘talk’ to the flat, we need to have some kind of way to speak to it.  I can go in and change the code in my control programs, but that isn’t very easy to do for many users, so a pretty looking button or a screen is a good way of doing this.

Many of these controllers are supposed to be ‘paired’ with a specific device to switch them on or off.  I shun this concept as amateurish.  I ‘pair’ the controller with the computer, so that the computer decides what to do when it receives a signal from the controller.  More on this later in the blog.

pad4 x LightwaveRF wall mood switches are used throughout the flat to control lights and moods in various rooms.  These are useful because (a) you can stick them anywhere – so you can place them where a light switch would normally be, and (b) because they are always there.  It’s one thing having a smartphone controlled flat, but what if you don’t have your smartphone with you and all you want to do is turn on a light!  Cue this.

The mood switches have 6 ‘pads’ to press.  Two large ones, marked 1 and 0, and four smaller pads, marked with symbols ‘-‘, ‘–‘, ‘—‘ and a standby icon.

The mood switches are good, and look great, but they have very generic markings on them.  I’ve overlaid a printed design on top of them so that users can tell what will happen when a button is pressed.  The switches also have a delightful blue LED which charmingly illuminates to confirm that a signal is being sent.

4 x LightwaveRF handset controllers.  These are hand-held controllers, comprising of 10 buttons and a four-way switch.  8 of the buttons send out unique signals which change depending on the position of the switch, therefore there are 8 x 4 = 32 unique signals.  The other two buttons send out the same signals regardless of the position of the 4-way switch.  Therefore there are 32 + 2 = 34 different signals that can be sent out from these controllers.  I am no Carol Vorderman but Excel tells me that I’m correct.

Sony Tablet S in charging dock.  This is a pretty standard android tablet which is always standing in its charging dock.  It makes controlling the flat easy, as long as you’re in the living room and you have fingers.  The above controllers are used elsewhere.


Ivee was so exciting before I bought her.  She literally took months to enter my life, I was counting the days from when I ordered her from Maplin.  Ivee is supposed to be an always-listening voice-controller for your connected devices.  As it is, I can try and ask her “Hello Ivee.  Turn on the bathroom lights.” and she’ll respond with the phrase “The time in Handsome Eddy, New York, is 12:50am”.

I’m sure she’ll get smarter.

Smartphones.  This one is a no-brainer.  It’s also very impressive to show people.  “Hey, look at this.  I can switch on the fan in my living room from here in the office”.  And then they usually say something like “I’ve left something on the photocopier” and leave.  Quickly.


20150111_215333We have Sonos everywhere.  Literally everywhere.  As the flat is quite small, we have 3 PLAY:1 speakers, a CONNECT (for broadcast to the bathroom), and a PLAYBAR which is a stereo and a TV soundbar all rolled up in one very “I may look like a draught excluder but actually I cost twice as much as the TV I’m under” package.

The Sony tablet in the living room, and our smartphones can control the Sonos, as well as any of the handsets affixed throughout the flat.

The Brain

The brain of the whole crazy outfit is a teeeeeny tiny little computer called a Raspberry Pi.  This computer, the size of a pack of cards, is useful because it doesn’t use a lot of power (so you can leave it on all the time) and it’s reliable.  I use a program called Domoticz to run everything.  A heck of a lot more on this particular set up later.

The interesting thing about home control is that it can be as simple or as complex as you want to make it.  You can decide ‘I want a lamp in my living room to come on when it gets dark outside’ or ‘I want the flat to email me when the humidity gets stupidly high in there’, or ‘sound an alarm and email me when we’re supposedly out of the flat and a door is opened or a movement sensor is activated’.

With a bit of playing around, the world is your oyster.  Or your home is your servant.

The trials and tribulations of creating a 'smart home' in the UK