@TAustin thank you for creating this it is great however, like @Terri_Baker said Alexa discovered fine and device can be used in the “then” section of Alexa routines but can not be used as the trigger. If this could be sorted it is just what i wanted. Once again thank you for your time and effort.
I don’t the former version of the virtual momentary button EVER worked with Alexa because it didn’t have a switch included. So this statement confuses me.
This was not the requestor’s requirement. I specifically confirmed that flipping the switch directly would have no effect on the button.
You are right, but this wasn’t in the original request.
I’m thinking now that what you really wanted was the virtual contact device with a button on the dashboard instead of a switch, which would have been another way to address your need.
Nevertheless, I can certainly add a contact to the momentary button as well to facilitate Alexa routine ‘when this happens’.
But you also need to clarify for me what you want to happen if the switch is flipped in Alexa. Before, I explicitly said that flipping the switch would NOT have any effect on the button, but it now sounds like that may not be what’s desired. If Alexa flips the switch, do you want the momentary button to be ‘pushed’ and also the contact state to change accordingly (switch on == contact open / switch off == contact closed).?
Here is what my ‘Anidea for Virtual Momentary’ DTH does, guided by the behaviour of ye olde Momentary Button Tile DTH, the need to trigger Alexa, delays having been found to be the key to make Alexa work when it had lots of problems, and button pushes being much better for triggering things like webCoRE as there is just the one event. Ironically I never used it myself.
When the momentary button is pressed in the app, or automations call the push() command:
- Set the
buttontopushed(very useful for triggering webCoRE without worrying about semaphores). - Set the
switchtoon(the Momentary Button Tile didn’t have a button …). - Optionally set a
contactsensor toopen(handly for Alexa). - Optionally set a
motionsensor toactive(handy for Alexa). - Optionally waits for a set period (I found Alexa appreciated a slight delay).
- Optionally set a contact sensor to
closed. - Optionally set a
motionsensor toinactive. - Set the
switchtooff.
For my device turning the switch on was equivalent to pushing the button and the device always returned to an inactive state (off, closed, inactive).
@TAustin the momentary button that you originally made, i wanted exactly the same but for it to be available in Alexa. I would use it to start an Alexa routine. If pressed it would run the routine then go back to standby.
“Available in Alexa” normally means “ shows up on the list of devices in the Alexa app and can be turned on by voice.“
That’s actually a different issue than “can be used to start an Alexa routine.”
At present, Alexa routines can only be started by a contact sensor, a motion sensor, a lock, an echo brand button, or a Flic brand button. They cannot be started by any other switch or button. That’s a decision that Amazon has made, probably so they don’t have to explain to consumers why some switches work and some don’t (switches that don’t report their state change would not work).
So I suspect the fact that this is two different issues is what has caused the confusion in this conversation.
Wanting a virtual device that can start an Alexa routine is a different feature.
Yes, I’m afraid there was a bit of a misunderstanding, but I think the end result will exceed what @AllenP really needed, which was simply a contact added to the momentary device. As you point out, a switch can’t trigger an Alexa routine. And he does’t seem to need the ability to control the ST device, which would have been needed to be done through a switch.
Be that as it may… where I’ve landed is a pretty flexible virtual device that should satisfy @AllenP 's requirements, but also provide some additional capability - by also including a switch and configurable time delay.
@orangebucket 's comment:
Besides adding the contact for triggering Alexa routines, what I have done in this next update is provide a choice regarding the switch: if you flip the switch from either an Alexa routine or from the mobile app, you can configure the behavior to either have the switch revert back to its prior state after the delay, as @orangebucket did, OR NOT. And I’m keeping the additional behavior config preference for what to do with the switch when the button is pressed: either turn it on->delay->off, or turn if off->delay->on.
The update has been pushed out. If you want this new functionality, be sure to create a new momentary virtual device and delete any you may have created from this prior attempt.
@TAustin yes this works for me, thank you so much for doing this it really is appreciated.
Terrific! You are very welcome.
I get to step 3 and no option to set number of virtual devices shows up.
I can rename device, see location and select a room…
Using new Smartthings app…
Which virtual devices driver did you install, Virtual Devices or Virtual Devices V2?
Virtual Devices V2 is the current version with more options.
Once you install the driver go back to the app and scan nearby. This should create the vEdge Creator V2 tile. It will add under No Room Assigned.
Open vEdge Creator V2 details and you should see this
You enter you number of devices to create and then select device type.
might have clicked both…
deleted from app, then uninstalled from the “add” page, then reinstalled V2, now app can’t find it when “scanning nearby”…
Hmmm… the app scans for several minutes and can’t find the device…
I would recommend starting with a clean driver install.
- First delete any vEdge devices, including the creator(s), from the your mobile app.
- Then use the channel invite weblink to UNINSTALL all Virtual Device drivers from your hub.
- Wait a minute
- Then use the channel invite weblink to install only the Virtual Devices V2 driver to your hub.
- Wait a minute, then use the mobile app to do an Add device / Scan nearby
Hopefully now you’ll have a good working vEdge Creator device.
ugh… deleded all vEdge stuff, went to link uninstalled…
waited quite a while
reinstalled Virtual Devices V2
Scan returns nothing…
It seems like it’s unable to create the Web Creator device, and one reason for that could be there is still one that exists; but that doesn’t seem possible if you were sure you deleted all devices and uninstalled the drivers. But just in case…
Check your ‘No room assigned’ room for any stray devices you might have missed. If you find one, delete it. And then you can then try another Add device / scan nearby, and that may or may not work. But if not (and you had indeed found and deleted a stray device), once more uninstall and reinstall the driver from the web page.
If none of that yields any progress, you may have to get the CLI installed so we can figure out what’s going on.
He might need to uninstall driver using CLI. I had ghost driver other day. Only way to remove it, was using CLI
Hi again!!! I am a bit of a novice when it comes to the “third party enhancements” to SmartThings, so bear with me.
I uninstalled the V2 device from the all yesterday, and from the “invite link”. I let it go overnight before re-installing via the link…
When adding a new device and selecting “scan nearby”. It indicates not devices found…
Not sure what CLI is, but would love some help….
I am trying to put some momentary buttons in my ST universe so I can trigger some actions at my house while I’m away, like playing a notice on my Son’s Sonos to get his attention (he’s a bit of an avid gamer and doesn’t always hear his phone. LOL)…
CLI is “Command Line Interface.” It’s a developer tool that came in with the new platform, so you won’t find much about it in the forum yet. Written by programmers for programmers, it will probably feel pretty overwhelming if you don’t have a strong technical background. ![]()
If you want to wait for a more consumer-friendly version and you have an immediate need for virtual switches, you could still use the Groovy version for the next few months.
If you have an android device, it’s super easy. Open the SmartThings app, go to Labs, and there’s a virtual switch creator there.
If you don’t have an android device, it’s still pretty easy, but you do have to do more manually.
Up to you.
@TAustin ’s edge driver is an awesome contribution to the community, but if you’ve run into issues that require installing the CLI, you might want to consider the groovy alternative for now.
