I’m using openHAB 3.3.0 on a Windows 10 machine. I’ve got an Aeotec Gen5+, a wall plug, and a MR40Z remote control switch, that has 4 buttons. And for a guy that doesn’t like it when computers think they’re smarter than me, I’m really feeling less than smart tonight.
I’m really after something simple. If I press a button, I’d like it to send an ON command to the wall plug. If I press another button, I’d like to send an OFF command.
But the MR40Z seems to be smarter than me, and while I’ve looked at some other examples (like the Wallmote one), I can’t seem to figure out when the item state changes.
Here’s what it looks like from the semantic model:
Looks to me like the rule you’re using isn’t the problem; it’s that your MR40Z isn’t talking to OH yet. A quick look at the Z-Wave database that’s used by the Z-Wave binding shows:
Which means that your device is in the database, but only if you are on a version more recent than 2022-09-11. You say you’re still using 3.3 so your version of the binding doesn’t have the information for your device. You can verify this by looking at the thing details for the device. If the binding actually recognizes the device then you should have a human readable label in the information section like this:
If it just says something like 0924:D001 then the your device cannot be found by that version of the binding and no sensible communication between the device and OH will be possible.
If this is the case then you will have two choices: 1) upgrade OH to a more recent version (the most recent 3.4 milestone is quite reliable and will have the binding version you need), 2) download the latest version of binding and use that with your currently installed version (there are lots of threads here that give you detailed instructions for that).
I actually have something somewhat humorous going on, in that when I toggle the WallPlugSwitch17129_Switch manually, the log shows the state of the scene changes too.
2022-12-05 19:49:33.702 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'WallPlugSwitch17129_Switch' predicted to become ON
2022-12-05 19:49:33.714 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WallPlugSwitch17129_Switch' changed from OFF to ON
2022-12-05 19:49:33.816 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'KitchenSwitchMR40ZNode6_SceneNumber_1' changed from 0 to 1
Excellent, then, the next thing to check is that it’s been fully initialized. Your device is a battery operated device and sometimes(frequently?) they don’t finish the pairing procedure during the first inclusion and you have to wake them up many times to finish the procedure.
Check that your device shows all the options at the bottom of the thing page like this:
Alternatively, navigate to the folder in your configuration directory that has the zwave xml files [your config dir]\userdata\zwave. Your device is Node 6 so for complete inclusion you will need to have a file named something like network_7f420b1a__node_6.xml
Are you sure you have linked the KitchenSwitchMR40ZNode6_SceneNumber_1 device to the correct channel and that this item is the correct type (likely a Number Item)?
Talking this through with you was very helpful. There’s definitely something wrong with Scene 1. I created a Scene 2, and I’m getting the proper log events and managed to turn the switch on!
2022-12-05 21:00:59.257 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'WallPlugSwitch17129_Switch' received command ON
2022-12-05 21:00:59.257 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'WallPlugSwitch17129_Switch' predicted to become ON
2022-12-05 21:00:59.295 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WallPlugSwitch17129_Switch' changed from OFF to ON
2022-12-05 21:00:59.388 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Switch' changed from OFF to ON
2022-12-05 21:00:59.389 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'KitchenSwitchMR40ZNode6_SceneNumber_1' changed from 2.0 to 1
2022-12-05 21:01:01.465 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WallPlug17129_Electricmetervolts' changed from 0 to 100.39
2022-12-05 21:01:04.180 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'WallPlug17129_Electricmetervolts' changed from 100.39 to 121.84
2022-12-05 21:01:05.807 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'KitchenSwitchMR40ZNode6_SceneNumber' changed from 2.0 to 1.0