FAQ: Creating a virtual Device

I’m not seeing the “Switch Activates Home Phrase” and “Switch Changes Mode” app under Lights & Switches. How can I get them to show up?

These are no longer used. About a year ago they added the ability to trigger a SmartThings routine from a switch right into the routine itself, so you no longer need a separate smartapp.

Just edit the routine. At the end of the options there will be a section to “automatically perform…” And you can specify “when something turns on or off” and then select your virtual switch there.

If you just want to change the Mode, create a new routine that does nothing but change the mode and have it “automatically perform” when the switch turns on.

Is it possible to have a virtual switch or dimmer as child of a custom device?

I am working on an integration with Control4 and would like to have the C4 controller as a device with virtual switches or dimmers as childs.

I was capable of accomplishing that by creating customs DHs for switches and dimmers but I rather prefer to use the embedded ones.

I am testing out the virtual switch with IFTTT and Stringify.

I have two Stringify flows activated on the switch state (on / off).

Same setup with IFTTT – two applets where one is triggered when the switch is turned on and the other when the switch is turned off.

For me, Stringify flows are working just fine. But IFTTT applets never runs.

Is that expected?

Hi Guys
Hoping someone can help me with this. Ive used KukuHarmony ( [RELEASE] KuKuHarmony - DTH and SmartApp that support to control devices in Logitech Harmony(using Harmony-API) )to add devices to ST to control Harmony. The next step is to create virtual buttons in ST, and use webcore to push the them… Unfortunately ST creates the device as a switch, and only when you open the device can you control things like volume.

I want to use this to add a button to Actiontiles to create a universal remote.

In the IDE, Ive create a momentary button tile called Volume Up, i want webcore to then push the feature for volume up

In webcore, I add a new piston and add a new condition, however I cant find the momentary button under either physical or virtual buttons?
How exactly do I link this? Sorry completely new to webcore

1 Like

This is an FAQ thread on creating virtual devices in the IDE . Please take specific individual questions on using virtual switches after you have created them Like this one to the webcore forum: the experts there will be able to help you.

2 Likes

Why are you creating virtual buttons? Can’t you just use Webcore to push the buttons created by the KuKu app for the device.
I do the same thing in Webcore to control a fan and a window AC.

Why are you creating virtual buttons? Can’t you just use Webcore to push the buttons created by the KuKu app for the device.
I do the same thing in Webcore to control a fan and a window AC.

Webcore drives the buttons, but my understanding is to have the button in AT, as you need a virtual button(tile) to push. The buttons created in ST unfortunately cant be linked to AT, or at least if they can I dont know how to do it? This might be possible via alex/google home, but I dont see a way without the virtual button?

1 Like

You should be using Virtual “Momentary Button” not “Virtual Button”.

  • Momentary Buttons are Actuators (Switches that turn on then off immediately).
  • Buttons are only Sensors (they sense that someone has physically pushed them).

This is a big area of ambiguity that SmartThings has never taken the effort to clarify.

You can create Virtual Momentary Buttons manually in the IDE if they are not available anywhere else. In the IDE you can assign them to a personal DTH which must claim Capability “Actuator” to work with ActionTiles.

1 Like

Momentary Buttons are Actuators (Switches that turn on then off immediately).
Buttons are only Sensors (they sense that someone has physically pushed them).
This is a big area of ambiguity that SmartThings has never taken the effort to clarify.
You can create Virtual Momentary Buttons manually in the IDE if they are not available anywhere else. In the IDE you can assign them to a personal DTH which must claim Capability “Actuator” to work with ActionTiles.

Exactly what Ive done… sorry for the confusion

1 Like

No problem. … I think we’re drifting off the main Topic here, though; maybe… well…

The use of Virtual Momentary Buttons and having them link one-way to the Commands of a custom DTH (like the Samsung TV) is relatively basic. I’m surprised there is no template SmartApp for this. If you’re not in a rush, I could try to pull up a template from someone deep in my files.

Use of WebCoRE for one-way linking like this may be excessive. It may or may not be more or less complicated than a custom SmartApp. Personally, I’d use a Custom SmartApp.

1 Like

Hey I am trying to create a virtual sensor, followed all the steps on the faq, but when I hit create I get a message that I’m not authorized. Any ideas?

Use an Incognito window if using Chrome. Never really found out what the deal was but that was the recommendation from a while back.

4 Likes

That did it, thanks! Hopefully I’ll remember this next time …

2 Likes

I have a question. I have set up a virtual contact switch as type simulated contact sensor in ST. This switch also show up in the alexa ap. I have created a test routine in alexa that should ring when this switch closes. I can see that the switch’s state in alexa app changes when I push it in the ST app. They seem to sync very well. My problem is that Al

exa does not trigger the routine eventhoug the virtual switch changes. Any suggestions?

A number of people ran into this issue when setting up a virtual sensor. They found that they needed to sign out from the Amazon app and sign in again, or disable/re-enable the SmartThings skill, or in a few cases to remove the Alexa app and re-add it.

See the following thread ( this is a clickable link)

Thanks. That solved it, but it seems I have to do this everytime I add a virtual device.

Hi everyone, I have an issue in creating a Directly Connected Virtual Device in Dev. Workspace.

I successfully created a devices profile (Develop -> Devices -> Device Profile) but when I tried to select a Device Profile (Tools -> Virtual Device) to create a virtual device, I couldn’t find the DP that I have created (No options).

Any help, please?

You can also use the Virtual Device Creator (Add a Smartapp -> +More ) and create a virtual switch or dimmer and hit save.

It’s easer than using the web interface.

2 Likes

Did you ever figure it out? I have the same problem. I even downloaded the ST CLI and the profile doesn’t even show.