Virtual Device Help and Echo

Guys, I need some help with virtual device. I was able to find how to create virtual device. However, I can’t find how to use it. For instance, I just created virtual device “GoToBed” I want it to turn bed lights on and the rest lights off and lock the door. How do I do it? I see the virtual device in my ST things, however, I can’t figure out the way to include what lights I need to be turned off and which one is on, plus lock.

On top of it, the reason I am doing all of this is because, I just installed Amazon Echo and I want to be able to tell it to run on Go To Bed and have it perform all the tasks above. I assume, once I have selected what devices doing what under GoToBed virtual switch, it should appear in Echo and will be able to “turn it on”, right?

Thanks.

The FAQs should help. They both have step by step instructions.

The first one covers how to setup SmartThings to work with Echo. It sounds like you’ve already done that. But you may want to review the step on how to authorize additional devices as you add them over time.

The second FAQ covers how to use echo for something other than just turn a single device off and on through SmartThings. So changing the mode, running a routine, etc.

Smart lighting will do everything but the lock, you can also create a routine that will do all of it and use the “switch activated home phrase” aka routine smartapp

Thank you guys, but none of this answers my question.

Create a routine in SmartThings that does everything you want done.

Then follow the steps in the second FAQ above so that when echo turns on your virtual switch, that routine runs.

If you don’t know what “routines” are in SmartThings, see the welcome information in the official support knowledgebase. :sunglasses:

Ok, I got to be really dumb or today is just not my brainy day.
I know what routines are and of course use them. However, I don’t quite understand how to link them to the Echo. In the second link above it is stated that I need to create a virtual device, which I did. What I don’t understand is how to use that virtual device or link it with my routines.
Can anyone give me a dummy example?

Install this app. It works great and I’ve had no problem have my echo control everything in my house.

Do some reading on it first. Is tricky until you get the hang of it.

Set up a routine to do what you want done. Then use this app to tie the routine to the virtual switch. Have Alexa find the VS and you’re of to the races.

Alexa Helper is why I started doing the virtual switch. Alexa help description saying exactly that - “need to create virtual device”.
So back to my original question, how do I assign “action” to my virtual device?

OK let’s do this the simplest way possible and then later other community members can help you if you want to do some of the more complicated stuff.

  1. create a routine called “good night” in SmartThings that does all the actions that you want. When you are finished, anytime you tap the Goodnight routine button in the smartthings mobile apps your “good night” routine will run. So now the routine exists. But we want to be able to use it by telling echo to do it, instead of having to open the mobile app and tap the routine tile.

Check to make sure your New routine shows up on the routines list in your mobile app before continuing.

Two) create a virtual switch called “nighttime”. Again, other people can help you if you’re not sure that you got that part Right, but it sounds like you did. For the purposes of this example, we’ll call that switch “Nighttime” just so it’s clear what we’re talking about each time. You can actually call it anything you want.

Check to make sure your new switch shows up on the things list in your mobile app before continuing.

When you finish this step, you should be able to go to the things list in the SmartThings mobile app and see a switch called “nighttime.” But at this point, that switch doesn’t actually do anything.

So now we have a routine, and we have a switch. We need a smartapp to tie them together so that turning on the switch activates the routine.

Three) now you’re going to install one of the officially published smart apps called "Switch Activates Home Phrase " (routines used to be called “Hello Home Phrases” when this smartapp was first written.)

Open the SmartThings mobile app.

Click on the colored star asterisk in the lower right to open the Marketplace.

Choose Smartapps.

Choose “Lights and Switches.”

Scroll down until you see “Switch Activates Home Phrase”

and install that by clicking on install in the upper right and following the instructions.

The smartapp has a setup wizard that will let you pick the switch (“nighttime”) and the routine (which this smartapp calls a “phrase”) you want to connect to it (“good night”)

On each screen click “done” in the upper right, until you have completed installing the Smartapp.

When you finish this process, every time you toggle that switch, SmartThings will execute that routine. So if you went to the thing screen in the mobile app and tapped the “Nighttime” switch, your “good night” routine would run. :sunglasses:

  1. So now everything is set up, we just need to give echo permission to ask SmartThings to change the “nighttime” switch. So authorize Echo to use the “nighttime” switch following the FAQ instructions. Again, if you don’t know how to do that, others will help you.

After that, when you say “Alexa, turn on Nighttime” Alexa will tell SmartThings to flip that switch, and the “good night” routine will run.

“Alexa helper” is just a newer, fancier version of “switch activates home phrase,” which has more options and let you set up six switches at a time. But you can use the older version to do one switch at a time and it works just as well.

1 Like

Thank you JD, GREAT, description.

I’ve followed your instructions, but got stock at the “choose a switch to use” in Switch Activates Home Phrase. For some reason the virtual switch I created is not listed under things :-(?
I followed these instructions:

Login to the IDE @ https://graph.api.smartthings.com/337
Click “My Devices"
Click the “New Device” Button
Enter a “Name” for the device, this can be whatever you want.
Enter a “Label” for the device, this is optional and can be whatever you want.
Enter a “Device Network Id” This can be anything you want. I recommend short and sweet but it cannot duplicate other device ID’s. Lets say it was a virtual switch for your living room lights, maybe call it LRVD01
"Zigbee” Id should be left blank
Select a “Type” from the dropdown, this should be Simulated Switch
"Version" should be published
"Location" should be your hub location, probably “Home”
“Hub” should be your hub name.
“Group” you won’t be able to select when creating, but these are Groups you’ve created in the Things page in the SmartThings app.
Click Create

I can see virtual switch in IDE, however, I don’t see it on my mobile app, why is that?

Tagging @MichaelS

He is the author of the smart app.

If you are using the V2 of the app you may have to add it to a ‘room’…if it is in the IDE you should be able to see it in your app.

I got the new ST late September, so it is V2. Yes I see virtual device in the IDE, just can’t see it on my mobile ST app.

Contacted ST help and they fixed something on their end. I can now see my Night devices.

Ok, it works with the Switch Activates Home Phrase. Will try it with Alexa Helper now.

Thank you guys. I think I finally started figuring it out, a little :-).

Good luck…I am interested on how you like the Alexa Helper app and if you have any suggestions on improving it.

1 Like

So I installed and set up Alexa Helper. However, I don’t see it in my Echo devices. I ran discovery in Echo settings and nope it does not see my new virtual device, nor Alexa Helper routing.
What am I not doing right?

The whole Alexa thing is a multi step process…Here is a high level overview:

  1. Create the virtual switches. Ensure you can see them in your IDE and App
  2. Within the Alexa app (for iOS or Android), enable the SmartThings connectivity
  3. When you set up the connectivity to your ST account, choose the switches you want to use
  4. A new Echo/Alexa applet (within SmartThings) will appear. It should have the switches you set in the previous step chosen
  5. From there, ask Alexa to discover new devices.
  6. Now use my Alexa Helper to define what happens when your virtual switches are tripped

Let me know if that works.

I really like the app. Once I figured out all of the steps to making Echo work with ST… total brain fry there!

Something I’d like to see is a timer for a switch. Such as turn on a switch and then turn off after x minutes.

I’m not sure where I’d use that… maybe a bedside light or something… but I think it would be a useful option.

Thanks…I will think about other use cases where that can be implemented, but honestly, that almost feels like a separate app…One that monitors a switch and when it is on a timer starts and then turn it off when time is up. Alexa is really about voice control and what you are suggesting is more traditional 'If this, or that, but not this, then do this…" home automation programming.

1 Like

That is true. I’m sure that’s already available via IFTTT… but man do I really hate IFTTT.

I think the delay is just completely unacceptable.

It would be a great separate app. But in my world of everything organized I would like to see built-in.
Plus, it would be one less app running in the background. Which to me (I may be wrong) would save resources.