FAQ: Creating Virtual Devices with the new architecture (Without the IDE) (2023)

1. 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.

FAQ: Using the quick browse lists without the community wiki

2. 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.

Fortunately, the new architecture has added some options for this.

You can create a simple virtual on/off switch or a virtual lock using the official SmartThings Web App at

My.smartthings.com

Once there, use the 3 vertical dots Icon And go to the “advanced users“ page.

Then choose “devices,” and look for “add a device” and then just choose the type of virtual device you want to create. Make sure you put it in a room so you’ll be able to find it again.

If you create a virtual switch, it won’t trigger Alexa Routines.
But if you create a virtual lock, it can be used to trigger Alexa routines.

(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. )

You can create a virtual sensor, but you won’t have any way of making it open and close on unless you get into some of the more complicated advanced options like the rules API.

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.

3. ONE MORE OPTION: USE A PHYSICAL DEVICE AS A PROXY

One more option, particularly if you need the virtual device to integrate with a third-party system, is to use a physical device which is visible to both systems as a proxy.

For example, I do this with a Tapo Matter over WiFi smart plug, which I use to proxy Geopresence between Apple HomeKit and smartthings.

No special coding is required. I just have a routine in HomeKit to turn on one of the smart plug when a particular person arrives home, and smartthings can see that socket come on and I can trigger smartthings events from that using smartthings routines.

This is a really simple method. You do have to buy an extra device, but it can definitely be useful for some situations.

US:

UK:

In the case of Meross, they have one model line that works with HomeKit, and one for slightly less money that doesn’t, so if your goal was to get proxy integration with HomeKit, make sure you get the right model.

There are other brands that can do the same thing, or you might only need a single smart plug, there are actually quite a few devices to choose from for this method. :sunglasses:

The Tapo is a good choice if you want something that works with Apple HomeKit and smartthings.

Physical device proxy to trigger Alexa routines

If you want something that can be used as the “if” in an Alexa routine, it will probably have to be a device that works with a hue hub. Or some of the Matter switches/smartplugs, like the Tapo mentioned above. At the time of this writing, these were the only actionable lights/switches that could be used to trigger an Alexa routine. Hopefully they will add more brands over time.

Of course, you might find it annoying if you use a white light bulb because it will be visibly on or off. So it might be worth spending a little more money and getting one of the smart plugs instead.

The Hue brand smart plug works fine for this purpose.

US:

I haven’t confirmed that the UK version will work as an Alexa routine trigger, so if someone knows for sure one way or the other, please let us know.

6 Likes

Hopefully i didnt miss something JD but it is possible to create a virtual device within the Smartthings app, the option is hidden away in the ‘Labs’ section of the app

1 Like

Yeah, at the present time that is only available in the android version of the app, and only for some regions, and I’ve been told privately that it may be going through some changes. Also i don’t think it can trigger an Alexa routine. So I was a little nervous to put it up. But if it’s working for you, that’s great. :sunglasses:

Here’s what Labs looks like on an iOS device in the US. No virtual switch creator. :disappointed_relieved:

1 Like

I have used it and it acts like the original virtual device from years ago, the creation part even leaves an inventory of the names you give to the device, quite nostalgic really :grin:

And if you have multiple hubs the option whilst creating is there to choose a hub you wamt the virtual device on

It should be noted
Using this virtual device method at time of writing does not allow local control

1 Like

Just watched a great you tube video on new virtual switches creation and use this morning. By Automate Your Life. Even I can set them up now.

1 Like

Forgot to mention it is on one titled “these 12 edge drivers change everything.” Has some older videos on using virtual switches. This one is updated. Rest of it was useful for other major edge drivers. But the part on virtual put it all together for me. These 12 SmartThings Edge Drivers Change EVERYTHING! - YouTube

2 Likes

A post was split to a new topic: Combine HomeKit with a SmartThings virtual device, maybe via Matter?