ojarva / python-ledcontroller

Controller library for limitlessled/easybulb/milight Wi-Fi LEDs
BSD 3-Clause "New" or "Revised" License
35 stars 9 forks source link

640,000 / 1.6 million colours #7

Closed WTRipper closed 8 years ago

WTRipper commented 8 years ago

Is it possible to control the milight bulbs via the wifi bridge to make use of all colors available? Would make much more fun to program color gradients with more colors than 255...

For example this one (they say it hast 640,000 colours in the description): http://www.amazon.de/Lampe-original-MILIGHT%C2%AE-dimmbar-Gl%C3%BChbirne/dp/B00NRL73UE?ie=UTF8&psc=1&redirect=true&ref_=oh_aui_detailpage_o03_s00 1.6 million colours: http://www.amazon.de/MiLight-RGB-LED-Lampe-dimmbar-Watt-E27/dp/B014J74APA/ref=sr_1_1?s=lighting&ie=UTF8&qid=1460118630&sr=1-1&keywords=milight+16+million+colors

Edit: I looked it up and the number is limited by the color byte (00-FF ->16^2=256 color codes) which is send via udp. So is it totally impossible to make use of the rest? Or does the bulb use them in those preprogramed disco modes?

ojarva commented 8 years ago

Unfortunately as far as I know, no, this is not possible. In the command protocol color is a single byte field (0-255, not two bytes; first byte is just a prefix).

640 000 colors or 1.6 million colors doesn't make much sense, so I would say that's just bogus marketing. One byte = 2^8 = 256 colors, two bytes = 2^16 = 65536, three bytes = 2^24 = 16 million. So if each color - red, green and blue - could be controlled independently with 256 colors, it would be 16 million possible color combinations, not just 1.6M or 640k.