banzalik/homebridge-winix-c545

"This plugin slows down Homebridge."

jeanofthedead opened this issue · 2 comments

Hello, I noticed the following warning in Homebridge for this plugin and thought I would let you know:

[homebridge-winix] This plugin slows down Homebridge. The read handler for the characteristic 'Active' was slow to respond! See https://git.io/JtMGR for more info.

Thanks for all of your hard work!

I don't know much about plugin development, but I've set this plugin up as a Child Device in my Homebridge settings. It looks like this is the recommendation for the developer:

If you're the plugin developer:

Make sure the callback() is called.
Make sure you are catching any possible exceptions and still calling the callback() even if an error occurred.
If the action does take some time to complete, adjust your plugin code to return the callback() instantly, and call characteristic.updateValue once the action has completed.
Recommend your users run your plugin as a Child Bridge. This won't prevent the log message from occurring, but will prevent your plugin from impacting other plugins.

When run as a child bridge, the following error occurs occasionally. Homebridge gracefully recovers.

Error: read ECONNRESET
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)
[8/20/2022, 8:43:02 AM] [Winix C545] Child bridge process ended
[8/20/2022, 8:43:02 AM] [Winix C545] Process Ended. Code: 1, Signal: null
[8/20/2022, 8:43:09 AM] [Winix C545] Restarting Process...
[8/20/2022, 8:43:13 AM] [Winix C545] Launched child bridge with PID 33316
[8/20/2022, 8:43:13 AM] Plugin 'homebridge-winix' tried to register with an incorrect plugin identifier: 'homebridge-winix-c545'. Please report this to the developer!
[8/20/2022, 8:43:13 AM] Registering accessory 'homebridge-winix.WinixC545'
[8/20/2022, 8:43:13 AM] [Winix C545] Loaded homebridge-winix v1.0.0 child bridge successfully