Share this project


Share this project

LIFX is a WiFi enabled, multi-color, energy efficient LED light bulb that you control with your iPhone or Android.
LIFX is a WiFi enabled, multi-color, energy efficient LED light bulb that you control with your iPhone or Android.
9,236 backers pledged $1,314,542 to help bring this project to life.

For the Geeks in the House

Just wanted to give you some insight into the underlying scripting commands that control the LIFX smartbulbs. As you can see, you will have total control over your LIFX smartbulbs for custom applications and hacks on these brightly lit robotic overlords.

We're laying the foundation for an ecosystem of powerful and innovative software to control the lighting in your life. All LIFX library code will be open source. Developers will be able to create their own control apps for personal and commercial use. The actual bulb firmware will be licensed for non-commercial use only.

We've chosen a lightweight, extensible format for the commands implemented by the lightbulbs. These can be augmented by web friendly RESTful APIs.

Over the coming months, source code and documentation will be posted to a public repository as it beds down. If you're not a backer and want to stay in touch - head over to to register your interest or check out the blog.

Disclaimer: As is the nature of development, all final commands, procedures, bulb enclosures, LED arrays, etc are likely to change. But you can see where we're heading. It's going to be epic.


In the video, we're sending the commands to our demo lamp, which listens to an IP address/port on the LAN and acts as a gateway to the lighting mesh network. Multiple user interface clients can be connected to the demo lamp simultaneously.

Every command has an idenitifier "id", a keyword and some parameters. The id can address all of the lights using "0", an individual light "integer", or a collection of lights "integer, integer, integer, ...".

Commands are either executed immediately, e.g lit, go, stop or can be added to a sequence that can be run later, using the seq keyword. The lights can store a number of different sequences that you can start and stop at any time.

  • (id lit rrggbb) // set to a specific color
  • (id lit rrggbb time) // set to a specific color for a given time period
  • (id lit rrggbb:rrggbb time) // blend between two colours over a time period
  • (id seq rrggbb time) // add command to the current sequence
  • (id go step_number) // run a sequence from a specific point
  • (id stop) // stop the running sequence

(0 lit ffffff) // turn all lights white
(1 lit ff0000:0000ff 20) // light 1: blend from red to blue over 2 seconds
(2,3,4 go 5) // lights 2, 3 and 4: run a sequence from step 5

Police light sequence
(0 seq ff0000 2)
(0 seq 0000ff 2)
(0 seq go 0)
(0 go 0)

Colour blend sequence
(0 seq ff0000:00ff00 20)
(0 seq 00ff00:0000ff 20)
(0 seq 0000ff:ff0000 20)
(0 seq go 0)
(0 go 0)

For the KickStarter video, we had the lights running on a tenth of a second timer, which you'll notice in the above examples, e.g 20 represents 2 seconds. For production, we'll have finer grained timing and a neater way of representing time, e.g 2.0 seconds.


All the best,
Tech Team LIFX


Only backers can post comments. Log In
    1. Missing avatar

      François Blavoet on

      Just a thought : publishing an open source wrapper on GitHub (or more likely 3 : web, Android, ios) would be a great idea.
      It would allow quick integration of lifx by developers and the open source factor means that evolutions & bugs can be efficiently managed (something that is always problematic with a closed source wrapper).

    2. Jessica on

      Or even simple s-expressions. Anything more complex than that seems like unnecessary overhead.

      If the protocol is super simple (and uses some sort of standard), you can throw all the complexity into the client APIs/libraries, rather than into the controller hardware (it shouldn't need to parse a human-readable colour values for example)

    3. Jessica on

      I'd think a simple binary TCP/UDP protocol would be a lot simpler/lightweight. Could encode most of the commands in a few bytes... HTTP seems like overkill

    4. Florian Rohrweck on

      I second @chris' suggestion :D

    5. Chris Messina on

      You know what would be amazing? If I could use CSS3 to set the lighting in my house.

      #bedroom .moodLights {color:red;}

    6. Steve Nicholson on

      I am very excited to get my hands on these. Maybe tie it into an iTunes visualizer. I'm so glad you got this project submitted before KS decided to limit purchases to quantity one. That would have been a disaster.

    7. Missing avatar

      Nick Baggott on

      Looking good. Will there be a method to interrogate the bulb status?

    8. mike smith on

      Ahh! restful lighting!

      Interior decorator: Warm white?
      Geek: Representational state transfer...

    9. Chris on

      reminds me of a flash script I saw on a website once. could manipulate it so that it faded from
      red to orange to yellow etc. I stole and manipulated it to create a strobe effect before loading the main page. very cool to see your code is extremely similar!

    10. Colin Jones on

      Cool! Need to get the specification to an xbmc add on developer asap!

    11. Carl Oscar Aaro on

      Finally I'll be able to lit my living room lights from my terminal. I've seriously been waiting for this day for years. :)

    12. pclabtech on

      Fantastic! I can't wait to see the open source and ability to control it with such ease.

      Have you seen the new "cube light" that has a built in Linux server / wifi / web interface that is supposed to be hitting kickstarter today?

    13. Andreas

      hmm your spec's description of seq doesn't match everything you're doing with it in the examples (seq go and seq blending), but I think I understand it anyways :) looks fine so far.
      Is there some way to get feedback, for example getting a callback when a sequence or single operation is done, or querying the current color?

    14. Gerald Bailey on

      I'd like to build a mobile app to control them!

    15. Greg Lindley on

      Cool. Instead of just tenths of a second, please consider support for alternate time units, like beats per minute or frames per second.


    16. Kurt Zarefoss on

      Will you put putting the code out on github and managing via pull requests so the community can expand upon the core, or do you have something else in mind?