dkerr64 / homebridge-yolink

Apache License 2.0
12 stars 2 forks source link

Homebridge main UI Screen - Message - Yolink Slows Homebridge #75

Closed ericsabc closed 1 year ago

ericsabc commented 1 year ago

Describe The Bug: [4/1/2023, 1:46:04 PM] [homebridge-yolink] This plugin slows down Homebridge. The read handler for the characteristic 'On' was slow to respond! To Reproduce: Start Homebridge with Yolink plugin installed Expected behavior: No Error Message Logs:

Show the Homebridge logs here, remove any sensitive information.

Plugin Config:

Show your Homebridge config.json here, remove any sensitive information.

Screenshots:

Environment:

dkerr64 commented 1 year ago

@ericsabc I am guessing that you are seeing this during or shortly after restarting Homebridge or the child bridge that holds this plugin. It is a side affect of YoLink being unable to connect to one of your devices. Some devices seem more prone to it than others (e.g. smart outlets) but I have seen it with all of them.

YoLink returns an "unable to connect" error, and this plugin will keep retrying until it eventually connects, this can take 10 minutes or more but, as far as I can tell, it always succeeds eventually.

In the meantime, the plugin is unable to handle requests from Homebridge/Homekit for the device in question, the handlers are not initialized yet. And this is the cause of the This plugin slows down Homebridge message.

I don't believe that there is anything I can do to fix this. I believe it better to not respond than to respond with incorrect data or indicating that an action (turn on/turn off) was completed when it was not.

To minimize the impact on Homebridge / HomeKit do run this plugin in its own child bridge.

Thanks David

ericsabc commented 1 year ago

Thanks David. Very solid plugin!

Best, Eric

dkerr64 commented 1 year ago

Closing this issue as the problem is, unfortunately, somewhat expected and resolves itself after some time.