-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Homebridge 1.3.1 / The read handler for the characteristic 'On' was slow to respond! #89
Comments
Hi - any chance of updating the plugin to resolve this problem? Much appreciated. |
This really depends on your setup. As the http-switch plugins queriers the http url you specify when it gets a request from HomeKit. I can mitigate the warning (e.g. return early with a cached result) and use the updated value for the next request coming. To get a better understanding of the problem, it might help to get a log output to check how often this warning appears, or if it only appears within certain conditions (e.g. when multiple clients query at once). The plugin could indeed be advance such that multiple request coming (roughly at the same time) from different HomeKit clients result only in one http request to the http service. |
As recommended in my Link above, I solved it for me: getStatus: function (callback) { and than with a seperate getStatusTT: function (callback) { |
Thats exactly what I meant with:
This will e.g. not allow to immediately report errors back to HomeKit should e.g. the http request fail for some reason. I'm not yet sure how to deal with that and if I really wan't to go the route you proposed. |
@Supereg So I set pulltimer to a tempvalue of 100ms and get a quick response in HomeKit by getStatusTT - everything fine for me :-) regards |
I know. I'm one of the guys who developed the warning system 🙃 Its about speeding about the general bridge, as the bridge is as slow to respond as the slowest plugin. Its just, this requirements doesn't fit very fell for the use case of this plugin. |
Hello, Could you add the proposed workaround, this seems useful in any case : I can mitigate the warning (e.g. return early with a cached result) and use the updated value for the next request coming. |
@matthieularge that's definitely the plan, though requires some minor architectural changes of the plugin. There is functionally and in terms of behavior no difference to running this plugin with previous versions of homebridge. Its just that homebridge v1.3.x starts to print the warning now. |
strange, i have written the HTTP service i'm polling for the state on my own and it definetly doesn't take more than 3 seconds to respond, it's more like 50-100miliseconds for any request - but still i got these warnings printed after homebridge is running for like one two hours - for my taste, the states are pulled way too often as i see in the logs - sometimes two-three times in the same second... |
[homebridge-http-switch] This plugin slows down Homebridge. The read handler for the characteristic 'On' was slow to respond! See https://git.io/JtMGR for more info.
The text was updated successfully, but these errors were encountered: