SmartThings Community

FAQ: Creating a virtual Device

virtualdevice
(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #103

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

#104

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?

0 Likes

#105

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

#106

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

2 Likes

#107

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?

0 Likes

#108

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)

0 Likes

#109

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

0 Likes

(amraoui) #110

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?

0 Likes

(sidjohn1) #111

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

Control “Fully Dashboard” via API with a DTH?
#112

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

0 Likes

(amraoui) #113

No, not yet.

0 Likes

(Wayne Dixon) #114

Is there any way for virtual switch to report power consumption? I have a smart power strip and have created virtual switches for each of the plugs but would like a way to use the power consumption to trigger events.

0 Likes

(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #115

I don’t think the “standard/stock” Virtual Switch has power consumption, but you could certainly create a customized Device Handler (by adding capability “power”, etc., to a copy of the Virtual Switch source code).

You would then need to have a SmartApp (or WebCoRE) read power usage from the individual items on the strip and post it to the Virtual Power Metering Switch. You might also be able to accomplish your end-goal with just WebCoRE and not need a Virtual Device at all.

In other words: A fun project… but not a novice project.

3 Likes

#116

OK, I would love to be able to create a virtual switch and assign it a two character hexadecimal device network ID manually? Can ST handle that? IF I assign a DNId as a two digit hex will smartthings recognize that gracefully and not try to automatically assign that already used ID the next time I add a zwave device? Or will that risk device ID conflicts in the hub in the future?

Lee

0 Likes

#117

Conflicts will ensue. The device ID for the real devices are assigned by the zwave controller inside the hub which doesn’t itself know anything about the virtual devices, which are created in your cloud account.

3 Likes

#118

Thanks, I guess I need another solution…:slight_smile:

1 Like

#119

You could have 15 of them, F0 to FE, since those are not assigned to real devices in Zwave. :sunglasses:

0 Likes

(sidjohn1) #120

I’m courious on why you need a virtual device to have a particular device or network ID?

2 Likes

#121

I am using GE/Jasco dimmer switches and Nuttytree’s DTH in part of my home to control various lighting. Nuttytree’s DTH supports double tap and thus in the DTH itself you can assign zwave 2 digit hex device ids which have been assign by ST hub automatically to the double tap of buttons. His DTH only allows these types of ids. However, in some rooms I also have Hue Color bulbs in some fixtures. Those unfortunately do not have 2 digit hex ids. I was hoping that I could use a simulated switch to create a device with a two digit ID. then I could have webcore trigger the Hue bulbs on/off via a virtual switch.

If you have other suggestions that would be great. I have asked nuttytree if he can add a webcore readable state to the buttons in his DTH that reflects “double” so I could use that as an event trigger in webcore but I have not heard back yet. Currently the only readable state of his DTH when a button is pressed in “pressed”.

LJ

0 Likes

#122

Well 15 is better than none and would suffice for my current usage. I did not know that. If I can’t get nuttytree to change his DTH a bit, I may have to do that for now until I find another, more graceful solution.

Thanks,

LJ

0 Likes