explosivo22 / kwikset-ha

Kwikset Smart Locks integration for Home Assistant. The Kwikset App is exclusively for use with Kwikset Halo, Halo Touch, and Aura smart locks.
Apache License 2.0
34 stars 2 forks source link

Delay in recognizing state for HA Automation #37

Closed daveotterness closed 1 year ago

daveotterness commented 1 year ago

Hello, I am using this integration mainly to use with HA Automations. Is there any way to increase the frequency in which this checks with the Kwikset server(s)? Not sure if that's my issue, but I'm getting a delay which kind of defeats the purpose of the Automation.

What I'm trying to accomplish: When it is After Sunset, and the Kwikset lock is Unlocked, then turn on the Garage Lights. It works, most of the time, but even when it works there's usually a 5-30 second delay (guessing there, but it's a long time sometimes) after unlocking the lock before the lights turn on. The lights are in the same ecosystem as others and I know that's not the issue, this is the only automation with a delay like this so my guess is that it's related to the Kwikset. Thank you.

explosivo22 commented 1 year ago

Currently we are doing a cloud poll with this happening every 60 seconds. We might could try every 30 seconds, but since this isn't an official API I don't want them getting suspicious and block us. I will play around and see what I can come up with.

Thomas6855 commented 1 year ago

Same for me, the integration works well, but the delay is substantial. Curious if there is an opportunity to utilize ESP home or BT home?

explosivo22 commented 1 year ago

This has been changed to a 30 second polling interval in 0.1.0. Can you please see if this helps your issue any.

daveotterness commented 1 year ago

Yes it does seem better. With the previous 60-second polling I'm guessing I was sometimes getting caught by triggering just after a poll and then it seemed "non-responsive" when I really had to wait 50-55 seconds until the next call. If 30 seconds won't raise any red flags w/ Kwikset and screw everyone else, I think it's a good compromise. I appreciate the quick response/fix, thank you.