Subscribe to Ring Doorbell button push?

I want to subscribe to the Ring Doorbell being pushed. I’m not having any luck, I noticed that there could be more than one button with a “Button”, but I see no documentation on how to specify button 1. The Ring doorbell only has one button, and if it is pressed, I wanted to call ringDetectedHandler

Any help would be greatly appreciated.

subscribe(ringbutton, “button.pushed”, ringDetectedHandler)

assuming that ringbutton has been selected as an input in the smartapp as the ring device and ringDetectedHandler is not a private function (common mistake by myself :-)) you can just specify “button” as the event. if you do evt.value is pushed, actually it will only be called when it is pushed …tested it, works fine…

subscribe(ringbutton, “button”, handlerPush)

void handlerPush(evt) {

    log.info evt.value   // == pushed

}
1 Like

Martin,

Thank you sir! I was trying to subscribe to button.pushed, but that never fired. When I use the test button, subscribing to “button” never fired either.

How did you know to subscribe to “button”? Is that documented anywhere? I’m finding programming SmartThings to be near impossible without asking for help.

Anyway, thank you very much. My program is now complete!

you subscribe to a device capability, these are most of the time described in the documentation, but you can also look at the real device events in the IDE…

1 Like

That’s what I need, how do I look at the real device events in the IDE??

Click on my devices and list events.

1 Like

Thank you, I didn’t think of looking there. :sunglasses: That’s a wealth of information!