LIFX Developer Zone

What are you building?

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:

1 Like

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.)

Last weekend my heater died (fortunately I like it cold :snowflake: but I do want to prevent my pipes from freezing) and my homebrew thermostat monitoring program dutifully logged that my thermostat was calling for heat while the temperature stayed the same or even decreased. That’s the kind of thing that is easy to programmatically detect, but unless I’m logged in to my thermostat web page I won’t see the alarm. Cue the LIFX bulb.
I want to add a feature that shows my monitoring programme is working (some kind of breathing effect) so that I’ll know if the data collection has failed. And then also some kind of scary red flashing light when a real HVAC problem has been detected.

The IoT code runs on a LAMP stack and is open source. Presently the code is undergoing a big rewrite (the original was all hand rolled ajax calls and such and I finally broke down and added jQuery) so the older version might be more useful to you. It only works on the 3M-50 WiFi Enabled Thermostat right now but it also pulls electrical use from TED5000)

Hi everyone!

Our startup based in Germany developed an innovative smart living app called 'naon". naon is able to learn the users habits and recommends new intelligent use cases to increase comfort and security. Of course, naon is working with LIFX light bulbs and allows to control and automate them via the naon smart living app.

In the naon app you have also the possibility to choose from a lot of preconfigured smart use cases for combining your LIFX bulbs with other smart devices (e.g. additional smart lighting technologies, smart sensors, heating thermostats and many more) to use smart scenarios like presence simulation, lighting upon arrival (via geofence), an umbrella reminder etc. All you have to do is to download the app. It’s free! :slight_smile:

Download iOS app here
Download Android app here

We’re really interested in how you like the naon smart living app. Please let me know :slight_smile:

from team naon

Fooling around with a local Python web app that uses the LAN API and LifxLAN. The idea is to take a snapshot of the current state of the lights, save it, and assign it to a path. After that, by going to a specific URL on the local server, you can turn the lights on/off or set their colors. For example: http://something.local/lights/all-on. The front-end is designed to be usable from mobile devices and a lean-back environment on a smart TV.

The settings are stored in Python’s basic implementation of a JSON file containing a bunch of attributes. By manually editing the JSON, I can also control the scheduling of the changes with a background thread.

The code has a long way to go, but it works well enough on a Raspberry Pi Zero W.

Hi folks, thought I’d share the macOS LIFX utility I just built:

Currently pending App Store review, intending to just release it as a free utility, though in the meantime, it should be easy to build the Xcode project.

I built the LIFX protocol implementation as a separate Swift 5 library (which should support both macOS and iOS), so hopefully other people can integrate it into their projects if they like:

I needed a tool to instantly update all lights on a network (although I only have one bulb so far), so I made one using lifxlan for Python. Once I understand the packet structure a bit better it should be easy to craft them myself and remove the dependency.