Thanks for suggestions!
You really don’t need to be digging in there to write rules. Use the features provided.
Well, using the features provided was my initial intent anyway.
I forgot to mention, that the device under control is an Aeotec Nano Dimmer ZW111.
I assume you have some Items controlled by your UI, what are they?
It’s a zwave_device_c37bfa25_node24_switch_binary (Switch Binary Z-Wave command class).
I assume you have some Items linked to physical switches, what are they?
A physical switch is a bistable switch attached directly to the dimmer. Like the one at the image:
So it’s neither z-wave device nor controlling/controlled by OpenHAB directly.
Look in your events.log to see what events do happen.
When physical switch triggered there’s only one event:
2020-04-13 20:27:52.934 [vent.ItemStateChangedEvent] - zwave_device_c37bfa25_node24_switch_dimmer changed from 0 to 10
And then goes reports like:
2020-04-13 21:02:16.313 [vent.ItemStateChangedEvent] - zwave_device_c37bfa25_node24_meter_voltage changed from 67.37 to 67.38
2020-04-13 21:02:16.414 [vent.ItemStateChangedEvent] - zwave_device_c37bfa25_node24_meter_current changed from 0.028 to 0.027
2020-04-13 21:02:16.513 [vent.ItemStateChangedEvent] - zwave_device_c37bfa25_node24_meter_watts changed from 1.7 to 1.67
2020-04-13 21:02:26.316 [vent.ItemStateChangedEvent] - zwave_device_c37bfa25_node24_meter_voltage changed from 67.38 to 67.39
2020-04-13 21:02:26.408 [vent.ItemStateChangedEvent] - zwave_device_c37bfa25_node24_meter_current changed from 0.027 to 0.028
2020-04-13 21:02:26.507 [vent.ItemStateChangedEvent] - zwave_device_c37bfa25_node24_meter_watts changed from 1.67 to 1.69
for every ten seconds.
When the binary switch triggered from the UI we have these events:
2020-04-13 21:07:52.051 [ome.event.ItemCommandEvent] - Item 'zwave_device_c37bfa25_node24_switch_binary' received command ON
2020-04-13 21:07:52.105 [nt.ItemStatePredictedEvent] - zwave_device_c37bfa25_node24_switch_binary predicted to become ON
2020-04-13 21:07:52.127 [vent.ItemStateChangedEvent] - zwave_device_c37bfa25_node24_switch_binary changed from OFF to ON
2020-04-13 21:07:54.363 [vent.ItemStateChangedEvent] - zwave_device_c37bfa25_node24_switch_dimmer changed from 0 to 10
And then go reports as in the first case.
In this case, we have ItemCommandEvent, that can trigger the rule if the trigger will be modified for “binary switch goes to ON”. But it doesn’t solve a case for the physical switch, which doesn’t emit such an event.
Any suggestions on how to trigger the rule for the physical switch?