RM - Notify me if Garage Door has been open for 15 mins

Notify me if Garage Door has been open for 15 mins and then every 15 mins after that till it is closed via pushover.

i cant wrap my head around what i need to do.

Any suggestions?

I use the "Notifier" app to do this - alert comes via the Hubitat app. There may be a way to direct this to Pushover, I just haven't tried it.

Use Notifications app, as recommended, and use the Text Notifications option and choose your pushoever device to send them to.


2020-12-09 12_42_11-Side Gate open five minutes

I would recommend the Notifications app for this purpose as well, as recommended above. That being said, if you are trying to learn Rule Machine and think this would be a good place to start, I recommend reading this thread that I often refer people to when the ask this question: How to get Repeated Notifications using Rule Machine - Apps - Hubitat. (It comes up often enough that they eventually added the "repeat" thing to the Notifications app so you don't need to use RM anymore. :slight_smile: )

Here's my version, in RM4.

Note that I've got a virtual switch named "Garage Door Automatic Closing". If that switch is off then Hubitat won't try to close the door...I find it very convenient to see the switch status and turn a switch on/off from a dashboard, rather than pausing a rule.

The "NoticePending" variable is used to prevent too many repeated notices during the Delay period.

(It's hard to imagine a worse way to share code than screenshots.)

2 Likes

As of 2.2.4, you can export rules and share the resulting JSON, so you can try that if you want. It doesn't seem to have caught on in the Community, though--and it that might actually be worse if there isn't also an accompanying screenshot to show what the final product should look like. :slight_smile: (Also, in before someone says "rules aren't code," which is true, but the terminology isn't really of consequence here.)

1 Like

Yep. Tried that.

wc Garage_door_left_open.json
    0   419 22189 Garage_door_left_open.json

OK, let's make it a little more human-readable than the exported file (a single line).

indent Garage_door_left_open.json 
wc Garage_door_left_open.json
  608  2780 25904 Garage_door_left_open.json

Could I share that? Sure....after editing out the device names (same devices that I blurred out in the screenshot) and editing out the names & values of some global variables (they're all listed in the json, and some have verbose names with personal info). Would someone be able to import it? Maybe...but the rule would be thoroughly broken due to the difference in device names. Would someone be able to edit the json to change device names and then import it? Probably. Would a human be able to read the json and parse it enough to understand the rule?

Maybe.

PAUSE

You've inspired me.

See: Text filtering to make exported JSON of RM rules human readable

1 Like

I thought I would add my rule to the mix. It is simple but it works. RM4Screen Shot 2020-12-09 at 8.18.03 PM

1 Like

thanks everyone for your help. ended up using notification app.

i had rules setup with rule manager 2 that now that i bought a new hub and moved doing it in 4 is learning alot again.

It took me a few tries, but I was able to do something very similar with the freezer door. I setup the notification for 1 minute and wanted it to keep notifying until somebody closed it. I also wanted to get notified that it was closed.

Cool, thanks for this. New to HE and learning all this.

Q: How can I configure this to continue to send a notification every 10 minutes, with total time since opening, until closed? perhaps this?

The %value% variable refers to the device attribute value, which here is open or closed for the garage door (or really only the former in this case). You might be able to use %time% to at least state the time at which it was opened, but there isn't a way to get the actual total number of minutes into the notification that I can think of.

Rule Machine could certainly be used for that if you really want, though it's a bit more work to setup. Otherwise, I think the Notifications app will work as you expect.

I do this a little different with a While loop to keep track of the door being open, rather then a IF statement. I also separated this that if one of us is home to just announce on device rather then send a message. The While loop helped me transition (If statement was not working well) from announcements on a device to mobile notifications. Aka, The door was open all day but then we left for whatever reason (don't always go out the garage), the alerts will transition to a mobile device.

1 Like

Agree...the Notifications app was purpose built for things like this. Works quite well, and easy to set up. But to each their own. :slight_smile:

2 Likes