Emulating a LIFX bulb?

I’ve recently got a bunch of LIFX bulbs and I love them so far. The only problem is that I’ve also got some legacy lights that I can’t replace as LIFX doesn’t make anything like that (E14 fitting and really small bulbs). I’ve got Wi-Fi enabled relays on them but the problem is that I’ve got to use a different app to control them.

My idea is to make firmware for those relays to make them appear as a monochrome LIFX bulb, so I can just use the LIFX app to control all of my lights.

Has anyone done this before? What would be LIFX’s opinion on this? I understand I would be basically making a counterfeit product (by using their app without having paid for a bulb) however in this case I’ve already bought existing bulbs and would happily buy more if they made some that could fit in place of my E14 bulbs.

Regards.

2 Likes

Hello @Rjevski,

Yeah, that’s totally possible and people have experimented with that before. Monochrome LIFX bulbs even exist but have been retired (LIFX White 800).

This is not counterfeiting, you’re not make a fake copycat of the LIFX bulbs with the intent to sale them, you’re just re-implementing an API, and as the recent Google vs Oracle law suit over the Java APIs recently showed again, it’s totally legit.

Looking at and/or using lightsd might help you with your project, lmk!

I think re-implementing the LIFX API to make new things is exciting.

Would you know if lightsd supports emulating a bulb? From a quick skim of the Github page it doesn’t look like it. :frowning:

Yes, (I’m the author of lightsd).

lightsd doesn’t support emulating a bulb, though I’d love to have that to implement integration tests.

lightsd, or another third-party/open-source LIFX-LAN implementation, might be easier because to work with because they use a smaller set of the LIFX-LAN API (the official docs only document like a fourth of the actual API). I don’t know how hard or easy it is to emulate a bulb so that it completely fools the official app. You should definitely try, but I feel like it’s not gonna be trivial.

Another fun thing to do would be to come-up with your own protocol and then add support for it in lightsd, that’s something I’d be personally interested in providing support for! Then you could control both the LIFX bulbs and your bulbs through lightsd’s API.

The problem with using lightds as the main control system is that it doesn’t have an app and requires a server. My idea was to implement the LIFX emulation in the firmware of the smart relay.

Looks like I found just what I was looking for (and for my exact platform as well): https://github.com/area3001/esp8266_lifx

If that doesn’t work I’ll have a look at https://github.com/lifx-tools/emulifx next.

2 Likes

I see, you’re looking for something to control your DIY relays. Were you successful in using the ESP8266 chip attached to your relay as a LIFX bulb?

I think it’d be pretty cool to see a chip you’re working with yourself show up in the LIFX app as if it were a real bulb, and I’d love to see how it looks in action!