Virtual Switch to Arm/Disarm Custom Monitoring Rule

Hi All,

I'm struggling to find a way to create a virtual switch to Arm/Disarm a single Hubitat Safety Monitor Custom Monitoring Rule. It seems you can only Arm/Disarm the whole Home Monitoring System.

My Use Case:
We have a door at the top of our stairs that lead to the basement. There is a sensor on this door. I have a Hubitat Safety Monitor Custom Rule set up that if the door is left open for longer than 1 minute, sound an alarm so that we know it was left open and can close it so our toddler doesn't tumble down the stairs.

I would like to have a virtual switch to turn this rule on or off with the dashboard or by using Google Home. Sometimes we will have the door open for longer than 1 minute to move stuff up and down and we obviously don't want the alarm going off.

Really appreciate any help! I could do this fairly simply on Wink but can't find a simple way on Hubitat despite it being far more customizeable than Wink on every other level! Perhaps there is a way to do this outside of Hubitat Safety Monitor but I can't find an option in Rule Machine to say "if the door is open longer than X minutes".

Actually it is quite simple on here as well. Create the virtual switch to "pause" the rule in RM.

I tried that but none of my HSM custom monitoring rules are listed as options in Rule Machine as Rules to pause. It seems only Rules made in Rule Machine can be paused.

I thought is was set up in RM.

Sorry, I definitely wasn't very clear! I edited my original post a bit to be more clear.

I don't believe there is a way (external from the HSM app) to disable any of the custom rules. @bravenel can confirm/refute this. Maybe this should be a feature request?

In the meantime, I would recommend moving any custom HSM rules that need separate control over to Rule Machine. I have already moved my battery monitor out of HSM and plan to move my Leak detection monitor as soon as things settle down a bit with RM 4.0. RM just gives you more flexibility.

Let's wait for Bruce to chime in first because there may be simpler resolution to this.

You can do this with RM 4.0 using the Disarm All action under HSM. But it is an all or nothing thing. Either all monitoring is disabled or custom monitoring is enabled and intrusion is available to arm if you use the Arm Monitor Rules.

Yep, I just had this conversation on another thread earlier this week. It would be nice to get more granular control of the custom monitors within HSM. I have decided to just move them to RM myself so they can be included in more complex automations down the line. I'll leave HSM for Intrusion monitoring only.

Thanks @stephack, that clears things up. Is there an easy way in Rule Machine to say "if contact sensor is open for longer than X minutes"? I'm just getting into hubitat and the more complex logic ability so a simple solution at this point would be appreciated if available.

Unfortunately I haven't created any RM 4.0 rules yet. All my rules are 2.5 and 3.0.
RM 4 is a very different beast so I don't want to give you outdated info.

Is there a way you know of that I can do this in the meantime with a rule 3.0 Rule Machine Rule?

I need the ability to monitor the state of a trigger for a period of time before performing an action for a couple automations I want to do. The other example is that I'm finding with the Hubitat Mobile app that when I'm travelling across the edge of the geofence, my phone's presence flips back and forth a few times between present and not present which triggers my home and away mode several times which obviously isn't ideal for alarms and light automations. So I'd like to say only change mode when away or home for x amount of minutes first.

This is for your contact sensor using RM 3.0. There multiple ways to accomplish the same thing with RM...but essentially what you need to do is:

  1. Delay the event for a time period (The event being the alarm)
  2. Set the event to cancel on truth change

Therefore, once the door opens a timer will kick off. If the door closes before the timer ends, it will cancel the event.

Below is an example that will announce "Door left open" on my sonos speaker if the contact remains open for 30 seconds. If I close the door before the timer expires, it will cancel the announcement. Just replace the Speak action with your Alarm action (I dont have a siren to show in my example.)

Awesome! Thanks @stephack ! I've got it working now! I think your same 3.0 rule would solve my other issue but I'm wondering if there is a way to do this in 4.0 since 3.0 will probably be retired at some point.

I have a temp sensor in my home entertainment stand and a large computer tower fan installed in the cabinet. I want the fan to come on if the temp rises above 29 degrees C and turn off if it's 29 degrees or below.

This was the 4.0 Rule I made which seems like it should work but it doesn't. It turns on the fan when the temp goes above 29 degrees but it doesn't turn the fan off when it goes down to 29 degrees or below. Is there a better way to do this in 4.0 or should I just use the same logic from your 3.0 rule with an action if false command?

This won't work the way you are expecting because the rule will only be triggered when the value is >29.0. @stephack's rule is from RM3.0 and you are using RM4.0 which is totally different. What you need to do is to change the trigger to CHANGES. However, you might also want to build in an override virtual switch because when you do that, it is going to turn on every time the temp is over 29 and turn off every time it is under 29 and the reading is updated by the sensor. All of the number checking is arbitrary in that it performs it every time instead of being a threshold where it only performs the function when it crosses the line.

Your rule is also missing an END-IF at the end. Not required in this instance but a good habit to get into so you don't forget it when you do need it.

1 Like

I would recommend you create a new post in the Rule Machine category asking for assistance on you fan rule. Provide as much detail as to what you would like to happen and when. We have many RM gurus, many of whom use temperature to control their fans and can share their setups with you. I think this is one of those automations that turns out to be more complex than expected because of how temp readings work and the many unexpected scenarios you may need to account for.

Also forgot to include this link. It's provides a general guide on building RM 4.0 rules and should be helpful. I would recommend at least skimming that documentation before posting in the RM section, it should help you better understand most of the responses you receive.