In RM4.0, I am trying to set up an alert if a door ( coop) is open at sunset-15 with reminders every 15 until it is closed or 2:00 am (too late then -
). Every time I try this, it gets more complicated than I believe is needed.
With a trigger at sunset added and 2am trigger added
Don't know why this would not work???
May add another trigger for 2 A.M. as well. So if the time is sunset-15 and the door is open or "opens/closes" the rule evaluates and notifies accordingly.
That rule doesn't provide a way to stop the notification at 2 AM, but it's close. The second post has been modified since it was posted and is now also close, though it also won't stop at 2 AM because the "Exit Rule" isn't checked as part of the repetition that gets started. (It may get modified again after I post this. )
The original post isn't clear about what is desired, either: taken literally, it could just be a check at sunset-15 to see if the door is open, then notifying every 15 minutes until either it's closed or it's past 2 AM. What everyone is providing so far does something similar it notifies you every 15 minutes (including at minute zero) if the door is open any time after sunset-15 until 2 AM. This seems more likely to be what someone would want, but it might be good to get clarification.
It may be good for them to add an "keep notifying every x minutes while true" option to the Notifications app. This seems to be a common thing people are trying to do with Rule Machine with some difficulty.
I just did a quick mockup to show what could be done. I added a line about another trigger for 2:00 A.M. I had already got rid of the sample mockup.
The second trigger at 2:00 A.M. should get you to the cancel notifications and exit rule you mentioned should it not????
Thanks for the reply. My family opens the door randomly during the day to let the chickens out. I need to be sure itās closed by sunset. If not, I need reminders until itās closed, or 1:00 am. Sometimes I open the door after sunset to feed or water the critters, but donāt need alerts for this because I always close it when done. My only concern is whether itās open at sunset.
We could stop the alerts at 11:59pm instead of 1:00 am if the actual day matters. Maybe thatās easier?
Seemed easy when I planned this.
In that case, I think something like this would work:
This looks a little odd so I suspect some people will be suspicious, but you really only need the rule to run when time is sunset-15 (to check if the door is open and start the every-15-minutes notifications if so) or the contact sensor is closed (to stop this repeating notification), so that is why I chose those triggers. The way the conditionals are set up should make this happen.
You also want to stop the notification after 2 AM, so I have a check inside the repeat to stop the actions if the time is between the rather arbitrary time I chose of 2-4 AM, but I figure that gives you a bit of wiggle room if your hub happens to have been rebooting or something during that time and didn't get the memo. There may be a less awkward way to do this that I can't think of now.
Hey @keithl
Here is my sunset check for my garage door
Notification is every 5 mins, until we turn off a virtual switch either through the dashboard or via Alexa. What it doesn't contain is the 2:00am cancel, which might be nothing more than another rule to stop the first, just as a thought
Good luck and enjoy
Rick