Help with released button -- GoControl Wireless Remote Switch

I’m in a little over my head, but it seems like I should be able to “capture” the release of a pressed button on this device…

Here, you can see that the SmartThings is seeing the press, hold (held) and released.

But when I am in WebCore, I can only see status “held” or “pressed” for this device.

I was thinking that this might be a function of the DTH, but it seems that it is lower than that. At the device “capability” level a holdable button has only two statuses “pushed” and “held”.

However, the DTH, has this line…

if(cmd.keyAttributes == 0){
createEvent(name: “button”, value: “pushed”, data: [buttonNumber: button], descriptionText: “$device.displayName button $button was pushed”, isStateChange: true)
}else if(cmd.keyAttributes == 1){
createEvent(name: “button”, value: “holdRelease”, data: [buttonNumber: button], descriptionText: “$device.displayName button $button was released”, isStateChange: true
}else if(cmd.keyAttributes == 2){
createEvent(name: “button”, value: “held”, data: [buttonNumber: button], descriptionText: “$device.displayName button $button was held”, isStateChange: true)

So, this is an “event”. Is there a way to capture that “event” and use it to take an action? I’m thinking a SmartApp, but MAN, I am way in over my head.

Can someone point me in the right direction?

@JDRoberts, I know that you moved this here for a reason, but I really think that this is more of a DTH question or SmartApp question.

i.e. How do I modify the DTH (or make a SmartApp) to capture the “holdRelease”?

If you do not object, I will move it back. OK?

In WebCore, instead of doing a compare to value, try using a compare to expression and enter “holdRelease” as the expression (in quotes).

You could also write a smartapp. If webcore will work, that’s probably easiest.


since this is using a non standard attribute value, you will need to use expression instead of value for the comparison.


You guys rock! That did the trick!

I was trying to figure out how to rewrite the DTH and add a new attribute, but cripes, that was easy.

Thank you so much.


And that’s why I moved the thread. :wink:


And thank you.

-the fool

1 Like

Don’t kick yourself: smartthings is very powerful but not very discoverable. The “obvious” hardly ever is on this platform. :wink:

1 Like


I can’t seem to get the “holdRelease” working with my remote. My remote only supports “pushed” and “held” values. Does this “holdRelease” also should be in that list or it is some built in value which should work regardless?
Here is the code which should change the state of my dimming variables:

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