Z-Wave wall switch and remote to turn on or off a light

Hi all!

I am a very very OH newbie :wink: running a openhabianpi with the Z-Wave binding, and I need your help to start because the documentation didnā€™t put me on the right path.

The Z-network is as follows:

Node 1: Z-Wave Serial Controller (Aeon Labs Z-Stick Gen5)
Node 2: CRC-3100 Octon Remote Control
Node 3: FGS223 Double Switch 2

All parameters of things are set to their default.

The following items are defined:
Node2_SceneNumber Scene (Number)
ZWaveNode3FGS223DoubleSwitch2_Switch1 (Switch)

My goal is very simple: turn on or off a light connected to Switch1 of node 3 using the wall switch or the remote.

I defined two rules via the Rule Engine:
Lights_ON: When an item state changes (Node2_SceneNumber has changed to 1) Then send a command to a specified item (Send ON to ZWaveNode3FGS223DoubleSwitch2_Switch1)
Lights_OFF: When an item state changes (Node2_SceneNumber has changed to 3) Then send a command to a specified item (Send OFF to ZWaveNode3FGS223DoubleSwitch2_Switch1)

So far I run into a couple of issues:

  1. PaperUI sometimes doesnā€™t reflect the status of the light if I turn it on or off from the wall switch;
  2. if I turn on the light from the wall switch and the state of Node2_SceneNumber is 3, then I canā€™t turn off the light from the remote (actually I can, but I have to press button 1 first and then 3).

In the given example I expected to turn off the light by pressing button 3 on the remote. Could you please help me understanding what is wrong or how it works?

Alex

@abissoli A first suggestion would be to try to associate the two devices together, then they will communicate status changes directly and avoid the need of the extra step of defining and running rules. Iā€™m not familiar with the Octon remote but from looking it up in the Zwave database it looks like it should be able to be associated at an individual switch level and I know the FIbaro can be associated on itā€™s side.

As far as PaperUI reflecting status, Iā€™ll have to leave that to someone else but Iā€™d recommend learning about SiteMaps and then using the BasicUI vs. the PaperUI.

@rgerrans Thanks for your reply.

Yes, the Octon remote can work that way and Iā€™ve already tested such a configuration. However Iā€™m trying to learn the OH basics, and thatā€™s why Iā€™d like to find a solution to work with scenes.

As per PaperUI reflecting status, Iā€™ll go with your suggestion.

Thanks,
Alex

@abissoli

While the new rules engine doe allow for GUI rule creation, I would actually suggest going straight to the text files based rule creation. In my opinion they are a little easier to understand what is going on and easier to put in logging statements to debug (plus are a lot more flexible and powerful then the PaperUI rules engine).

That said, one thing to try is to also put in rules that when the switch is turned on it changes the state of the remote to match that of the light, i.e.

Lights_ON: When an item state changes (ZWaveNode3FGS223DoubleSwitch2_Switch1 has changed to ON)Then send a command to a specified item (Send 1 to Node2_SceneNumber)

and vice versa.

I have to do this with my 3-way switch aux switches.

Also, on the showing of status changes. Sometimes there is a lag between the change and when they show up on the hubs. From my understanding, Lutron has a patent on instant status updates being sent from the switch to the hub, and only they and Cooper are able to do so. All the rest have to wait until they are polled for a status change so this can sometimes induce a small lag from the physical change to hub showing the new status.

Thanks! I gave it a try and I discovered the Fibaro sends no events to the gateway when operating the physical switch (S1) - I set the log to debug level (ā€œlog:set debug org.openhab.binding.zwaveā€) and the log shows nothingā€¦ Any further ideas would be greatly appreciated.

[edit]
I removed and then added again the Fibaro (which now is node4) and it somehow works; I had the following log:

