mwittig / node-milight-promise

A node module to control Milight LED bulbs and OEM equivalents such as Rocket LED, Limitless LED Applamp, Easybulb, s`luce, iLight, iBulb, and Kreuzer
MIT License
114 stars 27 forks source link

How do I change the Color temperature? #66

Closed mx-web closed 5 years ago

mx-web commented 5 years ago

I'm using a CW / WW light bulb

mwittig commented 5 years ago

Thank you very much for using node-milight-promise!

Am I right in assuming you have a Dual-White Bulb? In this case please have a look at example-dual-white-v6.js. The command functions are warmer(zone) and cooler(zone) which increase/decrease the white color temperature. Note, the milight firmware does not provide for setting an absolute temperature value at this point. I am also assuming here you have an iBox 1 or 2 bridge. If you own an older milight bridge have a look at example-dual-white.js for the the legacy interface.

In case you have a Full Color Bulb, see example-full-colour. The command function in this case is whiteTemperature(zone, percent) where a relative percentage between lower and upper color temperature is specified as prescribed by the milight firmware.

mx-web commented 5 years ago

light.sendCommands(commands.fullColor.whiteTemperature(0, 100)) worked for me!

mwittig commented 5 years ago

That's great. Btw, the percent values roughly map to the following temperatures: