IF YOU HAVE A SMARTTHINGS/AEOTEC HUB
Then life is easy. Several community members have created edge drivers (which run on your hub), and create virtual devices of many different types. There are regular simple on/off switches, momentary switches, virtual sensors of all types, virtual thermostats, even some other specialty devices. And there are virtual switches combined with virtual sensors which can be used to trigger Alexa routines. So lots of choices. There’s even one that lets you combine two physical devices, typically a tilt sensor and a garage door relay, into one virtual device that will look like a garage door, functionality that we used to have to do with a smartapp.
Different drivers have different features so you may want to look at several before deciding which to use, or use different ones for different use cases, but there are many community members now using each of the ones on offer.
To find them, go to the quick browse lists in the community-created wiki, and look for the virtual devices list.
- IF YOU DON’T HAVE A SMARTTHINGS/AEOTEC HUB
of course, the vast majority of smartthings users don’t have a hub, and this is where things get a little complicated. Many of them do still use virtual devices, particularly to trigger Alexa routines or to integrate with other third-party systems. We used to be able to create these just through the IDE whether we had a hub or not, but now that option is gone.
Officially, smartthings says they are still looking into possibilities for this, but there is no easy official feature at this time.
You can create a simple virtual on/off switch using the CLI which is a programmer’s tool for the new architecture, but that requires that you have a laptop, and are willing to get elbow deep into some code. And it won’t trigger Alexa Routines.
Fortunately, a community member has created a webpage utility that, while more complex than using the IDE, is way simpler than using the CLI on its own and does not require that you have anything other than a mobile device. This option, called API plus, will let you create simple on/off virtual switches or a virtual lock. And the virtual lock can be used to trigger an Alexa routine.
(And if you hate having to make the lock unlock when you’re in fact trying to turn something on, you can use a virtual switch with a routine so that when the virtual switch comes on, the virtual lock locks, so that the lock command gets hidden from the humans. )
SmartThings API Browser+ ... Now Available to All
So… There are some virtual device options for people who don’t have a hub, but there aren’t as many as there used to be in the old architecture, and they are more complicated to set up.
Hopefully, we will eventually get an official feature for creating virtual devices, which is easy to use and has more functionality. But we will just have to wait and see.