I have a couple doors that don't always get shut all the way (or the contact sensors don't register the door getting shut). I'd like to have a simple notification when a normally-closed door appears to be open for more than a few minutes, then another notification when that's addressed.
Solutions I'm aware of:
Notifier can tell me when any door has been open too long, and could tell me whenever a door closes, but can't restrict close notifications to only resolutions of open notifications.
Rule Machine could easily trigger on any door being open for too long, notify, then wait for closure. However, I don't see a way to wait for closure of the event device in particular, so any door closing would make it think it's remediated.
Alternately, Rule Machine could trigger a rule on each door individually, but that requires creating near-identical rules for each door. Possible, but a pain.
Am I missing a more elegant built-in solution to this, or is this another case where the only more elegant solution would be a custom app?
(3) use another rule machine rule to trigger when the offending door closes, if a precondition is met that your local variable is true. In the actions of that rule, set your local variable back to false, notify of door closure, and cancel the HSM alert.
(here’s my legacy RM rule, but if setting up via new RM use preconditions instead)
If you want this for multiple doors without having to create a bunch of copies of this for different doors, you might could instead trigger the custom HSM alert when any of the doors is left open, then only trigger the second rule machine rule when all of the doors are closed. Might be some corner cases missed with that, like one door being left open for too long and then another door being left open for too long as well, etc, but I think in practice it would work.