peter-murray / node-hue-api

Node.js Library for interacting with the Philips Hue Bridge and Lights
Apache License 2.0
1.19k stars 145 forks source link

Group RGB support #59

Closed alistairg closed 5 years ago

alistairg commented 8 years ago

Hi Peter - I see you've started implementing this, but there's a chunk commented out. If you can quickly help me understand:

  1. What the complexity is with RGB specifically wrt groups
  2. The way you'd planned on tackling it

...I'll see if I can get it finished off this weekend, and can send you a PR?

peter-murray commented 8 years ago

Hi,

It is not particularly practical to tackle this problem in the way I have started it, as it would result in multiple invocations of the end points on the bridge, which would not be good from a user perspective, as they would see multiple lights potentially turn on/change state in a staggered way from a single call from the API.

What hue do offer around this, that solves this issue is the creation of scenes, which you can invoke with a group filter. The type of activity that this code was looking to handle would be well suited by the creation of a scene, that of course presets the light states, which is always valid for the lights, and then use the group filter to trigger those states on the lights you actually want to respond.

It is my intention to provide documentation and examples around this, and remove the commented out group code.

peter-murray commented 5 years ago

I think that this is no longer relevant in today's hue implementation. The scenes system makes this for groups less relevant and the desire can be achieved using that system (although not in a single call).