[RELEASE] Alexa Virtual Device Creator (Formally Alexa Virtual Switch) Creator

Oh…looks like like I am misunderstanding…however, THAT should work…I just created a virtual motion sensor with my app, put it in a routine and test it…seems to work as it spoke when I activated the motion sensor.

Are you sure you are activating the correct condition for the virtual device? It has to see the transition between one state and another.

I tested it by opening/closing the virtual device in the ST app. When I do that, I see it open/close in the Alexa app. And the Alexa routine is when it opens, say something.

I am not sure what is wrong…seems everything but the Alexa piece is working.

Yeah, I’m clearly doing something wrong, but no idea where. Also, if I manually run the routine in the Alexa app, the Echo talks. It just seems to pay no attention to the actual device opening/closing.

Use Alexa switch

This issue is discussed in the FAQ on using the new Alexa feature. Most people with the problem have found that they have to disable the SmartThings skill in the Alexa app and then re-enable it. There is a condition that needs to be set on a sensor when it is first added to Alexa in order for Amazon routines to fire, and it looks like it doesn’t always get set if you’re adding a device after you have other devices already set up. If it doesn’t get set correctly, you can still see the sensor in the Alexa app, it’s just that the routines don’t fire from it.

That could be it. Now it seems I’ve run into a new problem. Since ‘upgrading’ to a Samsung account a few days ago, I can only add/remove devices from the IDE in Incognito mode. Also, I just disabled and (attempted) to enable the Alexa skill only it seems I get an error about ‘authorizing the selected devices failed’.

One step forward and two steps back…

Wonder if someone can assist a new user…

I have recently purchased a ST (2018) Hub, 2 MP Sensors & 2 Motion Sensors. I will add more over time.

I have a piston set up in WebCoRE to send an SMS when an event happens but would also like to get one of my Echo’s to notify me that the event has occurred. (The Piston does work as intended so far).

I see that Alexa will natively tell me that one of my sensors is open/active but when I add a virtual switch or device, although Alexa detects it as a new device, I cant trigger a routine from it, only use it as an output.

I would like to end my Piston by turning on a virtual switch - Alexa detects that virtual switch has been turned on and then gives an announcement of my choice on my selected echo device.

Is this possible - if so, how?

I have also been trying to set up AskAlexa but run into difficulties but that is a another question!

Ask Alexa is definitely difficult to set up, but if you need help just let me know.

As for your question, you want the Echo to wake up and initiate a conversation instead of being spoken to first. Up until recently that wasn’t possible, but you can now with Echo Speaks. It is not fully supported by Amazon, but seems to work well for having the speakers wake on demand.

Let me know if that helps or if you want assistance installing Ask Alexa.

There’s a simple way to do it, but there’s a trick to it. You need to create a virtual device which is both a Contact sensor and a switch. Then you can turn on the switch from smartthings, that makes the contact sensor look like it’s open, and you can trigger your Amazon routine (not a smartthings routine) from the contact sensor. :sunglasses:

See the community FAQ: it’s pretty straightforward once you get the idea of it. You don’t need an Amazon developer account or anything.

2 Likes

@JDRoberts - Perfect - works like a charm!

FYI the piston is below, this triggers the new Virtual Switch to ON which in turn sets Alexa to:-

-Switch on a non ST Compatible Socket (Lamp is attached to this)
-Change Volume on Echo to 100%
-Play a warning message to check the Front door
-Wait One minute
-Lower Volume on Echo to 50%

I shall probably develop this and split the vibration and opening of the doors and have different Alexa Response. Again, thanks for the help.

2 Likes

@MichaelS Thank you for this. I am new to ST but enjoying it very much. I have followed your directions but not getting the results I was expecting. It may be misunderstanding on my end. Here’s my situation.

I have Govee Home LED TV light. It is connected to my Alexa account as Great Room TV Lights. It is a wifi/bluetooth device and I have to power it on and off when I want to use it. It does not talk to ST but does talk to Alexa. I was hoping I could create a WebCore Piston (or something similar) that would tell my Great Room TV Lights to turn on/off when my Logitech Harmony activity turns on/off. I was under the impression that your app/device handlers would read my Alexa devices and put them into ST as a Virtual Device. I have tried, but can’t seem to get that to happen. Am I misunderstanding how your app works? If so, do you know how I would be able to do what I’m trying to do? Thanks so much.

1 Like

Russell,

Thanks for the comments. I do believe there is some misunderstanding on how the app works. Basically, from a technical perspective, you may be thinking of this backwards; The devices are ‘virtual’ items that exist in SmartThings and allows for Alexa to control them. Not Alexa devices that could then be seen by SmartThings (although, that would be cool).

In your case with the Govee Light, you might be able to do this: I assume your Harmony is seen by SmartThings? If so, you could use a virtual motion sensor to activate when the Harmony is turned on. Then, have that trigger a routine within Alexa to activate the light. Pretty straight forward, and is a good use for the Virtual Device creator.

Let me know if that helps at all.

Thank you so much. This should work. I am new to this and have never done a WebCore piston yet. I have done SmartLights and Automations thru SmartThings app. My Harmony Hub can be seen by my SmartThings. I am trying like crazy to get my Motion Sensor to turn on when I turn on Harmony but I’m just not seeing that anywhere in the SmartLights and Automations in the new ST app. Is there something I’m missing? If it’s not possible there, I will try WebCore. Thanks again.

You can’t turn on traditional motion sensors programmically. Only virtual ones are controllable via Webcore. Have a look at the documentation for the virtual motion sensor as I think I documented how to activate it…I do this on my config for triggering a failsafe for a morning alarm.

Is there a link to the documentation? I have seen a lot of documentation and not sure which is the updated versions. Thank you

This is my first WebCore piston. Do I have this setup correctly? I cannot get it to activate. I know I have the Amazon Alexa Routine correct because I run it and it turns the lights on. I can not seem to get the motion sensor to work. I’m hoping my code is incorrect. Thanks

The documentation is at the top of this thread : http://thingsthataresmart.wiki/index.php?title=Alexa_Virtual_Device_Creator

As for your piston, it looks ok, but I am remote and would need to get off my mobile screen to look at the syntax.

I just looked at my piston and you are using the correct syntax. Remember you can only activate virtual motion sensors. And, you have to reset it to inactive at some point as Alexa’s routine will only see the state change between inactive and active.

Hope that helps.

I have read your documentation, that is how I installed the smart app and DTHs. I believe it is all setup correctly, I’m still not seeing where my problem is. When you get to your PC, please look at my coding. I’m hoping that’s the problem. Thanks so much.

© 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.