Rules does not always fire

Hi I’m running openhab on an Intel NUC openhabian setup. Openhab 2.5.0M5
I use the deconz zigbee USB dungle and software to get feedback from some sensors and buttons.
I am having a strange issue where I have setup some rules for a Zigbee button which has two buttons, left normal click returns 1002, right normal click 2002, long push and double click also triggers different codes…
But I setup a rule using the PaperUI very simple… when trigger channel fires a 1002 for the button it should like turn on my sonos, or turn on my coffeemachine… or what ever…
And I had it running and working… then after some time it stops working…
I can see that the event is recieved via the logs:

2019-11-21 09:17:13.474 [vent.ChannelTriggeredEvent] - deconz:switch:ZigBeeGW:00158d00027c334e010012:buttonevent triggered 1002

But the rule does not seem to pick up on it, not even an error or any notice that the rule was triggered…
If I try any of the other buttons it also picks up on the event, but none of my rules are triggered…

Example with a long push…
2019-11-21 09:25:23.123 [vent.ItemStateChangedEvent] - DoubleSwitch1_Button changed from 1002 to 1001

Here are some screenshots showing my simple rule…

I find it very strange that I can get it working (maybe after a reboot), and it then stops working after some time… very frustrating… but am I doing something wrong?

How do you know that the rule did not trigger? Was it just that the action did not execute or is there also nothing about a rule event in the log?

Likely not needed info, but just in case…
You’re using a Deconz USB dongle, but which binding are you using? What hardware are you using for the Zigbee button and is this the only hardware that this is occurring on?

There is a Deconz zigbee binding which I use, and it works great… in the log I can see the tirgger when I use the button…
When it works, I can see the Rule’s icon turn to running for just a second… that’s one way that I can see that it works… but of cause I can also see in the log that the action is triggered right after the button is pressed… in this example the Sonos is set to start playing…
But sadly none of this happens right now… I even upgraded to 2.5.0M5 to see if in made any difference… which it didn’t… I haven’t rebooted yet after the upgrade, but openhab restarted…
I can also manually execute my rules by clicking the Execute icon… and that works fine…
So I guess it’s the rule that is not catching the button change…
My rule is created with the “When a trigger channel Fires”… I think that’s the correct one to use right?

This is what is logged when I use the button… the value 2002 changes depending on the way the button is used… (one push, long push or double push)…

2019-11-21 10:50:39.152 [vent.ChannelTriggeredEvent] - deconz:switch:ZigBeeGW:00158d00027c334e010012:buttonevent triggered 2002

So my Channel is set to the deconz:switch:ZigBeeGW:00158d00027c334e010012:buttonevent
And the Event is: 2002

But maybe there is another way to set this up?
(keep in mind it has been working…)

I will now reboot the Intel NUC to see if it works after that…

As expected… a reboot didn’t fix the problem…

How are you creating rules? Sounds like you use the experimental rules engine.

There’s lot of advice in this forum about avoiding designing rules with poor practices that clag up your system, but that does generally apply to the old text based DSL rules.

I’m still confused about how you know that the rule is not triggering. When the rule is not triggering, are there logs showing that a rule event occurred?

This should work fine, and I have not seen any issues (personally or reported) with Channel triggers in the new rule engine. What version of OH did you first observe this in?

If the Channel supports it, you could link an Item to the Channel and then trigger the rule when the Item receives an update.

OK I’ll try again…
I’m using the Experimential Rules Engine on OH version 2.5.0M5
In the Log Viewer I can see when ever I push my button that it logs a line like this:
2019-11-27 12:17:20.126 [vent.ChannelTriggeredEvent] - deconz:switch:ZigBeeGW:00158d00027c334e010012:buttonevent triggered 1002

1002 is a single click on the left button while 2002 is a single click on the right buttton…

this is logged every time… so far so good…

Of cause I would like a rule to catch this action, and do something…

thing is… nothing happens after the event is tirggered… and nothing other than the buttonevent is logged as described above…

The way I created the rule is to use the “When a trigger channel fires”… here I select the channel called “deconz:switch:ZigBeeGW:00158d00027c334e010012:buttonevent” which is the one I see in my logs…

I then select the “then…” option where I just send a “PLAY” to my Sonos device…

When I test the rule in the GUI with the little Play symbol, it works great… but it is not triggered when I push the button…

(this has been working before… not sure what happened, and an upgrade til 2.5.0M5 didn’t fix the problem…

how do I go about “fixing” this?

I’ll try to reproduce this, but I suggest checking if this is occurring with any other binding. It’s possible this is an issue with the Deconz binding. Another thing to try is to create the rule using scripted automation and also the rules DSL. If the issue is occurring in those rules too, then it would point to a binding issue.

You’re using the UI… a screenshot would be easier than typing :slightly_smiling_face: