Simple Notifier app is repeating notifications immediately without honoring delay settings

I created a simple Notifier app to send out text messages and emails (using Twilio and Sendgrid) if it detects water from leak sensors. I want it to send the notification immediately and then do it again in 5 minutes if the state hasn't changed (from wet to dry). I tested it and it is sending a bunch of notifications immediately (4 of them in just a few seconds).

Here are the app settings:

Seems pretty simple. When the water changes to "wet" immediately send it.

Then repeat notifications, but wait 5 minutes.

Stop sending if it gets a new event (which would presumably be "dry" since the only other event is wet).

When I tested it, I got 4 text messages and emails right away and had to dry off the sensor to stop it.

If you look at the app event log, you can see the 4 sends as well:

Why isn't it honoring the 5 minute delay? Or am I just cross eyed here.

Could it be that the device goes on and off a few times? Have you looked at the events page for that device?

As a developer, I should have thought of that. Yeah that's what happening. 4 wet -> dry events occurred at the same time. So the device is reporting as dry again for some reason and then right back to wet a few seconds later.

If that's the case, I guess there's no way to use Notifier since none of the restrictions would prevent that from happening. If it resets to dry, and then throws another wet event, Notifier is going to kick in every time.

I've paused the Notifier for now and created a HSM app instead. Looks like custom monitoring rules to be configured for water sensors, wet state, only notify once every [x] minutes. I'll do some testing, but hopefully that takes care of this.

1 Like

Hmmm, for future reference can you please tell us what make/model sensor is doing this?

These are ThirdReality Zigbee sensors. They are actually really nice and work well. I'm going to do some testing to see if this happens again and/or if it's the result of partial contacts being wet.

1 Like

Another option you have is to 'debounce' the sensor. See this app in our public repo, which would be easy to modify for a water sensor being debounced instead of a contact sensor.


Brilliant idea, @bravenel! Thanks.

Circling back on this... Looks like the multiple events from wet/dry was a fluke or the water test I was using wasn't touching all the way. I just tried it again and it did not throw multiple events. I sat it in a really small puddle of water that only touched 2 of the 3 contacts. It thew one event (to "wet") and stayed in wet status until I removed it about 8 minutes later. I tried it again, and the same thing. So I think my original test was a fluke where I was dripping a little water nearby and the contact wasn't strong or consistent enough to stay in wet status.

Circling back on this yet again... I switched back to the Notifier app. HSM doesn't appear to actually fire every [x] minutes as it first appears. Looks like the "how many times per hour" setting is just a global variable that stops it from being activated again. Once armed, HSM does not come out of arming or send any additional alerts, so that's a dead end. But Notifier does work well (and does repeat correctly) assuming your device isn't going on and off over and over.

Download the Hubitat app