Enter a “Name” for the device, this can be whatever you want.
Enter a “Label” for the device, this is optional and can be whatever you want.
Enter a “Device Network Id” This can be anything you want. I recommend short and sweet but it cannot duplicate other device ID’s. Lets say it was a virtual switch for your living room lights, maybe call it LRVD01
“Zigbee” Id should be left blank
Select a “Type” from the dropdown, this should be Simulated Switch
“Version” should be published
“Location” should be your hub location, probably “Home”
“Hub” should be your hub name.
“Group” you won’t be able to select when creating, but these are Groups you’ve created in the Things page in the SmartThings app.
Now you have a Virtual On/Off Switch in Things on your SmartThings App. You can use this Virtual Device
The process is very similar for other Virtual Devices, instead of Simulated Switch you can choose from many other Simulated Device Types.
Use “momentary button tile” or one of the other momentary device types if you want something more like a classic doorbell button where it only goes on at the moment that you activate it, and then returns to the off state on its own.
Both are useful, but they serve different purposes.
Also, when choosing a device ID for the virtual switch, you need to be careful not to choose one that a future Z wave switch will want to also use or that future device may not pair correctly to your network. The easiest thing is just to choose a virtual device ID that starts with a letter higher than “H.” I start all of my virtual devices with the V.
Also, for those who want a virtual dimmer, see the following:
At the time of this writing, the only virtual switch DTH that works with the new V3 app without requiring modification is the “virtual switch.“ None of the momentary options.
You can make a Virtual switch act like a momentary switch by first creating a virtual switch and then adding a separate SmartLighting automation to use the “power allowance“ feature and have the virtual switch always turn itself off after one minute.
(On the plus side, this specific DTH can run locally. As of this writing, Other virtual devices will run in the cloud.)
Since groovy will be going away soon, so will groovy virtual switches.
One community member has written a new virtual switch creator Edge Driver for the new platform called VEdge Creator. Since edge drivers themselves are still in Beta, so is this code, but it’s worth following.
Note also that while groovy virtual devices could be used without a SmartThings hub, Edge drivers will require one.
I’m trying to use this Virtual Device to connect to IFTTT, but it seems to not be showing in my ‘switch’ list on the website. Hopefully this is a time thing, and it will show after some time. Anyone have any ideas why it might not be showing up? I’ve done the instructions to a T.
My idea is that when I leave work, it will set my air conditioner using a “Home Mode”.
Just wanted to mention that sometime in all of the recent platform changes the terminology changed as well: what used to be listed as virtual switches are now called “simulated” in the ID. Everything else is the same, though.
One additional issues since this FAQ was originally written is that SmartThings now has multiple database servers. If your device list is blank when you follow the link in the step by step instructions above, see post 46 below in this thread.
Also, @BBoy486 has a topic where community members can answer the second question in the original post in this thread: why would you use a virtual device in the first place?
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy)
Yup… This is a confusing choice of terminology, because when I think of “simulated” Devices, I think only of those that run in the IDE’s Simulator.
The IDE Simulator is a very important piece of the SmartThings Platform, of course…
But even the Simulator doesn’t call test Devices “Simulated Devices” … it categorizes simulated Devices as “Virtual Devices”!!!. Here is the relevant screen snip:
(Jason "The Enabler" as deemed so by @Smart)
Ok, newbie question. To clarify the use of a virtual switch please tell me if I have this right.
Let’s say I have a device connected to my ST hub that is not compatible, or recognized, by Amazon echo. I can use the virtual switch to control the unseen device via echo?
Also, how do I tire the virtual switch to the physical device?
Did you follow the link I just gave you? I know the forum is a little bit confusing, you have to click twice on the little tiny arrow that is pointing right on the far right side of the quote, and it will take you to that Thread.
Step two in that thread discusses exactly that issue. And gives you the link to a smart app, Alexa Helper, to do just that.
Normally, you would connect the two by having a routine that triggers what you want to have happen after your virtual switch comes on.
So let’s say you want your virtual switch to lock your door.
You set up a routine that does nothing except lock that door.
Then you use have the virtual switch trigger that routine.
So here are the exact steps:
One) create a virtual switch
Two) create a routine to do whatever you want to have happen when you flip that virtual switch
Three) Use the virtual switch to trigger the routine
( we used to have to use Alexa helper or another smartapp to tie the virtual switch and the routine together, but starting sometime early in 2018, they made this an official option so you can have a routine start when a switch comes on. So you no longer need Alexa helper.)
(Jason "The Enabler" as deemed so by @Smart)
I had no idea that was a link, thanks for pointing that out to me.
I did figure it out, your comments and links helped greatly.
I created a virtual switch, which I added to echo. I then installed a smart app and used the virtual switch as a trigger to control the device. I added the switch to a room for organization and now echo controls the switch.
I also see how the routines work with the switch as well.
Do you Mean one where if it’s on turn it off, and if it’s off, turn it on? Several people have done that code, I think if you search the forum for toggle you would probably find it. I don’t believe there’s a standard device type that does that, but I could be wrong.
See the following topic, you should be able to amend it to do what you want. If you don’t know how, ask in that topic and I’m sure those guys will be glad to help you.
I did search but did not come up with anything at the time. I will search again. I can manually toggle an On/Off switch and it will work. But was looking for something that does it automatically, As always thanks again @JDRoberts