RM4 help, cancel notifications

I have a door contact sensor that occasionally misses a close activity, so it seems to stay open. Problem is, I control my thermo and turn it off if doors/windows are open. Great in late spring, summer and early fall, nut now that it is legit cold out, I don’t really want my heat turned off. Toggling the contact sensor fixes the issue.

So I am trying to write a rule to push a notification if stuck open. I have tried a bunch, but the cancel does not seem to work. I wrote a rule with a straight forward trigger of contact open and then a delayed cancelled action of send notification. Test with successful close, I still got notification.

Second test was same trigger, but wrote the action as an if/then statement, the first rule just had the action, no if/then. Again the action had cancel included, but still got notification.

Finally wrote rule with same trigger of contact open, this time I selected simple condition, and built contact open again (not one of the defined condition type) and again set to cancel the notification.

What am I doing wrong?

Thanks for helping

Can you send a screenshot of what you are trying?

A screenshot would be helpful, but you could also just use the built in Notifications app. It can send an alert when a contact sensor remains open for a specified amount of time. That being said, your problem is like that you need a "changed" trigger instead of "open" with a cancel on one half of an IF/ELSE and the delayed notification on the other (sounds like you tried something similar with only an "open" trigger and one half of this conditional would therefore never be true--actions only run when triggers happen.)

Ok, so 1) sorry no screen shots, I was posting on a mobile and could not figure out how to post the screen shot from mobile. They are now included. 2) I actually did not know about the notifications apps, so cool. I think I want to learn the right logic for RM as a learning opportunity, and in the notifier app, the restrictions are not flexible enough for my goals. Reminder, I want to allow this door to remain open in the nicer weather. I can add more to the "IF statement in RM.

Screen shot 1: Straight forward trigger of contact open and then a delayed cancelled action

Screen shot 2: Wrote the action as an if/then statement

Screen shot 3: I selected simple condition

Note, the 15 second notification is just for testing.

What am I doing wrong? :slight_smile:

"Cancelable" doesn't do anything without a "Cancel Delayed Actions" action, which actually does the cancelation. You want to do this whenever the contact sensor closes. Therefore, your trigger needs to be "changed" instead of just "opened," and you need a full IF/ELSE to check for both states. Your second rule would basically be that if you added three more items to the actions list: an "ELSE", a "Cancel Delayed Actions", and (to be polite) an "END-IF" (plus the trigger change I suggested).

2 Likes

Ok, this logic is starting to make sense. However, where is "Canceled Delayed Action". I could find this:

image

found it!

tested, seems to work! thanks

1 Like

That'll work! Technically, you could use a plain ELSE (it can only be one of two states and your IF tests the other), and RM is being polite by implying an END-IF at the end, but it's still good practice to put it there yourself.

as simple as this? Just ELSE, ACTION (plus your END :slight_smile: ).

image

Yep!

1 Like