LIFX Developer Zone

Getting started: low level help please!

Hi All,

I was gifted a LIFX Mini Colo[u]r lamp in one of these:

I would like to set it up to be driven as intended via IFTTT, …


talk to it directly from my Raspberry PI that computes and publishes grid intensity here:

I don’t have a suitable Android or iOS device to run the LIFX app.

I have managed to talk directly to the lamp with (github) samclane/LIFX-Control-Panel from a Windows 10 laptop.

I am assuming (yes, probably wrongly!) that if I want connectivity to IFTTT then I somehow need to get my WiFi SSID and key into the lamp for it then to become a WiFi client. I am happy to write extremely low-level network code if need be. Or am I barking up the wrong tree?



Hello, you need to be able to put the device on the wifi and connect it to the cloud for IFTTT. This does require an Android or iOS device as doing that is not part of the public API.

That is unfortunate.

When you say “not part of the public API” do you mean “secret” or simply “undocumented”?



It means that only the apps can do those things.

I can write code to put arbitrary bytes on the air if need be.

I really don’t want to return a gift because a single setup step is not available even though I have a house full of various laptops and Raspberry Pis etc.



It’s not a case of whether the user is technical enough or not, they’re just not part of the public API.

You can borrow a friend’s phone and use that to connect to the wifi and put on the cloud and then the phone isn’t necessary after that.

Is the information somehow secret IPR?

I don’t want to have to borrow something critical for my house, nor give that other person permanent access to my WiFi and IFTTT and LIFX accounts.

Adding native apps to a phone is a security and privacy hazard, especially if it’s not clear what they are doing.



Fair enough. Unfortunately we don’t offer any alternatives for those tasks sorry.

Well this is disappointing.



Although I understand the reasons to some extent given that in this day and age everybody has a smartphone, @DamonHD makes a good point. There should be a basic onboarding process possible using the APIs (e.g. connect to WiFi).

Is this at least on the roadmap?

There isn’t currently anything explicit on the roadmap about making it possible for third party developers to onboard a LIFX device onto the WIFI.

Regardless of whether you’re currently prepared to publish such a method or not, am I right in assuming that it essentially involves becoming a client of the lamp and then passing it the SSID and key/password of the target (home) WiFi?



This hack worked for setup for me: lifx-hacks/ at master · tserong/lifx-hacks · GitHub

Then you should just be able to use the LAN API to communicate from your RPi.

This is an interesting development. If on-boarding is possible with this hack then Lifx may as well provide a formal solution.