In plain English: I can now send commands from a computer to my lights via WiFi and their base station, and they will turn on or off or red or blue or bright-white or “party” or whatever. While I previously could do that with their remote control, and via their iPhone app, now I can do it directly, from software I control. Which opens up all sorts of possibilities …
I wanted to do that ever since I got the lights, but the very confusing documentation on their developer site is just about incomprehensible and I couldn’t get it to work.
So for reference, this is how it works (for me, they have different models and the codes may be slightly different for your model):
- All commands are two bytes long and sent over UDP.
- The base station listens at port 8899.
- The easiest way to send those two bytes is plain-old echo, and netcat, like this:
echo -n -e "\x22\x00" | nc -u 192.168.100.105 8899 -w 0
- Here I’m sending 0x22 followed by 0x00, if the IP address of the base station is 192.168.100.105.
- Here are the commands I know of it understands (from having Wireshark watch the iPhone app talk to the base station), all in hex:
|on (last state)||2200|
|long on (all go all bright)||a200|
|colors starting with blue||2000|
|…through the color circle back to blue||20ff|
|light show 1||2700|
|light show 2||2800|
Which possibilities? Lots of them, like:
- Turn the lights on automatically (and gradually) as it gets dark outside.
- Flash the lights in red 5 min before my next conference call.
- Flash the lights in green somebody is at the front door.
- Turn on party lights for 5 min every hour of work, to remember the get up and move around.
There will be more ideas …