This page last changed on May 28, 2014 by ric9887.

I have followed the instructions on how to setup a switch rather than buttons for a LightwaveRF socket.
I can get the buttons to work fine, however the switch requires variables and a sensor to be setup and some rules defined.
I can not see anything wrong with my syntax, and also noticed that the example given says that the variable can be R2D1togglestate (letters and numbers), but it would not accept numbers in the cell.
I wondered if there is anything else which I need to do to make this work ?


After a little reading I managed to make this work.
The problem is with the example rules which are posted in the example, and here is what worked :-

I included the 1st 3 lines (which were missing from the example posted).
I changed Switch to Event
All the other steps in the example worked, and I now have an On/Off switch which displays status from a LightwaveRF socket.
Albeit - tracked and not live status (so I realize it susceptible to perhaps being out of sync if another device changes the switch state).

package org.openremote.controller.protocol

global org.openremote.controller.statuscache.CommandFacade execute;
global org.openremote.controller.statuscache.SwitchFacade switches;

rule "Turn_Printer_On"
Event( source == "Sensor_Printer_State", value == "on" )

rule "Turn_Printer_Off"
Event( source == "Sensor_Printer_State", value == "off" )

Posted by ric9887 at May 29, 2014 09:52


I wrote the example, so what syntax appears wrong? It's based on my working (tracked) status for my Lightwave socket which runs my fireplace lights. Happy to correct the entry if it's wrong!

Posted by ptruman at Jun 18, 2014 15:55

Hi Peter,

I have been searching everywhere to try to get a OR switch with status tracking working, where can I find your example?
I can turn Lightwaverf devices on or off using buttons no problem.

Thanks Steve

Posted by stechad at Nov 18, 2014 19:49


A swift google for "OpenRemote" and "LightwaveRF" gets you the first link, which is :

Posted by ptruman at Nov 19, 2014 14:39
Document generated by Confluence on Jun 05, 2016 09:34