This rule is doing my head in. I can't figure out how to do it. Initially, I thought the cancel delay 2 seconds was not being honored, but now I can see that it is, and the issue is something else. I have a rule that sends me a message when the garage door opens. Problem is that when the garage door opens, the sensor moves in and out of range of the magnet, and sends a few notifications. In rule 3, I had a rule that worked well, delaying the notification for 2 seconds, and I only received 1 message. But in Rule 4, I'm getting 3 or 4 notifications every time the garage door opens or shuts, all saying "Garage Door Open", despite the delay. I have another rule, whereby when the Global variable is set to true/false, I get sent a pushover message. That rule is being run 3-4 times, because THIS rule is setting the Globbal variable 3-4 times within 0.4 of a second.
This is the rule (the delay is so I dont get multiple messages, worked in Rule 3, not Rule 4, and also due to the wind).
Here is the contact sensor opening and closing. Just focus on the 1:16pm OPEN (where the garage door opened ONCE, but I received 4 notifications from the sensor). As you can see, HE received 4 messages in 0.4 of a second.
Here are the logs for the rule itself. (two images, start from bottom)
Now obviously, the rule is doing exactly as it should. Every time the Contact sensor "opens" (sic), the delay is triggered and then after 2 seconds, it sets the global variable, and it all happens so fast that there is no cancelling of the delay within the 2 seconds. Can you think of a way to do it in Rule 4?
(Other things: battery was recently replaced, at 100%; mesh is good, I have an XBee).
Edit: I attempted to make the set garagedoor to false (delayed 2 seconds), cancel) a conditional statement IF garagedoorshut is true, THEN set garagedoorshut to false.
But it evaluates the rule at beginning of delay, not when the delay is over.