There is a very good thread outlining the uses for a virtual switch and tying it to a “hello home” routine, for reference, that thread is here: Alexa FAQ.
I was able to create the virtual switches and tie their “transition” to ON or OFF to separate Hello Home Routines… This in itself works very well and I can then tell Alexa to discover my devices, then tell Alexa to “turn off Virtual Garage Door 1” and it will set the virtual switch to off, the transition from on to off will then trigger my hello home routine “Close Garage Door 1” and all is well. This is of course all to allow me to bypass Alexa’s inability to allow users to control doors and locks and other unsupported devices. I also add the virtual switch to the group “Garage” and not I can simply tell Alexa to “turn off the Garage” and it will close the garage door, turn off any lights in the garage etc… This is the ideal situation/command.
My Problem is that much like a Home entertainment system without discrete on/off switches, if the device I’m trying to close or open (garage door in this case) is opened or closed in a way OTHER than by setting the virtual switch state, then the switch and the door will be out of synch. For example:
So, in order to make virtual switches work with Alexa, I really need a mechanism to tie the current state of a device to the state of the virtual switch. Ideally, I do not want to do this with an external app, I would like all of the logic to be executed locally without having to go out to the Internet and it should be simple to configure, something like a “State Match App” which allows you to tie a device to a virtual switch and updates the state of the virtual switch to whatever the device being controlled is, or add this to the virtual switch itself as a configuration option.
Is there a way to do this with existing drivers and/or apps ?
One other comment… There has been some reference to using the lighting smart app and using the power allowance exceeded option and setting it to a small number so that when the virtual switch is set to “ON”, the smart app would then toggle it to off, but this just complicates it further since there is now a state where the door was opened using the virtual switch, the state is now off due to power allowance and then I go to close it using alexa, it will fail because the switch is off…
I thought about using momentary switches and creating 1 for each direction (close/open) but then it is not possible to integrate this easily with Alexa since the goal is to simply say “Alexa, turn off the garage”, this can’t be done with 2 push button switches. I suppose I could get creative and create a group called “Nighttime Garage” and “Daytime Garage” in Alexa and add the push button switch that triggers the close garage to nighttime and the one that triggers open garage to daytime, effectively doubling the number of any groups I have in Alexa and yes, this would work, but my wife would never find this easy to use and that is really the ultimate goal/test. I am trying to operate within a very simple framework of allowing anyone in the home to remember as few details as possible about HOW to execute commands “specific action” room names and just rely on the fact that if you tell alexa to turn off a room, everything in that room will transition to off (as long as it’s in the alexa group)
I’m open to suggestions.
Some additional summary details below, sorry for the long winded post.
I would like to be able to open or close the garage door in any of the following 4 ways:
Manually with the garage door switch (coded or otherwise)
Via the smart things app
Via Alexa by saying "Turn off ‘virtual switch 1’ "
Via Alexa by saying “turn off workshop” where the workshop group in alexa contains all of the lights, door locks, garage door openers etc…
I can accomplish items 1-3 just fine, item 4 is the problem. I am not able to control which method of “turning on” or “turning off” a room is executed (Wife and friends).
Sometimes I work with the door open. sometimes not. Another good example of this is as follows:
I tell alexa to turn off the Garage, Alexa togles virtual switch to off which triggers Linear to close the garage door. The state of the virtual switch is now “OFF”
Wife drives home afterward and opens the door with standard garage opener (I am not going to train the wife on proper garage door etiquette… )
Smarthings thinks virtual switch is “OFF”
Someone tells Alexa to “Turn off the Garage”. If the lights were on, they are now off since their state is known, if they were already off, that’s fine too. The virtual switch “VGarage” is now set to “Off”, no change occurs from it’s previous state, hence no trigger of the routine to close the Linear controller, garage door stays open all night, raccoons now have a home, wife is pissed, smarthome is disabled, all residents now have to get off their butts and manually turn off switches and close doors.
I think if I can trigger the state of the virtual switch by the position of the linear door opener, it will solve my problem. Ideally, I would prefer to do so without non-local device drivers or IFTT. Right now, the ONLY device that the virtual switch triggers is the linear controllers. I have 2 virtual switches:
I added VGarage to the group “Garage” in Alexa, this group now contains:
a. Garage Light Switch (GE)
b. garage overhead door 1 (Linear)
c. Garaget door lock (to be added later)
I added VWorkshop to the group “Workshop” in Alexa, this group now contains:
a. Workshop Light Switch (GE)
b. Workshop Overhead Door 1 (Linear)
c. Workshop Door Lock (Kwikset)
“Close Workshop Overhead Door 1” will close the Linear controller in the workshop when the VWorkshop switch is set to “off”
“Open Workshop Overhead Door 1” will close the Linear controller in the workshop when the VWorkshop switch is set to “on”
Same for Garage.