Since this keyfob, or something like an Aeon Minimote, using a ‘changed’ trigger doesn’t work, since you can send the same button press more than once. This is one of the rare occasions, using DSL rules, where separate rules work better.

This is also one of the areas where the new rule engine with scripted automation (JSR223) shines, since you have access to the update that was received when using a ‘received update’ trigger.

But, possibly more fundamental, are you seeing any of the LogInfo statements logged in your log file. I’d be especially interested to know if the first log statement (i.e. logInfo(name, "Update: " + swState)) is being logged, as that will indicate whether the rule is being executed.

After a received Update the item’s state doesn’t change immediately. It takes time (5-40ms) depending on your system for the event bus to process the event.

That’s definitely true for received command but is it for received update? I’ve never encountered a timing problem with that. If it is a problem then we need a receivedUpdate implicit variable too. I routinely code just like OP and haven’t had a problem. It has always behaved such that the Item processes the update before the Rule triggers.

5iver:

Since this keyfob, or something like an Aeon Minimote, using a ‘changed’ trigger doesn’t work, since you can send the same button press more than once. This is one of the rare occasions, using DSL rules, where separate rules work better.

For the minimote which worked the same way, I created a Rule that sets the Items back to OFF automatically and trigger the Rule using changed to ON. Aeon Minimote Configuration OH 1.8.2?

THANK YOU! Your input really got me pointed in the right direction!
The code below is now working as follows:
switch “on” by pressing “square”
switch “off” by pressing “circle”
The next step will be using the same button for switching on/off. Let’s see how that goes
var String drState
rule "fob"
when
Item zwave_device_ad9e47cf_node4_scene_number received update
then
var swState = zwave_device_ad9e47cf_node4_scene_number.state as Number
var name = "FobRule…

Now after I do not know how many times of pushing the wake-up buttons, the damn thing always blinks red when I push a button … with one exception … the inclusion mode (3 klicks on any button) still works.

Waking up the device:
The KeyFob needs to be woken up to receive information about the
new configuration from the Z-Wave controller, like parameters and
associations. Use 1st menu position (white) or click o and + simultaneously to wake up the device.

I can report some progress … but still not where I want to be.
After numerous wake-ups, I got the device recognized by the controller with correct name etc. … but … the inclusion did not use security successfully. the device is marked as not using security.
I have “Security on” for all devices on the controller, and have had successful secure inclusion with switches and the likes already.
What do I need to do, to get the Fibaro Keyfob recognized as a secure device?
And specifically, what exactly do I need to do, now that the device is already included in non-secure mode?