Hard time with simple rule


I really hope rule machine is one of those things that I just don't get.... Until I have one of those AHAA! moments. I create a trigger, set it as button 1 press, and then chose action of setting HSM to disarmed. For the life of me I can not figure out how to add more actions.

I am struggling with this simple rule. What I want to do is:
Push button 1 on my minimote
disable HSM
wait 7 minutes
enable HSM

Other than a mental block trying to figure out rule machine, Hubitat is checking all my boxes. Keep up the great work everyone! And once again thank you to this community, I find almost everything I need somewhere in these forums.


There's a few ways to do this, but the easiest (in my mind) is to create two rules. The first one would be the trigger rule on your button that disarms HSM and sets a global variable. The second rule would trigger off the global variable and then waits 7 minutes and arms HSM again.

You could also do it (again, with two rules) that disarms HSM and then waits 7 minutes to run the next rule to arm HSM.


Thanks I will give that a try. after you set the global variable and the second rule fires off, would I then use it to reset the global variable back to original value?


Yup. Exactly.


One of the hardest hurdles with learning Rule Machine is thinking One Rule is Best.

If you start your RM adventure with the idea that it takes three Rules to do anything, you usually get a great feeling when you figure out how to do it in TWO. :smiley:

I used to use single rules for turning on lights from motion and then turning them off after N minutes.

No more. Motion turns on lights during specific criteria. My OFF Rule has no criteria other than N mins after On.

Which means I feel good every time I look at those Rules and say.. "did it two" :smiley:


As @bravenel says, "Rules are free" lol


So that's where I got it from :slight_smile: that guy always beats me to the best platitudes.

That's the earliest search result I could find.. but I am biased :slight_smile:


Oh that feeling when something works! Thanks everyone. I did make two rules, first one sets HSM to disarmed when button 1 is pushed and changes global variable to true, second rule looks at global variable and if it is true waits 7 minutes, changes HSM to armednight and sets variable back false.

Worked on first try. Thanks for the understanding. I was used to doing everything in webcore and I am going to avoid webcore for all the warnings I have seen.

I like the advise that "Rules are free"


Now if I can just get my virtual switch working for open/close garage door I will be fully moved over from ST.

I have virtual switch, "Airlock" so I can control my garage via "ok google" on my phone.
So is the easiest way to open/close based on switch is to have 2 triggers?
trigger 1: "Airlock" switch = on, open garage door
trigger 2: "Airlock" switch = off, close garage door

Works for me, but if an easier way let me know.


Nope. That one you can do in a single triggered rule with the switch as the trigger.

If "Airlock" turns on then the True action would be to open the garage door and the False action would be to close it.


I can tell you how I'm doing the same...

I have a Virtual device:

As you can see, it has two Attributes (Current States) That mean the same but can be used independently. (more later)

Next is the Rule.


Thus, either attribute will open the door, when they are both off, the door closes.

It happens I have multiple hubs and I send that Virtual device over to the Hub that works with Amazon/Alexa/Echo. I tell the Amazon Echo Skill about the virtual device and one of Attributes is what it needs.

"Open the Pod Bay Doors" or "the Pod bay Doors on" etc will work, as does close or off.


Hey csteele, I like what you are doing, quick question, when selecting the conditions what am I supposed to choose? I am not sure what conditions I need. If I pick contact and then my virtual switch I get the "Podbay doors open" [false] but I can not find anything that will let me select "on"



It would depend on which Virtual driver you picked. I picked one that has two possibilities and I decided to evaluate both.

If you picked a Virtual Switch, then there's only one attribute.. and has only On or Off.


Hmm I picked the Virtual Garage Door Controller and it looks exactly like yours.


When I edit the Conditions and pick a condition (of two) to edit:


What is strange is I have a virtual garage door controller exactly like yours, but It dosn't act like a switch, it is either open or closed and the contact sensor is either open or closed as well.



The Rule will work fine.. you'll have to experiment with how happy Alexa is with it :smiley:

The ENTIRE reason I created the rule was for the coolness factor of "pod bay doors" BUT no one around here knows what I'm laughing about. :disappointed:


I'm old enough to know 2001. :smile: I wish changing Alexa's voice to Hal was an option. That would make me very happy. Thanks for the help and I will continue with experimenting. (That's the fun part anyway!)


Seriously? Did we not all go on and on about how old we all are in the Hubitat Support thread?! :wink:


Agreed. I thought "the pod bay doors" was humorous, and automatically assumed everyone else "got it" too. Sorry csteele! I would have made a 2001 Hal reference if I'd realize you were waiting for one!