Hardware Reference
In-Depth Information
"sat": 144,
"xy": [
0.4595,
0.4105
],
"ct": 369,
"alert": "none",
"effect": "none",
"colormode": "ct",
"reachable": true
},
"type": "Extended color light",
"name": "Hue Lamp 1",
"modelid": "LCT001",
"swversion": "65003148",
"pointsymbol": {
"1": "none",
"2": "none",
"3": "none",
"4": "none",
"5": "none",
"6": "none",
"7": "none",
"8": "none"
}
}
Change the color and brightness:
$ curl -X PUT -d '{"transitiontime":0, "bri":255, "hue":28000, "sat":200}'
http://192.168.0.27/api/d7ae8b2151d50df1e61f380289f33bf/lights/1/state
And lots more in addition. You should be aware that, true to its name, Hue uses the HSB color space, that is, Hue,
Saturation, and Brightness, which allows it to emanate more natural whites and better mood shades of pastel. It also
supports programmatic control through the CIE model (which maps colours on a chromaticity diagram, detailed at
http://developers.meethue.com/coreconcepts.html#color_gets_more_complicated ), which means that if you're
used to the more traditional RGB notation, you will need to adjust your thinking or your code.
There are several web sites that can provide a visual representation of color conversion, such as
http://www.workwithcolor.com/color-converter-01.htm . To convert the HSB values presented into Hue
parameters you must:
u
Multiply the Hue by 200 (technically it's by 182.04!)
u
Rescale the percentages given for both brightness and saturation to values between 0 and 255
N Hue has a transition time between each state change operation. This provides a much smoother process than
you can manage in code, and its use in long fades up or down is recommended.
Tip
 
Search WWH ::




Custom Search