Monday 28 April 2014

Domoticz, Raspberry Pi, RFXCom RFXtrx433 and LightwaveRF Protocol

I'm experimenting with various sorts of Home Automation bits and pieces at the moment. My primary goal is for the final set-up to be as cheap as possible, for it to work as I would like it and to convince the wife that it was all worth the bother!

My protocol of choice at the moment is Z-Wave using a Razberry add-on board - as previously blogged about. However, I have been quite interested in the LightwaveRF stuff, so I purchased a few dimmers and set about to get them to work with my Raspberry.

You first need to hook up a RFXtrx433 USB adapter. These are a bit pricey but they just plug straight into the RaspberryPi and you are up and running.

RFXCOM RFXtrx433 USB Adapter
My Raspberry is loaded with Domoticz (superb bit of free software, by the way) and currently handles my Z-Wave devices in a simple set-up.

However, once I received a few sets of LightwaveRF dimmer switches, I had to go through a bit of pain to try and learn how to set them up with Domoticz - this is what I'll share with you.

Once you have your Raspberry PI and Domoticz set-up, head along to the hardware tab.

You need to switch on the LightwareRF protocol to get things working. To do so, click on the Set Mode button and the following screen should appear.

Simply check the AD/LightwaveRF protocol box and then click on the Red, Set Mode button.

We now have our Domoticz set-up able to transmit LightwaveRF protocols but we now need to get it to learn about the switches we have. Z-Wave stuff is largely automatic but the LightwaveRF devices need to be added manually. Here's how we do that.

Click on the Switches tab within Domoticz.

Click on the Manual Light/Switch button (there is a slight spelling mistake there, the "/" is not needed).

Set the hardware as Rfx and give a description. Usually the switch type is a Dimmer and the [protocol] Type is LightwaveRF. The ID section is a bit unusual; basically this is normally generated from the last few digits of the MAC address when using the proprietary internet link box. However, just enter any unique combination you wish. Click the button "Add Device" and you're good to go.

We need to perform one more step - in the switches screen, locate the switch you just added and then set the dimmer switch into "learn" mode by pressing both buttons and holding them pressed for a few seconds. You can tell it's in learning mode because the front LEDs will flash back and forth. While this is happening, simply turn the light on in Domoticz.

Does it work? Of course it does!

Lightwave is quite good but it does have some pros and cons.


1. You can get everything you need in a switch and only need 2 wire wiring.
2. The switches are quite cheap and fit most standard UK 25mm backboxes.


1. Z-Wave is a Mesh network; LightwaveRF is not. This means that a Z-Wave network can pass network packets through different devices to be able to get to its final destination.
2. You don't appear to get any feedback of the light status from the wall switch, i.e. if the switch is manually switched on or off, Domoticz doesn't get any feedback. This is a pity because I like to have lighting status feedback so you know when the bloody kids haven't switched off the lights!
3. You can only buy Dimmer Switches. On/Off relays are available but they are only available as in-line devices.

Thursday 24 April 2014

Dodgy China LED Lights and Exploding Power Supplies!

I like messing around and in our house, we use a lot of LED fittings. However, in recent times a large number of these LED lights have been going out.

The first batch I bought some three years ago have been working just fine. However, the past year or so have seen a lot of failures - not quite the 20,000 hours quoted by the manufacturers!

The most common failures I see are down to bad quality LED SMD "Fried Eggs". All of my fittings use 3W LEDs with 3, 4 or 7 LEDs mounted on a PCB in series depending on the desired power. The problem with failures like these are if one fails, they all extinguish - a bit like Christmas Tree lights from the past.

Getting hold of replacement LED "Fried Eggs" generally involves an order to China and they arrive in the UK within a few weeks. Removing the failed LED involves unscrewing the aluminium casing and using a soldering iron. Checking which one had gone can be done with a simple DVM switched to diode testing mode.

However, this week I came across something quite worrying, especially as I got an electric shock while standing on a ladder! Basically, these latest China power supplies blow up and then burst out of their protective casing.

The problem? Well, when replacing failed LED fittings, you don't expect to put your bare hand onto 240V AC!