Share this project

Done

Share this project

Done
LIFX: The Light Bulb Reinvented's video poster
Play

LIFX is a WiFi enabled, multi-color, energy efficient LED light bulb that you control with your iPhone or Android. Read more

9,236
backers
$1,314,542
pledged of $100,000 goal
0
seconds to go

Funded!

This project was successfully funded on November 14, 2012.

LIFX is a WiFi enabled, multi-color, energy efficient LED light bulb that you control with your iPhone or Android.

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 lifx.co to register your interest or check out the tech.lifx.co 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.

Commands
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

Examples
(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

Comments

    1. Creator François Blavoet on October 19, 2012

      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. Creator Jessica on October 18, 2012

      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. Creator Jessica on October 18, 2012

      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. Creator Florian Rohrweck on October 17, 2012

      I second @chris' suggestion :D

    5. Creator Chris Messina on October 17, 2012

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

      #bedroom .moodLights {color:red;}

    6. Creator Steve Nicholson on October 17, 2012

      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. Creator Nick Baggott on October 17, 2012

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

    8. Creator mike smith on October 16, 2012

      Ahh! restful lighting!

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

    9. Creator Chris on October 16, 2012

      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. Creator Colin Jones on October 16, 2012

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

    11. Creator Carl Oscar Aaro on October 16, 2012

      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. Creator pclabtech on October 16, 2012

      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. Creator Andreas on October 16, 2012

      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. Creator Gerald Bailey on October 16, 2012

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

    15. Creator Greg Lindley on October 16, 2012

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

      Thanks.

    16. Creator Kurt Zarefoss on October 16, 2012

      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?