pschroeder89 / homebridge-levoit-humidifiers

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

The read handler for the characteristic 'Current Relative Humidity' was slow to respond #14

Closed jmjlai closed 2 years ago

jmjlai commented 2 years ago

Getting the following message on a Beaglebone Black running Debian GNU/Linux Buster (10) with a single Dual 200S. The plugin is running in a child bridge.

[1/9/2022, 2:18:18 AM] [homebridge-levoit-humidifiers] This plugin slows down Homebridge. The read handler for the characteristic 'Active' was slow to respond! See https://git.io/JtMGR for more info. [1/9/2022, 2:18:18 AM] [homebridge-levoit-humidifiers] This plugin slows down Homebridge. The read handler for the characteristic 'Current Humidifier-Dehumidifier State' was slow to respond! See https://git.io/JtMGR for more info. [1/9/2022, 2:18:18 AM] [homebridge-levoit-humidifiers] This plugin slows down Homebridge. The read handler for the characteristic 'Target Humidifier-Dehumidifier State' was slow to respond! See https://git.io/JtMGR for more info. [1/9/2022, 2:18:18 AM] [homebridge-levoit-humidifiers] This plugin slows down Homebridge. The read handler for the characteristic 'Current Relative Humidity' was slow to respond! See https://git.io/JtMGR for more info. [1/9/2022, 2:18:18 AM] [homebridge-levoit-humidifiers] This plugin slows down Homebridge. The read handler for the characteristic 'Relative Humidity Humidifier Threshold' was slow to respond! See https://git.io/JtMGR for more info. [1/9/2022, 2:18:18 AM] [homebridge-levoit-humidifiers] This plugin slows down Homebridge. The read handler for the characteristic 'Current Relative Humidity' was slow to respond! See https://git.io/JtMGR for more info.

pschroeder89 commented 2 years ago

Someone else reported this, but I'm unable to reproduce. It is probably due to latency from VeSync back to your humidifier (due to slow network, slow server on VeSync side, high network latency to VeSync's host, etc), since the plug-in must wait for the responses before returning values.

This message is built in to homebridge and is returned when a response takes longer than a threshold they predefine. I'm not sure how easy that value is to change in your homebridge setup.

For what it's worth, the message is benign. I get it occasionally for my TV (which is my farthest device from my router). But it's not coming from the plug-in itself and there's no way to make VeSync respond faster to your setup.

pschroeder89 commented 2 years ago

This thread has a good overview of why this happens. https://github.com/homebridge/homebridge/issues/2931

The solution in that ticket is to poll the device for statuses. Since we are not polling the device directly, but polling VeSync as a proxy, we can't poll the VeSync API due to potential rate limiting being enforced.

I'd use the other advice in that bug thread, which is to make your humidifier part of a child bridge so that it doesn't slow down any other HomeKit requests on your network.