Solved. RM3.0. 2.1.1.120. Possible Issue with 'WAIT' command

@bravenel
I'm playing about with the WAIT command and have come up with a rule to make some announcements when we arrive home. It is in it's infancy so please don't be too critical of the rule itself I'm just trying to clarify if I have uncovered a possible bug.

The crux of the rule is if my virtual presence sensor switch turns on (trigger) then the actions will wait for my front door to close and then after a short period of time play a random announcement.
The first time it ran it made an announcement twice.
Looking at the logs it appears that the door opening and closing is causing the actions to start, not just the closing of the door.
Here is the rule.
image
Here are the Scheduled Jobs.
image
Here is the door opening and closing.
image

Hope this all makes sense and if you need some more info please let me know.

Just for clarification I'm running the latest platform version. 2.1.1.119.

I created a test rule similar to what @bobbles did because I am interested in something like this. I confirm that I too, got two messages. Appears once for when the door opened and once for when the door closed.

Again, this a simple test rule:

Here are the logs that were generated:

Same issue here. Started right after updating to .116 yesterday. I was a few back and had been waiting to update. I have a very similar triggered rule. My wait is tied to a motion sensor. The message played when it went active and again when it went inactive. It also continued to do so every time the sensor was tripped as opposed to the rule trigger which is presence based. I ended up rolling back and it works as expected.

Try on. 119

It is on .119

Will do. I'm updating now. I didn't even see that it had come out. However, I thought this issue was corrected in .116.

"## Hub update 2.1.1.116 has been released.

This hot fix release fixes a few bugs:

Rule Machine:

  • Fixed push button per mode.
  • Fixed Wait for Condition action subscriptions not being removed when wait done"

Unless of course that is not the issue.

This is happening on 119 If you do not wish to update.

Thanks, it just finished updating. I'll roll back again.

Personally I would leave on 119 as there are some wait fixes included.

1 Like

There are two WAIT actions. Which one are you using? Please boil down the failure to a simple case that demonstrates the failure.

Post 2 shows a very simple rule.
Basically what is happening is the WAIT for door to close should only be acted upon.
The rule is being acted upon for both door opening and closing.
2 other people have added to this thread and are reporting the same issue.

Here is my simple rule. I used the Wait for Event in actions:

It fires on door opening AND closing, which is not expected. At least I don't think so unless I completely misunderstood the syntax of Wait for Event

Here's mine. It worked perfectly prior to updating. The version I was on is 2.1.0.123.

This log went on for about 30 minutes until I got home. My wife trips this sensor so often(needlessly) I had to put in a usb powered sensor. I just posted a sample.

Please look at the Event Subscriptions on the app status page. Same for @spalexander68 and @CAZ.

This will reveal the following critical information: While the wait is pending, what is the event subscription and is it correct. After the wait has been fulfilled, is that subscription gone. These two facts will reveal what I need to know about your case.

Here you go.

Man, you make this so difficult!

Is that what it was supposed to be waiting for? Were you using Wait for Event or Wait for Condition? What happened? Which state is this: waiting, or after wait is over?

Don't know if this is what you are requesting:

The "trigger" is the arrival of a presence sensor (in this case it is virtual). It is Waiting on Event for the Door too close before it fires.

And my rule. Again, it is a Wait on Event:

Having same issue with this rule. It has worked fine for several weeks. Updated from 115 to 119 this morning. Now everytime I open the Utility Door the lights come on. My mode has been HOME since 5:30 this morning. The nighttime switch has been off since about 6 am. So it is not triggering on a mode change to home and it is ignoring the condtion.

Paused the rule and re-started. It now seems to be ok. Do I need to pause the whole RM and re-start in case there are other rules that are acting up?

EDIT: Wait for event.
As in post #1 waiting for contact to close.
image

As said above, whether the contact opens OR closes the actions following the wait shown above happen.

Not sure what you mean here.

Also I am obviously missing something here.
You asked-

Is this not the app status page? When I scroll down I find the Event Subscriptions.
image

This was the issue for me. I was able to replicate the issue. When using wait for event, it played the messaged both when the sensor went active and inactive and also played every time the sensor tripped. When using wait for condition it worked perfectly. Played the messaged when the sensor went active and that's it. It also did not repeat. Strange though it just seemed to start for me when I updated as I hadn't touched that rule. I am running 119.