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.


© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.