First, I install a bulb into floor lamp in a speed of light, at the same time pushing the buttons of remote insanely. OK. it work fine. I found it have 2 mode that is "RGB" and "warm white". they are independent. see this picture. Centre is a receiver circuit. Inner LEDs are RGB and the rim is warm white. they do not active at the same time. I think RGBW and RGBWW are identical inner RGB.
Second, Sniff RF signal from a IR remote using arduino and nRF24L01 breakout board. The method is on http://fablab.ruc.dk/controlling-the-mi-light-from-arduino/. They used Guino to interface an arduino with this sketch, However it worked on RF24 Library from "Reverse-Engineering the milight on-air protocol". Thank you.
Last, I observe for a while. found this:
- Control signal is 7 words = 3 ID, 1 Hue, 1 Brightness, 1 RemoteButton and 1 Incremental number. that is noted in above reference.
- Every button have own button key and hold button key for example press "ON" -> get 0x01, press "ON[hold]" -> get 0x10 (push key + 16 or +0x10). Remote key finally show:
- Hold "OFF" button is USELESS key, there is not functional. I plan to use this key to ENABLE and DISABLE the SkyLight.
- Colour wheel is base on HSL format. they only have 256 colour which is mixed of 2 major colour, R&G, G&B and R&B (No R&B&B simultaneous). The colour information is definitely lost then converted from RGB (24bits) to HSL(16bits, bulb protocol). Switching mode of RGB and WW is an alternative to avoid this effect if a transition is fast enough. I'll try.
- Control bulb from GUI, they work only parameter from matching RemoteButton. For that reason, control words is required 2 words, first is Hue, second is Brightness sequentially.
- Change mode, "M button", make a first ID value change. My remote that i have has ID which is [(176-184) 62 32]. The first ID can rotate 9 value = 9 mode.
Next, Control bulb from RGB signal via arduino.