So i created a virtual switch on my smartthings groove with the following device
Smartthings with smartapps : Garage Open Momentary Button Tile & Garage Close Momentary Button Tile
Since its a on/off switch - i created it on my Sharptools Dashboard it does the following
press it once to open the garage (on) - which triggers the MyQ garage to open
since its a virtual switch the Garage Open Momentary Button Tile signals ON (turns color green)
press it once to garage the garage (on) - which triggers the MyQ garage to close
since its a virtual switch the Garage Open Momentary Button Tile signals ON (turns color red)
How do i make it to where i dont have to press it again to turn OFF both tile?
Do i create a rule/ variable on Sharpstools? Do i create a routine with Smartthings?
Hi @Aren_Navarro, welcome to the community. if I understand the question correctly, you wanted the Garage Open Momentary Switch and Garage Close Momentary Switch to be turned off automatically a few moments after they were turned on?
If so, you can create a rule using the Open and Off switched turned on as triggers, wait a few seconds and turn it off. Since this rule will be triggered when either switch turns on, I used the IF_Condition to determine which one was turned on and needs to be turned off.
Or let me know if this is not what you were asking for.
I just realized the MyQ ST DTH actually turns the Open/Close Momentary switch on and then off when the switch is either switched on or off after @josh reminded me. So creating the rule to turn the switch off automatically will cause the loop condition.
The comments from @josh can be found here.
I tried doing the rule that you have in the picture but as soon as the garage opened then it triggered to close the garage. So that got me to thinking i have both Garage Open and Close under one rule.
GARAGE OPEN Triggers > Event Trigger - Device
Garage Door Opener - switch changes to ‘on’ Flow > If Condition > Condition Device
Garage Door Opener - switch is ‘on’ Then > Action - Device
Garage Door Opener to execute command off Else > Action Device
Garage Door Opener to execute command off SAVE & ENABLE
So i did this to the Garage Door Closer as well and tested it and this seemed to work but only problem is it blinks the color while the triggers are in action.
for example the button flashes green every few seconds when opening and flashes red every few seconds when closing. I get it when i created the tile switch state is the red and green colors but overall it does the job on of turning the tile off automatically.
@Aren_Navarro, thanks for the updates. Can you please take screenshots and post them here so I can better understand your rules and devices setup?
I am not sure if I understand the logic here. Is the Garage Door Opener the Virtual Switch or one of the Open & Close Momentary Buttons created by the MyQ device? If it’s the virtual switch, I think the garage door will be immediately closed. (And you don’t need the IF_Condition in this case since the condition is exactly the same as trigger, and the activities in the THEN and ELSE are the same as well.)
The flashing tile color may be caused by rules being triggered repeatedly and looped, which should be avoided.
The Momentary Button Tile DTH immediately issues an ‘on’ state and immediately issues an ‘off’ state.
Sending an off() command for this particular device is the same as sending the on() command, so you do not want to setup a rule to send the off command when the switch turns on or it’s just going to loop until it gets rate limited. (Momentary Button Tile code)
The way that this devices sends the on and off events immediately could be an issue for display purposes with the Switch Tile.
I would suggest either:
A) Change the tile layout from Switch Tile to Momentary Tile and disable the rule(s) that have been created to send the off command when the switch turns on
B) Change the Device Type Handler for these particular virtual devices to use the normal Virtual Switch DTH (then the rule for turning the switch back off when it turns on would be needed)
Ugh, that makes sense. @Aren_Navarro, I apologize that I wasn’t aware of this Momentary Button Tile DTH issues On and then Off immediately and when the switch is either turned on or off. So @josh is right and that’s why the tile flashes. (I also edited my response earlier for others hit this thread later.)