Door Notification Unpredictable

So I'm trying to simplify things and I've changed all my door chimes/alerts to individuals rules in RM. The problem I am having is it's not so simple. I've got these rules setup for each outside door that will give me a chime each time they open. Then there is as while loop for 30 min to alert me if the door stays open. It's not exactly happening that way. Just now I got the chime and then within a couple minutes got the alert to close the door. That alert should have happened 30 min later while the door is open and has not been closed. Something is not as I assume. Please help.

Too complicated for me but you need to post logs filtered to the rule and devices. Without logs.......

Crystal Ball Wizard GIF by Verohallinto

1 Like

Really not much the logs can use and the rule is pretty straight forward, but here ya go Kreskin

image
That is the alert.

Is all logging enabled for the rule itself (events, triggers, actions)? The logs you posted just appear to just be showing its trigger (assuming this rule is either app 20 or app 383).

It’s 383 and no, not all logging is enabled. I think it’s worth noting that when this happens that the door is opened and closed multiple times before the early close the door alert happens. I suspect the retrigger is not canceling the while loop. I debated adding a cancel waits etc at the beginning of the rule but my understanding is that the retrigger should cancel and loops.

When you're troubleshooting a rule, the first step should always be to ensure all 3 of its logging options are enabled and then diagnose those logs after a run.

There's no good reason to troubleshoot blindfolded with one arm tied behind your back.

3 Likes

I see a 2nd rule (#20) triggered by the same action. Could there be something in that one that is causing you grief?

1 Like

Good observation. That rule turns the garage lights on/off based on the door opening/closing after a few minutes. Nothing related to activating the chime.

1 Like

I’ve enabled all. I dud that before and didn’t see anything indicative. I have to wait for it to happen again and will post the logs. My real question is as the rule is written am I missing something. Shouldn’t it operate as I expect regardless of multiple openings/closings? I only want to get the “close the door alert” after the door remains opened longer than 30 min. It just seems the while wait for 30 min is lingering and not resetting. I have the same rule for my deck door and it behaves similarly.

A little more background….
I just upgraded the door contacts in both places to Zooz ZSE41s and paired them LR. Converting battery devices to LR. I noticed that they sometimes miss a close. They are mounted on metal doors so I added a 1/4” spacer behind them just today. However, even though I open and get the regular door chime and then close the door, I will occasionally get a close the door alert well before the 30 minute wait.

Assuming that the required expression remains valid (since the 2 variables are not changed within the rule itself)

Then the rule will be retriggered each time the "garage door laundry contact" opens. Each time it is triggered, another instance of the rule will start.

I'm pretty sure that "while contact is open repeat every 30 minutes " doesn't mean that the loop will end immediately if the door is closed. The door can be opened and closed multiple times, but if it happens to be opened at the 30 minute mark, when the test takes place, the notification will occur. Please correct me if I am mistaken.

Since each time the door opens, another instance of the rule begins, it initiates another notification 30 minutes later.

For example, if the door opens at 1 pm, and closes/opens every 5 minutes, before staying open at 1:25 pm, then 6 versions of the rule will be running.

The first one will send the notification at 1:30 pm, which is what you expected, but the other 5 instances will notify at 5 minute intervals after that.

That effectively produces an alert just 5 minutes after you opened the door at 1:25 pm.

I think using private booleans would help in this situation.

1 Like

Just did it twice within a couple of minutes. Logs below


That is what I have been trying to get clarification on. Does a rule instantiate as you say and run separately if the rule triggers again? I get conflicting guidance on that. My understanding is that if a rule triggers and then retriggers, there is only one rule running and the original trigger is now no longer running.

FYI if you click the app:383 over to the left them only the actions for that rule be be listed and will make it a bit easier to follow.

I was thinking the same thing. Although I would have expected the While condition repeat loop to act like a wait for condition and cancel on a retrigger, I don't think that is true.

The documentation mentions two ways to end a repeat. One is the "End Rep." The other is "Until" which I would think would be an expression. However, when trying to create it, I can't do anything but "End Rep"unless I am using a regular repeat (not a repeat while)

Wondering if the "repeat while" doesn't actually subscribe to the conditional device but acts more like a conditional if that occurs at the beginning of each loop.

Also wondering if this might work if that is the case:

Better?


As written, it would appear that the loop while would terminate one the condition of the door being closed is met. I mean that's how it reads, but it doesn't seem to be behaving that way. As @Ricktronic wrote, it is almost as if the rule starts and creates an instance of the while loop and loses connection to the original trigger and still runs, but my experience does not show that to be the case. I can open and close the door and never get the alert to close it. However, if I open/close a few times, it seems...seems to almost always happen. It's almost as if during the while loop, I open the door again, the original while still runs in the background. It's really strange.

I had issues with trying to do this in RM also. I wound up using webcore (which also let me have the rule monitor all my doors and tell me which one was left open)

I would suggest you have separate rules for notifications for 1) doors opening, 2) doors open for x minutes. Simpler to create and manage.

The absolute simplest way to do what you're trying to do is using the Notifications app, but I don't think it works with chime devices so in this case it may not work for you. If you were using speakers or music devices you could use the Notification app. I use Notification app to get pushover texts and speaker announcements for doors opening, and for doors open a certain amount of time..

1 Like