How to Pause notification

I have a rule that notifies me if any of our motion sensors detect motion while we are away. I'm trying to get the motion sensitivity on each sensor dialed so that the cat and the Roomba aren't detected so that I could have motion sensors integrated into HSM without the cat or roomba triggering the alarm.

The problem is that currently I get at least a dozen notifications when the Roomba is running near one of the motion sensors.

What is the best way to pause and resume the rule or notification when motion is detected. All I really need to know is that motion was detected once, I dont need to know it was detected a dozen times and have it blow up my phone like a crazy ex girlfriend! Thanks!

I would use a virtual switch to restrict the notifications
Iā€™m sure you could create a rule in RM that when the vacuum is running.. turn on/off the switch.
Then on your notification rule make it so it wonā€™t run when the switch is on.

I donā€™t use RM so canā€™t comment on how the rule would be constructed but Iā€™m sure someone will come along who can tell you how to do that.

Andy

2 Likes

The other thing you'll need to consider is: what does this mean? Is this all from the same sensor? If so, It is sending it once per "active" event if that's how your rule (which I don't see so can't say exactly) is set up. The above may be helpful, but perhaps you mean also "only notify once within this amount of time." You could add something to your rule to do that (probably lots of different ways--but I'd probably use private boolean and have the rule set, check, and eventually reset its value).

Alternatively, the built-in Notifications app already has this feature built-in, though if you do ever figure out a way to pause the notifications when your Roomba is on, you probably couldn't work that into that app.

Hmm private booleans are a little advanced for this novice!

Here's how I have the rule setup:

I remember reading in they recent hubitat update release notes that a rule can now pause itself. I tried this method but it seems as rule can't resume itself once it is paused. I also don't see anything in the notification action that restricts how many notifications are sent in a period of time.

I'm still not sure what you mean with only getting notified "once," since you could mean only once per sensor within a specific amount of time, once for all sensors within a specific amount of time, or once until all sensors go inactive and then immediately "reset" and allow you to get notified again. Rule Machine will, of course, make you specify exactly what you mean. :slight_smile:

I'll assume you want something like the second option above, so I wrote a rule that, like yours, notifies you when any of the sensors go active. But after it notifies you, it also sets the rule's Private Boolean to true, which I'm using to mean that you've recently been notified. Therefore, it checks before notifying and only does so if it's false, and it also resets the Private Boolean back to false one hour after all motion stops. If any new motion starts in the meantime, this delay is cancelled, so if motion stays active or becomes active again within that hour, so as-written you won't get notified unless motion stops for a full hour and then starts again. If you want to be notified once per hour regardless, you can take out the "Cancel Delayed Actions" action and un-set the "cancelable" flag on the delay.

So, again, there are lots of possibilities, but here's one as above:

I meant the Notifications app, not anything within the Rule Machine app. See here for more: https://docs.hubitat.com/index.php?title=Notifications. If you're not familiar, Hubitat has a lot of built-in apps to handle commonly-wanted automations, this being one of them--no need to resort to Rule Machine for everything, and most of these are a lot easier to set up (with the caveat being, of course, that unlike these, RM is arbitrarily customizable).

Yeah, a rule won't run at all when it's paused, so you'll have to find a way to un-pause it from another rule. But as you can see, in this case, there are things you can do that don't involve pausing at all.

Hope this helps!

Awesome! Thanks for this thorough reply! I think your private bolean rule will work exactly like I was trying to do. I basically just want to be notified once per sensor when I'm away. If it detects motion once from the cat or roomba, that's all I need to know as it's told me the sensitivity needs to be adjusted further for that sensor.

You also pointed out the notification app which somehow I've completely overlooked in my several weeks using hubitat. I have simple notifications being done in RM that I could move to this app! Thanks!

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.