Momentary Button Press

Hey peeps,

I’m trying to create a momentary button in one of my dashboards. I’ve created a BUTTON virtual device in the Smartthings and have it in SharpTools, but when I press it, nothing happens and the cursor (on my pc) does not change to indicate any type of interaction.

This will be used to turn on the HVAC system in my Tesla.

Can you clarify which Device Handler you’re using?

The ‘Momentary Button Tile’ is usually used for creating virtual momentary devices in SmartThings. Once you add it to your dashboard, you’ll also want to make sure you change the Tile Layout to use the ‘Momentary Tile’ layout.

I would also note that you may not need a virtual device at all. Depending on what actions the virtual button is triggering, you might be able to just create a SharpTools.io Rule with those actions and then add the Rule to your dashboard.

1 Like

I’m using the Smartthings simulated button device in the IDE and will be using the actions of the “button press” in WebCoRE.

Here are my options for that “button”.

Screenshot 2020-10-30 130553

Thanks for the additional details. Simulated Button won’t work for this purpose. It would need to be ‘Momentary Button Tile’ or something that supports the ‘Momentary’ capability.

I see what I did wrong. I looked only under “SIMULATED” area where the Momentary Button Tile is not. Here’s something funny though. The button works in my dashboard, but in the new Smartthings app, you can’t click and open it up like the rest of the devices, to see it’s history/state etc.

I’ve been reading that this actually doesn’t work in the new app, even though you can pick from the list in the IDE. I even found a custom DTH for the same purpose, but it also doesn’t open up in the new app. ODD.

2 Likes

OK… so I found this custom DTH.
Seems to work.

https://github.com/orangebucket/Anidea-for-SmartThings/blob/master/devicetypes/orangebucket/anidea-for-virtual-momentary.src/anidea-for-virtual-momentary.groovy?ts=4

I read some weeks ago ST does not support original “Simulated momentary button” listed anymore, but SharpTools offered in a Community thread a DTH for it, and its working I am using it for Good Night routines, and other scenes for garage and back yard, most of times work perfectly, few times the button stay On…for various minutes (10 I hav count), other the button stays with a warning mark, but 95% works ok.

1 Like

I did find a DTH and it works, but I might just go back to a switch. When it’s switched on, then the WebCoRE pitson will turn it off when done. I found, like you, the these custom momentary button DTH’s don’t always turn off right away.

1 Like

If you’re using a device which implements the Momentary capability, I would recommend changing the Tile Layout to use the ‘Momentary’ layout. It’s a stateless layout that just sends the push command. (eg. doesn’t display the switch status)

2 Likes

Hi my friend, I will try, I did not noticed that layout exist but its great !. Im finding momentary tile has only one style (because I think just trigger the command), lets see what happens, but I loved when I push the button and for few seconds tile shows the command is activated, for example for “Good Night” routine, tile goes to a black foreground and a moon as icon in yellow that blinks for a few seconds showing command was sent before it comes back to off state. I think let the momentary tile show some style for a couple of seconds in order to display that command was sent could be cool. Best wishes.