Open mvdwetering opened 8 months ago
Sorry for the late reply. You are correct about the polling, this is definitely not optimal (or suitable at all) if there are many lights. We've started with push, but the communication wasn't reliable. I'll have another look to sort out the push issues.
Is there an existing issue for this?
Description
Note that I did see issue #150, but looking at those logs this seems to be different.
While looking at something else I noticed that the Remote is continuously spamming the Hue bridge with many requests per second.
After looking at it a bit more I would guess it is about 11 requests per second. Initially it looked like a lot more because the requests probably need more network packets.
How to Reproduce
Not sure, I just setup the integration and added my lights (about 50).
Expected behavior
Be a good citizen and not spam the bridge.
System version
1.4.5
What part of the system affected by the problem?
Integration
Additional context
In the Remote logs for the Hue integration I see about 11 lines per second like below (different light each line and then it seems to repeat) which seems to match my initial guess about the amount of requests per second.
I have about 50 lights which might be amplifiying the amount of requests.
Some notes/remarks about the integration
Based on the logging with the line-per-light and ids used I get the impression that the integration is still using CLIPv1 and it is polling each light individually. If that is the case I would recommend looking at CLIPv2 (check the Hue developer website) as it is the newer API and has features like a push channel so you don't need to poll.
edit: This is while the remote is in the dock, it stops when it is out.