pschroeder89 / homebridge-levoit-humidifiers

Levoit Humidifiers Plugin for Apple HomeKit via Homebridge
Apache License 2.0
71 stars 9 forks source link

Logs indicating that the plugin slows down homebridge #56

Closed asachs01 closed 11 months ago

asachs01 commented 11 months ago

Describe The Bug:

Homebridge logs are flooded with this message:

[12/16/2023, 7:22:03 PM] [homebridge-levoit-humidifiers] This plugin slows down Homebridge. The read handler for the characteristic 'Active' didn't respond at all!. Please check that you properly call the callback! See https://homebridge.io/w/JtMGR for more info.
[12/16/2023, 7:22:03 PM] [homebridge-levoit-humidifiers] This plugin slows down Homebridge. The read handler for the characteristic 'Current Humidifier-Dehumidifier State' didn't respond at all!. Please check that you properly call the callback! See https://homebridge.io/w/JtMGR for more info.
[12/16/2023, 7:22:03 PM] [homebridge-levoit-humidifiers] This plugin slows down Homebridge. The read handler for the characteristic 'Current Relative Humidity' didn't respond at all!. Please check that you properly call the callback! See https://homebridge.io/w/JtMGR for more info.
[12/16/2023, 7:22:03 PM] [homebridge-levoit-humidifiers] This plugin slows down Homebridge. The read handler for the characteristic 'Relative Humidity Humidifier Threshold' didn't respond at all!. Please check that you properly call the callback! See https://homebridge.io/w/JtMGR for more info.
[12/16/2023, 7:22:03 PM] [homebridge-levoit-humidifiers] This plugin slows down Homebridge. The read handler for the characteristic 'On' didn't respond at all!. Please check that you properly call the callback! See https://homebridge.io/w/JtMGR for more info.

To Reproduce:

Expected behavior:

I expect that the logs aren't flooded with this type of message.

Logs:

[12/16/2023, 7:22:03 PM] [homebridge-levoit-humidifiers] This plugin slows down Homebridge. The read handler for the characteristic 'Active' didn't respond at all!. Please check that you properly call the callback! See https://homebridge.io/w/JtMGR for more info.
[12/16/2023, 7:22:03 PM] [homebridge-levoit-humidifiers] This plugin slows down Homebridge. The read handler for the characteristic 'Current Humidifier-Dehumidifier State' didn't respond at all!. Please check that you properly call the callback! See https://homebridge.io/w/JtMGR for more info.
[12/16/2023, 7:22:03 PM] [homebridge-levoit-humidifiers] This plugin slows down Homebridge. The read handler for the characteristic 'Current Relative Humidity' didn't respond at all!. Please check that you properly call the callback! See https://homebridge.io/w/JtMGR for more info.
[12/16/2023, 7:22:03 PM] [homebridge-levoit-humidifiers] This plugin slows down Homebridge. The read handler for the characteristic 'Relative Humidity Humidifier Threshold' didn't respond at all!. Please check that you properly call the callback! See https://homebridge.io/w/JtMGR for more info.
[12/16/2023, 7:22:03 PM] [homebridge-levoit-humidifiers] This plugin slows down Homebridge. The read handler for the characteristic 'On' didn't respond at all!. Please check that you properly call the callback! See https://homebridge.io/w/JtMGR for more info.

Plugin Config:

{
    "name": "Levoit Humidifiers",
    "email": "XXXXXX",
    "password": "XXXXXXX",
    "accessories": {
        "cool_mist": true,
        "warm_mist": true,
        "sleep_mode": true,
        "display": true,
        "night_light": true
    },
    "options": {
        "showOffWhenDisconnected": true
    },
    "platform": "LevoitHumidifiers"
}

Environment:

pschroeder89 commented 11 months ago

There's no pretty way to fix this, which is why I've left it. Homebridge is built with the idea of directly interfacing with the device, while this plugin communicates with the VeSync API, which communicates with the device. Homebridge also does not allow us to extend this "slow down" timeout in any way.

One way to handle it is to not wait for a response from VeSync, but that will lead to state mismatches if the API returns a bad status.

Setting this plugin up as a child bridge can help, and ensuring your internet is stable. Other than that, there's not much I can do about it.

pschroeder89 commented 11 months ago

I just realized that you have "showOffWhenDisconnected" set to true in your config. As stated in the README, that setting will trigger those warnings because Homebridge can't actually communicate with the device.

asachs01 commented 11 months ago

Ahhhhhh! That makes sense. I'll adjust the config. Thanks a ton!