Help with logic on garage door

just got my hub and need some guidance on my one of my first rules. I plan to use alexa or google for voice control via a virtual switch (alexa)or virtual door (google).
I also need to account for manual operation. I have 2 thoughts on how to execute the rules. I think it can be done with the second option but i am interested in the best practices while i am getting started. I assume 1 rule is always preferred over 2? or am i better with one rule dedicated to each system to keep them separate? or is it all personal preference?

Option 1

Rule 1
If alexa virtual switch on or Door opening (open?)–
Then
True - Open garage, turn Google virtual switch on
False – cloes garage, turn google virtual switch off.

Rule 2
Inverse of rule 1 for Alexa.
Google on, alexa on, etc.

Option 2
Rule 1
Google virtual switch OR alexa virtual switch on OR door open.
Then
True – garage open, alexa Virtual sw on, Google virtual Sw on
False – garage closed, Alexa virtual sw off, google virtual sw off.

for this rule, Do i need a delay? Or does the order of operation keep the alternate method from interfering.

This is just step one. I plan to add presence at some point with life 360 and/or wifi.

thanks for your thoughs. you guidance is appreciated.

I would like to do the same thing. I was wondering if you ever found an answer, or what you did. I had a virtual switch that when on opened door, and off closed door, but then the virtual switch was out of "sync" with the actual garage door. I am am interested in what you did.

For me, I didn't want Alexa to be able to open the garage door, but the same logic should work...

I created a virtual switch (switch1) and set the "auto off" to 2s. Then, I created a rule triggered by turning on 'switch1' that then closes the garage door. This doesn't send a 'toggle' command, so if the door is closed it simply won't do anything.

To open, you could create another virtual switch (switch2) with the auto off set and another rule where turning on switch2 then opens the garage door. I didn't set that up because I didn't want any yelling the right command loud enough to open my garage door.

Note: Don't forget to then share the virtual switches through the Alexa app in hubitat, I always forget that part...

2 Likes

Thanks jplod32, I am going to set it up this way. seems simplest. I miss my garage app by rboy in Smartthings.