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.

Pros

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.

Cons

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.