homebridge-amazondash icon indicating copy to clipboard operation
homebridge-amazondash copied to clipboard

Question/request: supporting double and long presses?

Open mehgcap opened this issue 5 years ago • 0 comments

Hello,

First, thank you for this plug-in. I recently got into HomeBridge, and already have three Dash buttons acting as physical buttons for HomeKit. It's wonderful.

One thing I wish we could do is support HomeKit's ability to assign multiple and long presses to actions. That is, one press turns the lights on, two turns them off, and a long press sets them to 50% brightness. I have an Eve button that can do this, and while some third-party apps (like Eve) offer the option to set up these actions, HomeKit refuses to save the automation when I try to use them.

Let me say now that long presses will likely be impossible. This plugin works y detecting network traffic, not physical button pressing, so it can't know for how long the button is held. Still, if there's some magic I'm not thinking of to do this, that would be awesome!

Double presses might be hard too, since Dash buttons sometimes fire twice for one press. Personally, I find one ARP hit and one UDP hit for every press, though I don't know enough to say if that counts as two presses to the plugin. Still, if the plugin already filters out rapid double detections like this, could an option for intentional double pressing use, say, two presses within a user-defined timeframe? Let the plugin ignore second presses like it (maybe?) does now, but if a new press is detected after that filtering within the time set by the user, pass a double press event to HomeBridge?

Again, I don't know enough to know if this is trivial to do, impossible, or already done and not working because I messed something up on my end. If it can be done, I'd love to have it. If not, so be it. This is a great plugin as-is; thanks again for making it!

mehgcap avatar Feb 03 '19 02:02 mehgcap