-
Notifications
You must be signed in to change notification settings - Fork 230
Description
Hello,
I control 15 Milight bulbs set up around a room. Some are RGBW, some RGB_CCT. I wrote a page that allows me to program them. Basically a simple JSON config lets you set all bulbs to the same color, each to a different color or even animations (with either all bulbs animating at the same time, or each bulb individually). I don't sync to music or anything crazy, so precise timings are not important, but quick changes are
I originally ran it with Milight controllers, and for the most part it worked
I recently moved to an esp8266 controller with ESPMH, and I've noticed that it's relatively easy to send too many http requests in a short time to the hub. The web server stops responding after a while.
I've tried many tings, like sending or not sending blockOnQueue, awaiting each request (which I am currently doing fro a browser), that ends up being too slow; sending a few requests staggered and awaiting them, etc...
The thing is for many of these animations, I'll really have 3 or 4 different colors, so if i could send a request like "PUT gateways/1/rgbw/1, gateways/1/rgbw/2, gateways/1/rgb_cct/1" with a body of {"hue":240,"saturation":60,"level":100,"status":"on"} , tht would save me a lot of requests
Even better if a single request could set all the lights at once (like set 1 and 2 to yellow, 3 and 4 to blue, 5 and 6 to red). I get there is only one radio, so they will actually execute sequentially, that's fine, a single request for all the lights is easier to await compared to one per light, the overhead adds up quickly
Failing that, any recommendations on how to tune the software and my requests for best performance?
Thanks