-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
How to coalesce multiple requests to a device? #1455
Comments
I ran into, and solved, the very same problem in my homebridge-hue plugin for Philips Hue. HomeKit sends the characteristics from a scene in one message to homebridge, but homebridge cuts this up into multiple The Hue API allows me to combine multiple settings for the same light (on/off, brightness, hue, saturation) into one request, but requires a separate request for each light. So I took the following measures:
|
Thanks, it worked! |
Hoi @ebaauw , I quickly reached the limits of "kludge" in my issue and I am trying to learn your solution. Not easy as I am learning many things and to simply my challenge I decided to stay with HAPnode.js not switching to Homebridge. I'd appreciate if you can provide some guidance to a noob dev:
Dank u well, Tot ziens ;-) |
1, 2: I really don't know - I've only ever used homebridge, never native HAP-NodeJS. I do think the Service and Characteristic stuff is HAP-NodeJS, though. 3: My solution consists of the following:
|
This issue has been automatically marked as stale because it has not had recent activity, and will be closed if no further activity occurs. If this issue was overlooked, forgotten, or should remain open for any other reason, please reply here to call attention to it and remove the stale status. Thank you for your contributions. |
Hi there!
I am writing a platform to control a single phisical device with 48 individuals light bulbs (declared as distinct accessories inside the platform). I started from homebridge-samplePlatform.
Everything work as expected when I turn the lights individually by the Home app. But when I activate a scene with more than 10 lights, it hangs the Home app with "no response" statuses. The plugin sends several individual requests (one for each light) at the same time, flooding the device.
Here's part of the log:
It shows that homebridge receive just one request from HAPServer but split in several individual requests to the device (not in the log).
I guess it should coalesce all these separated requests into a single request to the device but I have no idea how to do that, I mean, which events to implement. Can anybody help me? Examples will be welcome.
Thanks in advance!
The text was updated successfully, but these errors were encountered: