Notification

I have a notification app that checks a door sensor status. If the door has been open for over 5 minutes, it will anounce "x door has been open, please close it".

The announcement will come every 30 seconds, until the door has been closed again.

The issue I am having is that if the door isn't closed for a while, when finally the door is closed, the notification keep telling me "x door has been closed, please close it". In other words, hubitat knows the door is closed already, but keep repeating the notification in a loop, even acknowledging that the door is already closed.




A single instance of Notifier does not have separate tracking for every device if you select multiple devices; the built-in %device% variable is always going to refer to the last device with an event, not necessarily the one you care about in this instance (which also means that you might see a different door name in your notification than the one that has been open for 5 minutes if you open another door within that timeframe).

The solution is to split each device you care about into a separate instance of Notifier, one for each, or perhaps find another solution/app for your problem, but I think this is a good, easy option!

2 Likes

This particular use case is the only piston I still have in webcore. Not only will it give you the name of the last device, you can have it list ALL devices that are still open. Would love to be able to do this in RM.

This is how I do it in webcore. Requires the use of a variable to store the list of items that are open. Works Flawlessly

thank you

thank you. can you share an anonymous version of the piston?

Anon Backup Code

Top Row, unknown devices ( 1,4,6,7,8 & 10) are Contact Sensors on Doors.

Switch 7 is a virtual switch I use to disable the rule

Switch 1, Switch 3, Switch 4, and unknown device are all speakers

Unknown Device 3 and unknown Device 12 are phones

You will also likely have to replace the modes with your own. I exclude my own vacation mode and yard work mode because I do not want it speaking while we are on vacation or out in the yard - The doors are intentionally left open while working in the yard. I did not exclude the phone alerts on Vacation (because I want to know if the doors get opened while we are out.... sometimes, the kids visit the empty house for us)

Change the "wait 5 minutes" to whatever time frame you want.

Once any door is opened, it gets registered to "devOpenDoors" and the timer starts. If the doors are all closed before the wait, it cancels. If they remain open, it will repeat the messages (verbal and phone notifications) until ALL the doors are closed.

thank you so much