LIFX Developer Zone

ESP8266 controller

It’s probably been done before, but I couldn’t find an ESP8266 LIFX controller that I liked. The idea is to have an ESP8266 with a rotary encoder to turn on and off and dim LIFX lights. So I wrote a little library: it’s at peter-hum/LIFX (

It’s based on an example posted by daniel_hall on this forum: Sending LAN packet using Arduino - Developing with LIFX - LIFX Developer Zone

It discovers all devices and provides functions for switching and dimming by label or group.

I had a fair bit of trouble getting the discovery working reliably. I ended up sending the broadcast packet 3 times with a second in between and then slowing it all down by iterating through the discovered devices one at a time and leaving a 250 ms gap between GET messages. I’d be interested to hear of other approaches.

1 Like

Thanks for sharing! I’ll definitely be checking this out if I ever get myself to continue on my custom controller plans.

In case you’ve missed this post and find anything useful: LIFX Hand Gesture Control Project