OpenHAB2 / LightwaveRF / Mood controller

Hi @Phelzier
Do we still need to enable Lightwave using the RFXtrx software to get mood switchs and wire free switchs working?
thanks in advance :slight_smile:

James

Hi @habnoob,

Yes, I used a windows machine to enable the Lightwave option. Initially I got the wireless switches up and running quite quickly, however I had issues with the mood controllers. Since then the bindings (and OpenHAB) have been updated, when I came back to try it again a few months ago the mood controllers worked just fine. I’ve now got the Lightwave switches integrated with my OpenHAB setup just as I wanted
 and they’re super reliable.

Hope that helps,
Regards, David.

Have you examples of your items and sitemaps for the lightwave kit

Hi @Chod,

Sure thing


My items look like this:
Switch MS13_16004850_switch “MS13 Switch” { channel=“rfxcom:lighting5:abcdefgh:16004850_13:command” }
Number MS13_16004850_mood “MS13 Mood” { channel=“rfxcom:lighting5:abcdefgh:16004850_13:mood” }

I then use rules that get triggered when the mood number changes, based on the new value the rule then turns on/off various lights.

The Lightwave devices don’t appear in my sitemap at all as they are just there for triggering different lighting setups.

I hope that helps,
Regards, David

1 Like

Thanks @dwaterson

got it all working now - had to turn off ignore config :slight_smile:

now to work out the rules 


Kind regards
James

Could you show me your rules file? I’m trying to get the slave switch to trigger another light when turned on and off but not sure about the rules file.

Hi @habnoob,

Glad you got it receiving the messages ok - I don’t recall setting the ignore config but having checked mine it’s also enabled, so I’m assuming I must have changed that.

My rules are not as straight forward as you expect


I have some “standard” on/off switches (ie not the mood controllers), I have a rule that looks for a status change to ON and a separate rule that looks for a status change to OFF. Each of these rules has a line that issues a postUpdate(NULL) to the Lightwave item
 that means EVERY time one of the buttons is pushed the rule fires. The reason I do this is so that I can use each button to set certain lights on/off every time the button is pushed
 that allows the room to be reset to a certain setup despite changes made through the app or other rules. In fact I have some virtual switches that in effect are only there to store the state of each scene
 that allows me to “toggle” scenes on/off with a single button.

This was fiddly to setup but works really well
 It means I can use a “dual” Lightwave switch and each of the 4 buttons controls each of 4 different zones for on/off.

For my mood controllers the rules are far simpler, I look for a change to a specific value and then fire off commands to the relevant lights
 I could simply my approach into a single rule that looks for a change and then has an IF statement for each of the values
 I just chose this way as it was the easiest when first building a working example. I’m not sure if one is more efficient than the other, but I’ve only two mood controllers so figured it wasn’t too important.

I can’t get to the rules right now, but I’ll try and grab an example later and post
 it’s along the lines of


rule “Lightwave mood controller 1-1”
when Item lightwave_mood_1 changed to 1
then
sendCommand(someitem,ON)
end

rule “Lightwave mood controller 1-2”
when Item lightwave_mood_1 changed to 2
then
sendCommand(someotheritem,ON)
end

rule “Lightwave mood controller 1-0”
when Item lightwave_mood_1 changed to 0
then
sendCommand(someitem,OFF)
end

Hope that helps.
Regards, David

using the windows tool I have got the id/data of a Motion detector on lightwave protocol, to prove its working, added the usb configuration items to I think get the data connection

I have added the RFXCOM Binding with the RFXCOM Transceiver

Would I need the RFXCOM Lighting5 Actuator and or the RFXtrx433E USB 433.92Hz Transceiver as thats the hardware ?

not sure what parts are needed / comments appreciated

Hi @chod,

I added a “thing” for “RFXCOM USB Transceiver”
 once that was correctly setup and working, the items automatically appeared in the inbox as they were discovered (eg for switches, I pressed all the buttons and the various items were added automatically).

It’s been a while since I set this up, I recall having to setup the USB port manually in a config file. I’m travelling at the moment so can’t easily access my system but can check and let you know in a day or two if that would help?

Regards, David

1 Like