2017-02-02 23:26:29.881 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 09 00 04 00 04 03 25 03 FF 2C
2017-02-02 23:26:29.883 [DEBUG] [ve.internal.protocol.ZWaveController] - Receive queue TAKE: Length=0
2017-02-02 23:26:29.884 [DEBUG] [wave.internal.protocol.SerialMessage] - Assembled message buffer = 01 09 00 04 00 04 03 25 03 FF 2C
2017-02-02 23:26:29.885 [DEBUG] [ve.internal.protocol.ZWaveController] - Process Message = 01 09 00 04 00 04 03 25 03 FF 2C
2017-02-02 23:26:29.886 [DEBUG] [ve.internal.protocol.ZWaveController] - Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], priority=High, dest=255, callback=0, payload=00 04 03 25 03 FF
2017-02-02 23:26:29.887 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 4: Application Command Request (ALIVE:DONE)
2017-02-02 23:26:29.888 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 4: Starting initialisation from DONE
2017-02-02 23:26:29.888 [DEBUG] [ve.internal.protocol.ZWaveController] - Event Listener org.openhab.binding.zwave.internal.protocol.initialization.ZWaveNodeInitStageAdvancer@1d50dd2 already registered
2017-02-02 23:26:29.889 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 4: Incoming command class SWITCH_BINARY
2017-02-02 23:26:29.889 [DEBUG] [dclass.ZWaveBinarySwitchCommandClass] - Received Switch Binary Request for Node ID = 4
2017-02-02 23:26:29.890 [DEBUG] [dclass.ZWaveBinarySwitchCommandClass] - NODE 4: Switch Binary report, value = 255
2017-02-02 23:26:29.890 [DEBUG] [ve.internal.protocol.ZWaveController] - Notifying event listeners: ZWaveCommandClassValueEvent
2017-02-02 23:26:29.891 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 4: Got an event from Z-Wave network: ZWaveCommandClassValueEvent
2017-02-02 23:26:29.891 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 4: Got a value event from Z-Wave network, endpoint = 0, command class = SWITCH_BINARY, value = 255
2017-02-02 23:26:29.892 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 4: Updating channel state zwave:device:bd2b34ae:node4:switch_binary to ON [OnOffType]
2017-02-02 23:26:29.894 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: Sent Message: class=SendData[0x13], type=Request[0x00], priority=Set, dest=4, callback=163, payload=04 07 60 0D 01 01 25 01 FF
2017-02-02 23:26:29.895 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: Recv Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], priority=High, dest=255, callback=0, payload=00 04 03 25 03 FF
2017-02-02 23:26:29.896 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: class=ApplicationCommandHandler, callback id=163, expected=SendData, cancelled=false MISMATCH
2017-02-02 23:26:32.328 [DEBUG] [WaveSerialHandler$ZWaveReceiveThread] - Receive Message = 01 0E 00 04 00 04 08 32 02 21 32 01 9D 00 00 46
2017-02-02 23:26:32.332 [DEBUG] [ve.internal.protocol.ZWaveController] - Receive queue TAKE: Length=0
2017-02-02 23:26:32.334 [DEBUG] [wave.internal.protocol.SerialMessage] - Assembled message buffer = 01 0E 00 04 00 04 08 32 02 21 32 01 9D 00 00 46
2017-02-02 23:26:32.335 [DEBUG] [ve.internal.protocol.ZWaveController] - Process Message = 01 0E 00 04 00 04 08 32 02 21 32 01 9D 00 00 46
2017-02-02 23:26:32.336 [DEBUG] [ve.internal.protocol.ZWaveController] - Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], priority=High, dest=255, callback=0, payload=00 04 08 32 02 21 32 01 9D 00 00
2017-02-02 23:26:32.337 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 4: Application Command Request (ALIVE:DONE)
2017-02-02 23:26:32.337 [DEBUG] [alization.ZWaveNodeInitStageAdvancer] - NODE 4: Starting initialisation from DONE
2017-02-02 23:26:32.338 [DEBUG] [ve.internal.protocol.ZWaveController] - Event Listener org.openhab.binding.zwave.internal.protocol.initialization.ZWaveNodeInitStageAdvancer@1d50dd2 already registered
2017-02-02 23:26:32.339 [DEBUG] [ssage.ApplicationCommandMessageClass] - NODE 4: Incoming command class METER
2017-02-02 23:26:32.339 [DEBUG] [.commandclass.ZWaveMeterCommandClass] - NODE 4: Received METER command V3
2017-02-02 23:26:32.340 [DEBUG] [.commandclass.ZWaveMeterCommandClass] - NODE 4: Meter: Type=Electric(1), Scale=W(2), Value=41.3
2017-02-02 23:26:32.340 [DEBUG] [ve.internal.protocol.ZWaveController] - Notifying event listeners: ZWaveMeterValueEvent
2017-02-02 23:26:32.341 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 4: Got an event from Z-Wave network: ZWaveMeterValueEvent
2017-02-02 23:26:32.341 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 4: Got a value event from Z-Wave network, endpoint = 0, command class = METER, value = 41.3
2017-02-02 23:26:32.343 [DEBUG] [ternal.converter.ZWaveMeterConverter] - Not the right scale E_KWh <> E_W
2017-02-02 23:26:32.344 [DEBUG] [ding.zwave.handler.ZWaveThingHandler] - NODE 4: Updating channel state zwave:device:bd2b34ae:node4:meter_watts to 41.3 [DecimalType]
2017-02-02 23:26:32.346 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: Sent Message: class=SendData[0x13], type=Request[0x00], priority=Set, dest=4, callback=163, payload=04 07 60 0D 01 01 25 01 FF
2017-02-02 23:26:32.347 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: Recv Message: class=ApplicationCommandHandler[0x04], type=Request[0x00], priority=High, dest=255, callback=0, payload=00 04 08 32 02 21 32 01 9D 00 00
2017-02-02 23:26:32.348 [DEBUG] [.serialmessage.ZWaveCommandProcessor] - Checking transaction complete: class=ApplicationCommandHandler, callback id=163, expected=SendData, cancelled=false MISMATCH

As you can see, the rule isnā€™t triggered.

I have a microdimmer behind one of my physical switches and it sends updates back to the controller when activated. I have the same Fibaro but have it setup behind a wall outlet so canā€™t test. It may be the channel you are monitoring. Though you should be able to monitor for changes to the Dimmer channel, though that may be related to why you arenā€™t seeing it show up in PaperUI when you physically change the switch status.

@chris is going to be the best to help with if there are errors in the Zwave communications.

I have a ZW4005 that Iā€™d like to operate a zwave outlet. I donā€™t really care if itā€™s a scene type operation or not, but Iā€™d like to be able to operate the outlet with the switch or the openhab ui. I canā€™t seem to find an easy way of doing this. Any suggestions? Thanks.