Send Event with variable time pushing a Button

Is there a way to program a device to perform different actions based in the time pushing a button down?

I’m trying to adapt the Sage Doorbell Sensor to check the seconds of the action and perform different events.

It depends on the device, but generally, no. The reason is because smartthings is still mostly a cloud-based system and there’s just too much variability introduced by latency and cloud lag to be accurate in detecting specific hold times even if the device does report both “press started“ and “press released” which is how you get the time.

And that specific device, the Nexia sensor, does not report the released event, so it’s hopeless anyway.

Depending on exactly what you want to do, most people in that type of situation would add a battery powered keypad near the doorbell and then let people enter different codes on the keypad to have different events occur.


The specific keypads available do vary by country. But there are definitely some that you can use for this. :sunglasses:

My goal with the Sage Doorbell Sensor is to “translate” the relay signals from a Dlink camera using the Digital In and Digital Out signals. The device handler that I’m currently using use 2 dry contact sensors and change the state of a virtual motion sensor. I want to trigger differents virtual sensors based in the sensor activation time. One for the camera motion sensor(One second activation) and a second one for the sound sensor(Twins seconds activation)