FAQ: Creating a virtual Device

That DTH has the double tap exposed as button 1 and 2 so if button 1 is pressed (=double tap on) turn on hue lights or if button 2 is pressed (=double tap off) turn off hue lights.

From DTH:
* Button Mappings:
* Double-Tap Up 1 pressed
* Double-Tap Down 2 pressed

How do i differentiate between a single tap and a double tap? I need the single tap to control the “dumb” lights in the room, and the double tap to control the Hue lights in the room.

Please start a new thread for this conversation, you are way off topic for this FAQ now. Thank you.


Gotcha, Will do.


1 Like

You are over thinking this, switch on/off = single tap and button 1/2 pressed = double tap. Set the piston up in webcore it will work.

I have created a virtual switch that starts a Scene (basically sets a light to a particular color). This works fine, but nothing happens when I turn the virtual switch off. This is because while I was prompted for the On action, having set that side of things up, I can’t find out where and how to add the Off action lol. This is an app usage question. How do I define the Off action of a virtual switch, in either the mobile interface or on the Web UI?

A scene is a “point in time” setting of multiple devices. A scene could have certain lights on, others off, dimmers set to specific levels.

So there’s no such thing as turning a scene off.

You can create a different scene to be activated when you turn the virtual switch off.

You didn’t mention how you created the automation to activate your scene. The Smart Lighting SmartApp can activate a scene (among other things) when you turn a real or virtual switch off.


Ok I worked out my problem was I was using a year old instructions - the newest I could find. But a year is a long time in the world of smart technology. I’d been told to set it up using the classic app. I was going around in circles in the UI not being able to see what to tap or swipe to attach any automation to the off action, only on. I understand the logical principles that you can’t turn a scene off without defining what the off state means, but I could not find any actual UI element to allow me to attach an off action. Eventually I discovered by trial and error that in fact it can be done in the new app now, and that was a very straightforward process.


I have followed these steps however in the app i get the “cannot connect to the device” error. on the web it appears to be online but in the ios app it is offline

this virtual switch is amazing - thank you everyone. It let me control my front door lock through google.


(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

Can someone please provide instructions on creating a virtual switch on the new app? Thanks.

Per the instructions in the first post it is not possible (at this time) to create a virtual switch is to use the IDE.

With the exception that the correct web address for the IDE is now https://account.smartthings.com

1 Like

I you want just a virtual switch, then there’s a smartapp for creating those called Virtual Device Creator in the Marketplace. Use Classic to get to it, and then the new app can use it. For just a normal virtual on/off switch or dimmer, this is what I use.

Via the Classic app, go to the Marketplace, then tap on the SmartApp tab, and then “+ More”, and then all the way at the bottom of the list you will find Virtual Device Creator.


I noticed that virtual switches created with Virtual Device Creator are “local”. This means I can use one in Smart Lighting and keep the whole automation local.


Hi guys. I just created a virtual switch through the IDE and I’m trying to use it in webcore but it won’t show up in the actions sections. Why is that?

Good question, but off topic for this particular thread. Start your own thread in the following section and someone should be able to help you.

webCoRE - SmartThings Community