JohNan/home-assistant-flichub

Delay required between different click types

Closed this issue · 3 comments

I'm running into a weird problem with this integration. I have two automations setup. One for a single click, another for a double click on the same button. However, I must wait several seconds between click types for the automation to recognize the second click type.

For example, if I single click to turn the lights on, all is well. If wait 2-3 seconds and double click (to turn lights off), the double click is not recognized by my automation. But if I do the same sequence and wait say 10 seconds between click types, everything works.

Should the clicks be recognized with only a short delay between click types, or does one need to pause longer than say 5 seconds for the second click type to be recognized?

Update: So I can pretty much confirm this integration had some serious delay/timing issues. I tried the webhook HA method from the HA forums, and it's ROCK SOLID. Nearly instant click/hold responses and they don't get confused about the state.

I also have my Button pushed over natively to Homekit. In homekit I can instantly see each button press type and it's always correct. So to recap:

  1. Flic webhook method is instant and rock solid
  2. Homekit registering events is instant and rock solid
  3. This integration has serious lag/timing/confusion issues

So this rules out any Bluetooth range issues, or Flic hub lag. The only problem with lag and confusion this integration. I love the fact that this integration discovers the buttons and provides more status than the webhook method. So if you can figure out the lag/confusion about state changes, this would be a winner.

Any update on why the major lag?

JohNan commented

@Coder84619 I have made some changes that I hope will remove the lag. Please try the latest version and let me know!