Tag Archives: Hue Go

Logs, logic and inspiration: Managing a complex home control setup

You know how it goes.  You start with one or two home control devices.  You find it amazing that you can control them from your phone.  You want more.  And more…

Here’s a quick diagram of my current setup at home.

setup.png

There are at least 77 items for the home control system to control.  Each one has a unique set of capabilities, and inter dependencies with other devices.  Certain groups of these items require different communication protocols, some radio, some infrared, some HTTP and some via a webserver.

As my system has been created from several protocols and brands, I find it engaging and a full-on hobby to ensure they perform perfectly in concert.  Basic scripting has become more in-depth as I attempt to squeeze out the most from every device.  Although adding additional functionality is stimulating for me and ultimately rewarding for me and my flatmate, each iteration adds a new layer of complexity – and like every complex system, the bigger it is, the harder it can fall.

I’ve recently been faced with a problem.  A few times in a row, the Raspberry Pi 2 has frozen overnight. The controls and automatic lighting obviously do not respond, and then something as simple and as taken for granted as getting light and audio into the shower requires scrabbling through phone apps: not good if the water is already running!  Worse, the switches that are supposed to be triggered in the early morning, such as the “it is dawn” variable do not fire.  So with such a complex system how do you diagnose the problem?

Logs

The first answer is logs.  Loads of logs.  Ensure each of your subsystems are writing down what they are doing and just as importantly when they are doing it.  You can then rifle through the logs and find anything that is not behaving as you’d planned.

Inter-dependency diagrams

Okay, so this may be the most geeky thing I have said on this blog so far, but I like to keep diagrams and spreadsheets showing which systems and activities are inter-related.  And in the event of a catastrophic failure, they pay dividends.  You can literally trace your finger through the lines and see which scripts you need to check if something is not working right.  You can also keep track of things like ID codes and group codes for all your connected devices.

Logic

To do this you need to empty the house of unexpected variables (i.e. the rest of the family and pets large enough to trigger any sensors) and then physically run through each process that you think may be causing the problem.  If you are anything like me this usually involves an embarrassing and potentially uncomfortable period where you are remaining totally motionless right in front of a motion sensor to see what happens when the “no movement here” signal is sent.

Inspiration

You may be surprised by the other users’ perception and understanding of your home control system.  Ask other occupants what they think is happening.  At best they could hit the nail on the head, and if not they just may throw something so left-of-centre out there that is provides you with the fresh outlook you need to trace the problem.

Summary

I feel this entry will become outdated very soon.  As consumers we are on the cusp of having our cake and eating it: a fully integrated one-stop solution for home automation that will work seamlessly and without requiring manual programming.  It may even have the ability to provide reasons for failure and suggest ways to work around it, especially if open-source and app-based: a fellow user in the Netherlands could be granted temporary access to help sort out the problem you’re having with your garage door in California.

This new way will remove the complexity involved in getting disparate systems to work together, but will it provide the level of control we ‘first gen’ full home control aficionados will require?  Either way, I’m glad I’ll be able to say “In my day, we had to fumble around to find the solutions to these issues, and sometimes create our own!”

 

 

Advertisement

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!

backbalc1

balcony2

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'
end
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.

backbalc3

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.

bowl3

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