peter-murray / node-hue-api

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

Possibility to get minimum and maximum color temperature of a light #199

Closed foxriver76 closed 3 years ago

foxriver76 commented 3 years ago

This is more a question. Is it currently possible to get the minimum and maximum supported color temperature for a specific light. It seems that inner bulbs eg have a min around 1800 while hue bulb have a min around 2200, now I am looking for a way to get these information via your module.

thanks.

peter-murray commented 3 years ago

I would probably look to see the details on the capabilities object for the light itself and see if they are being reported. Hue bulbs provide these details (which is fairly recent, last year or so) and I have not checked this with any thirdparty devices (as I do not have access to them).

The capabilities object generally have details like color spaces and min/max values for some if not all attributes. I use these for setting RGB values if the details are available before falling back to the default documented values.

Can you check that you get any capabilities value when you retrieve the light from the bridge?

peter-murray commented 3 years ago

An example of the capabilities that I can pull back from a call of api.lights.getLight(LIGHT_ID);

 {"certified":true,"control":{"mindimlevel":5000,"maxlumen":600,"colorgamuttype":"B","colorgamut":[[0.675,0.322],[0.409,0.518],[0.167,0.04]],"ct":{"min":153,"max":500}},"streaming":{"renderer":true,"proxy":false}}
foxriver76 commented 3 years ago

Thanks for your response, I will definitely try this.

foxriver76 commented 3 years ago

Works.