LIFX Developer Zone

What are you building?

  1. Python HTTP server using LifxLAN to POST to various lights around the house (for speed)
  2. ESP8266 board POSTing some commands on button-push

Mounted the ESP8266 behind a momentary light switch, so I now have near-instant physical control of a LIFX light. Click for on/off, hold for dim, double-click for 100% brightness

Happy to share if anyone’s interested.


Semi-interested in seeing the code for #1
Super-duper interested in learning everything about #2! Please share!



No problem.

Here’s the code - it’s fairly rough and ready, as I wasn’t expecting to publish!
In particular I was going to fix the arduino code so you can set values for the python server and light name once and then use them in the POST calls later on, but didn’t have the patience to figure out how to concatenate the strings together - C is not a language I’m proficient in.

I’ve tried to document everything in the readme, but let me know if there’s any glaring errors.
Also fixes welcome :slight_smile:


Also, given time and inclination, I’d have let the server accept JSON packets, and maybe even ported it to node.js, but right now it’s working for my requirements.


Enabled AutomationManager to support lifx.
Features include full local control and automation when running AutomationManager as a hub/server on a low end (inexpensive!) android device. There’s a homebridge for AutomationManager (runs on the same android device) for iOS/HomeKit use.


Here’s a cool use-case I implemented with the new LIFX Light Beam – a virtual hour glass timer.

In this example it counts down the 30 minutes our kids get when they use a ‘point’ to play video games: (points are earned by doing chores, taking care of pets, babysitting, etc)


That is magnificent! Just like the real iOS app. Well done. Thank you for sharing the code too!


Great way to teach kids the value of a limited resource. Nice job!



I’m the owner of diyHue project and i want to know if is possible to receive one LIFX bulb for about one month to add support for it in my project. DiyHue is an Philips Hue emulator that can control multiple types of lights including Philips Hue, Ikea Tradri, MiLight, Xiaomi Yeelight and any wifi bulb controled by esp8266 microcontrolled by flashing the firmware with custom one.



Having a quick look at your code, I see your project has a python backend. You probably want to check out lifxlan. It should be fairly self-explanatory. You can discover lights on the local network, then push updates back to them.

I’d be happy to test, if you’re happy for fairly sporadic replies (new baby == very little free time apart from in the middle of the night!)


Theoretically is easy to implement, but in practice is not that straight forward. I need full api details, not just the accepted commands, ex:

get_lights() # returns list of Light objects

I need to parse the “returns list of Light objects”, but i don’t know exactly what to expect in all possible cases (no lights, x lights, etc).



I am working in a customer support desk, and we want to use the LIFX as a “stoplight”, so that other departments know how busy we are.
We want to generate hourly excel reports, and based on our activity, they would be linked to the LIFX light.

For example, if we have less than 10 open tickets, it would be green.
If we have between 10-30 open tickets, it would be orange.
And if it is over 30, it would be red.

Can anyone suggest on how to best get started, whether to use an API or whatnot.



There are a few ways that spring to mind, but they all depend on what you’re using to “generate hourly excel reports”

The simplest option is to use something like IFTTT. There are triggers that can watch for changes on a Google Sheet and actions for LIFX bulbs. If it’s possible for your excel report to actually be a Google spreadsheet that’s the simplest solution by far.

If not, you’re looking at writing some code. There are posts for several libraries on the forum, including .NET, python and Java. You could probably use the .NET one with a macro in Excel, but it’s been a while since I’ve worked in that space.


Hi Daniel,

I need to build an Android app when the mobile phone rings, I need to make LIFX Light to flash, preferably using LAN Protocol.

I am familiar with Android SDK and Java.

I am trying to find the LIFX SDK for Android and some examples.



@johanromuald I would recommend this library for Android dev with LIFX.


Thank you mark. I will look into it.

Best Regards


Hi everyone. As with prior years, we have an all-new collection of ten immersive light+sound presets for Halloween. With all the spooky and scary tropes well covered by other presets in our Light Store, this year we’re taking a different approach and adding in ten new environments perfect for when you dress up your kid in a halloween costume and want to have a little fun before or after trick-or-treating. Enjoy!

(Make sure you update to at least Lightbow 3.0.5 to see the latest “Trick or Treat?” pack.)