For the nodon CRC 3100 (Octan Remote):
1.- Change the configuration parameter 3 to 1.
2.- Create the items as shown below:
Switch Nodon_Button1_Single "Nodon_Button1_Single" <switch> { zwave="8:command=SCENE_ACTIVATION,scene=10,state=1" }
Switch Nodon_Button2_Single "Nodon_Button2_Single" <switch> { zwave="8:command=SCENE_ACTIVATION,scene=20,state=1" }
Switch Nodon_Button3_Single "Nodon_Button3_Single" <switch> { zwave="8:command=SCENE_ACTIVATION,scene=30,state=1" }
Switch Nodon_Button4_Single "Nodon_Button4_Single" <switch> { zwave="8:command=SCENE_ACTIVATION,scene=40,state=1" }
Switch Nodon_Button1_Long "Nodon_Button1_Long" <switch> { zwave="8:command=SCENE_ACTIVATION,scene=12,state=1" }
Switch Nodon_Button2_Long "Nodon_Button2_Long" <switch> { zwave="8:command=SCENE_ACTIVATION,scene=22,state=1" }
Switch Nodon_Button3_Long "Nodon_Button3_Long" <switch> { zwave="8:command=SCENE_ACTIVATION,scene=32,state=1" }
Switch Nodon_Button4_Long "Nodon_Button4_Long" <switch> { zwave="8:command=SCENE_ACTIVATION,scene=42,state=1" }
Switch Nodon_Button1_Release "Nodon_Button1_Release" <switch> { zwave="8:command=SCENE_ACTIVATION,scene=11,state=1" }
Switch Nodon_Button2_Release "Nodon_Button2_Release" <switch> { zwave="8:command=SCENE_ACTIVATION,scene=21,state=1" }
Switch Nodon_Button3_Release "Nodon_Button3_Release" <switch> { zwave="8:command=SCENE_ACTIVATION,scene=31,state=1" }
Switch Nodon_Button4_Release "Nodon_Button4_Release" <switch> { zwave="8:command=SCENE_ACTIVATION,scene=41,state=1" }
Switch Nodon_Button1_Double "Nodon_Button1_Double" <switch> { zwave="8:command=SCENE_ACTIVATION,scene=13,state=1" }
Switch Nodon_Button2_Double "Nodon_Button2_Double" <switch> { zwave="8:command=SCENE_ACTIVATION,scene=23,state=1" }
Switch Nodon_Button3_Double "Nodon_Button3_Double" <switch> { zwave="8:command=SCENE_ACTIVATION,scene=33,state=1" }
Switch Nodon_Button4_Double "Nodon_Button4_Double" <switch> { zwave="8:command=SCENE_ACTIVATION,scene=43,state=1" }
3.- Create rules for the desired scene:
import org.openhab.core.library.types.*
rule Nodon_Button1_Single
when
Item Nodon_Button1_Single received update ON
then
logInfo("rules", "Nodon_Button1_Single - Start")
var currentValue = LivingRoom_Lamp.state
if (currentValue == ON){
sendCommand(LivingRoom_Lamp, OFF)
} else{
sendCommand(LivingRoom_Lamp, ON)
}
logInfo("rules", "Nodon_Button1_Single - End")
end
Obviously, change the code in the rule to match your requirements.