Lifx LED bulb got delivered

Forum rules

Questions about hardware that can be controlled by Indigo (but not through the interfaces and plugins listed). If Indigo doesn't support some bit of hardware you're interested in, and you don't find a 3rd Party Plugin for it, add it to this forum. Be sure to include links to as much information as you can find about it.

Note: adding it here does not mean we're going to add it - in fact it's possible one of our 3rd party developers may decide to write a plugin for it. We add hardware/features based on a lot of different factors beyond just having a request for it.

Posted on
Wed Dec 11, 2013 6:55 pm
Indy_Larry offline
Posts: 133
Joined: Dec 03, 2013
Location: Indianapolis

Lifx LED bulb got delivered

Well after a long wait I just got one of my two lifx LED bulbs tonight. Going to try and make time to play with it and see what can be done with integrating it with Indigo.

Posted on
Fri Dec 13, 2013 9:51 am
DU Lou offline
Posts: 279
Joined: Mar 08, 2012
Location: Florida

Re: Lifx LED bulb got delivered

Thats great news Larry. Have you been following the comments on KS for LIFX. I am not sure if this is useful but one of the backers "Kevin" has started hacking the comms protocols:

For anyone wanting to write their own code to control the bulbs, I've attempted to document the comms protocol (based on packet captures) at my Github page (https://github.com/magicmonkey/lifxjs). I've got implementations in NodeJS of CLI programs to turn on / off the lights and change their colours, and also a tiny proof-of-concept web interface and a bridge onto MQTT to control the lights.
Next task is to use NodeRed to make it notify when I get an email or SMS, via MQTT. This is the fun I backed the project for!
If any kind of developer community built up, I'd happily contribute - all my research is on that Github repo (Protocol.md). I'm not really a JS programmer, but it's enough to see what's happening and I'd happily take pull requests.


I have yet to receive my bulbs but I am excited to see what you can come up with in Indigo!
Thanks,
~Lou

Posted on
Fri Dec 13, 2013 5:12 pm
Indy_Larry offline
Posts: 133
Joined: Dec 03, 2013
Location: Indianapolis

Re: Lifx LED bulb got delivered

Thanks Du Lou. I hadn't seen this post, but I'll look into it. So far I'm liking these bulbs.

Posted on
Fri Dec 13, 2013 6:06 pm
DU Lou offline
Posts: 279
Joined: Mar 08, 2012
Location: Florida

Re: Lifx LED bulb got delivered

Indy_Larry wrote:
Thanks Du Lou. I hadn't seen this post, but I'll look into it. So far I'm liking these bulbs.


Yeah I wasn't sure and wanted to point it out since there are so many comments running around the LIFX KS project now.

Good to know you are liking the bulbs! Do you have Hue by chance? Any comparisons (pros/cons) to speak of?

~Lou

Posted on
Fri Dec 13, 2013 8:28 pm
DU Lou offline
Posts: 279
Joined: Mar 08, 2012
Location: Florida

Re: Lifx LED bulb got delivered

Indy_Larry wrote:
Well after a long wait I just got one of my two lifx LED bulbs tonight. Going to try and make time to play with it and see what can be done with integrating it with Indigo.


Oh and what was your backer # for this KS? I am #6326 and am just trying to gauge when mine will arrive ;)

Posted on
Sat Dec 14, 2013 1:15 pm
Indy_Larry offline
Posts: 133
Joined: Dec 03, 2013
Location: Indianapolis

Re: Lifx LED bulb got delivered

Hey Du Lou,

No I don't have the Hue bulbs, so I cannot compare it to those. I was looking at getting them then I came across the Lifx project. I just didn't think it would take so long to get. My KS pledge # was 6228 so I'm betting you'll get them soon.

Posted on
Tue Dec 17, 2013 10:53 am
SSteve offline
User avatar
Posts: 84
Joined: Sep 12, 2012
Location: Sierra Foothills, California

Re: Lifx LED bulb got delivered

My four bulbs showed up last night. I put them in Ikea Holmö lamps in the four corners of the living room. Thanks for the link to the JavaScript library, Lou. I wrote my first program which turns on all the lights then slowly cycles them through the color spectrum. Now I just need to work on my Indigo integration. And then scrap it all and start over once the official API gets released. :|

Code: Select all
var lifx = require('./lifx');
var util = require('util');

var step = 64;
var bulbs = [];
var bulbsFound = 0;
var currentHue = 0;
var saturation = 32767;
var luminance = 65535;
var whiteLevel = 0
var timing = 0;
var timer = 0;

setColors = function() {
   for ( i = 0; i < bulbsFound; i++ ) {
      lx.lightsColour((currentHue + i * 16384) & 0xFFFF, saturation, luminance, whiteLevel, timing, bulbs[i]);
      //console.log('Bulb ' + i + ' hue set to ' + ((currentHue + i * 16384) & 0xFFFF));
   }
   currentHue = (currentHue + step) & 0xFFFF;
}

initBulbs = function() {
   console.log('Initializing bulbs');
   lx.lightsOn();
   currentHue = 0;
   setColors();
   timer = setInterval(setColors, 500);
}

var lx = lifx.init();

lx.on('bulb', function(b) {
   console.log('New bulb found: ' + b.name);
   bulbs[bulbsFound++] = b;
   
   if (4 == bulbsFound) {
      initBulbs();
   }
});

var stdin = process.openStdin();
process.stdin.setRawMode(true)
process.stdin.resume();

stdin.on('data', function (key) {
   //process.stdout.write('Got key ' + util.inspect(key) + '\n');

   switch (key[0]) {

      case 0x31: // 1
         for ( i = 0; i < bulbsFound; i++ ) {
            console.log('bulb[' + i + ']: ' + bulbs[i].name);
         }
         break;

      case 0x03: // ctrl-c
         console.log("Closing...");
         if (timer) {
            clearInterval(timer);
         }
         lx.lightsOff();
         lx.close();
         process.stdin.pause();
         //process.exit();
         break;
   }
});

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 12 guests