ebaauw / homebridge-rpi

Homebridge plugin for Raspberry Pi.
Apache License 2.0
308 stars 18 forks source link

long press trigger #145

Closed Olivierbkk closed 2 years ago

Olivierbkk commented 2 years ago

Hello,

Apparently when using the long press on buttons, the action is triggered after the button is released.

Is is possible to trigger the action 1 or 2 seconds after starting to press the button rather than after release? This way the user would see the action happen and instinctively know that he can release the button (as it is the case for the Ikea shortcut buttons).

Thanks in advance.

ebaauw commented 2 years ago

No. Unlike most real buttons, the GPIO pin doesn’t report hold, only press and release. Homebridge RPi uses the duration between these to determine single press vs long press.

Olivierbkk commented 2 years ago

Thanks for the answer.