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

Batch light commands? #107

Closed sinedied closed 7 years ago

sinedied commented 7 years ago

Is there a way to send commands to all lights in one go, instead of one at a time? For example, to turn all lights on or off?

isfett commented 7 years ago

use group 0, as described.

isfett commented 7 years ago

Please note, the Lightset 0 group, is a special instance and will always exist and have the id of "0" as specified in the Hue Api documentation. Due to this internal group being maintained by the bridge internally, it will not return an array of light ids like the other groups in the results returned from a call to groups().

If you need to get the full details of the Lightset 0 groups, then you can obtain that by using the getGroup() function, using an id argument of 0.

https://github.com/peter-murray/node-hue-api#working-with-groups

sinedied commented 7 years ago

Oups, missed that, thanks! ;)