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

Implement RGB support for groups #228

Open JustJoostNL opened 1 year ago

JustJoostNL commented 1 year ago

I have already saw multiple questions about this, but it never got implemented, so, would it be possible to add RGB support for the setGroupState? Using scene's is not an option in my situation.

Thanks in advance!

peter-murray commented 1 year ago

It is just not practical to implement RGB in a group, as the members of a group can be different lights with different profiles.

The RGB conversion needs to be done on a light by light basis using the attributes of the lights to convert the RGB in to the color space of the light and then target those values within the light's ability to display the color.

With groups it would be very many API calls and conversions and utilmateiy result in the individual lights of the group being called one by one to set a color which is not what you want in practice, as it would not do it all simultaneously.

I am yet to go over the complete new APIs but there might be some other options in the future once the new API stabilizes, but there is nothing practical there today using to older REST API on the hub.