Thanks David,
Hrm still no luck here though thanks for our examples.
Will post mine in the morning though they dont work, if you could take a look - I would be honored.

Kind regards
James

Good progress here, thanks to all posters of various pieces of information.

added RFXCOM USB Transceiver Binding, with settings for what you want to detect
I checked mine with windows RFXcommander? tool

Had to add bindings for items that I wanted to detect, Choose Thing type etc

Meanwhile the inbox was populating itself with a few local devices I did not know were 433mhz

Still no joy for me with this, i keep trying though still fails :frowning:
Below are my items and rule, some output at the end

Zwave.items
 
Dimmer Bathroom "Bathroom [%d %%]" (Alights) [ "Lighting" ]
        {channel="zwave:device:6f409fa7:node3:command",
         channel="zwave:device:6f409fa7:node3:switch_dimmer1",
         channel="zwave:device:6f409fa7:node3:sensor_power1",
         channel="zwave:device:6f409fa7:node3:meter_kwh1",
         channel="zwave:device:6f409fa7:node3:meter_watts1",
         channel="zwave:device:6f409fa7:node3:alarm_general1"}
 
lwrf.items
 
Switch Slave_1  "Slave 1 [%d %%]"
        {channel="rfxcom:lighting5:41f5363c_16060396_13:command"}
 
wirefree.rules
 
rule "Slave_1 On"
 
when
  Item rfxcom_lighting5_41f5363c_16060396_13 changed to ON
then
  Bathroom.sendCommand(ON)
end
 
rule "Slave_1 Off"
when
  Item rfxcom_lighting5_41f5363c_16060396_13 changed to OFF
then
  Bathroom.sendCommand(OFF)
end
 
 
 
log output
 
2018-05-25 19:36:39.182 [vent.ItemStateChangedEvent] - rfxcom_lighting5_41f5363c_16060396_13_command changed from OFF to ON
2018-05-25 19:36:39.187 [vent.ItemStateChangedEvent] - rfxcom_lighting5_41f5363c_16060396_13_contact changed from CLOSED to OPEN
2018-05-25 19:36:40.922 [vent.ItemStateChangedEvent] - rfxcom_lighting5_41f5363c_16060396_13_command changed from ON to OFF
2018-05-25 19:36:40.945 [vent.ItemStateChangedEvent] - rfxcom_lighting5_41f5363c_16060396_13_contact changed from OPEN to CLOSED

I will check my rules, but I am pretty sure you are ment to refer to your lightwave items the same way u do with your switch item

therefore

rule "wirefree.rules"
when 
 Item Slave_1 changed to ON
then
 Bathroom.sendCommand(ON)
end

Thanks mate - im sure your right though I never see the switch called in the logs, only the lighting5 id so utterly confused!

Will try that now though :slight_smile:

Still no joy
instead of “on off” could i set a level as when i tell alexa to turn the device on or of it sends a dimmer value and not an “on off”
just sendCommand(100) ?

Tried the above, didnt work 
 argh! :slight_smile:

the item ( the dimmer ) will need to be defined as a number in your items file to accept a value

Thanks, I think it is:
Dimmer Bathroom “Bathroom [%d %%]” (Alights) [ “Lighting” ]
{channel=“zwave:device:6f409fa7:node3:command”,
channel=“zwave:device:6f409fa7:node3:switch_dimmer1”,
channel=“zwave:device:6f409fa7:node3:sensor_power1”,
channel=“zwave:device:6f409fa7:node3:meter_kwh1”,
channel=“zwave:device:6f409fa7:node3:meter_watts1”,
channel=“zwave:device:6f409fa7:node3:alarm_general1”}

I have not defined multiple items in one pass, i have always done one at a time (I am not saying its wrong, I just dont recall spotting it written by that method )

I have a wire free Lightwave mood controller here I just have never “seen it” appear ?
What sequence did you use to spot it/pair/get serial to access its output

Hi @Chod - once I had the RFXcom up and running the wireless mood controllers just appeared in the inbox when I pressed the various buttons. Interestingly some switches appear as two separate items, I’m guessing that the internal circuity is modular and report as separate devices.

I didn’t need to pair it (although it had previously been paired to a Lightwave bridge, but I’ve not got that)
 as I say, it just appeared once the radio was configured.