LAN API and 1st generation LIFX Z

We’ve made a prototype iOS/Android app which uses the LAN API to control LIFX lights. It works fine in my office on some new bulbs we’ve just purchased, but won’t pick up my LIFX Z (1st generation) LED lights in my own home. The new bulbs do show up when I put them on my home network, so I don’t think this is an issue with my router config.

Are generation 1 LIFX Z strips (firmware 1.2) supposed to work with the LAN API? I know they work with the HTTP API, because I have some IFTTT recipes successfully hitting my lights.

Apologies if this is documented somewhere, but we couldn’t find anything.


Generation 1 LIFX Z strips do indeed support the LAN API.

Is discovery not working or control or both?

And what IOS/Android libraries are you using in your app?

Thanks for the response.

We are not using any iOS or Android libraries - it is all pure C#, in a Unity app.

And we haven’t got as far as testing control with these lights, because the discovery is failing.

Hope this helps.

I see.

In that case, how are you doing discovery?

So, from my developer…

" We are broadcasting a GetService message.
Listening for responses then sending unicasts to each with GetState and GetLocation.
After that we send unicast SetColor messages."

We’re using these as reference:

On my home network, my LIFX Z (gen 1) did not respond, but a new LIFX bulb worked fine.



That sounds correct.

When you create the GetService packet are you setting the source field to a non zero value?

So, yes, we are indeed setting the source field to a non-zero value. Is this correct?

yeap, a nonzero value is correct (setting source to zero can have weird behaviour).

In that case I’m really not sure.

If you have python3.6+ installed and do pip install lifx-photons-core and run lifx lan:find_devices does it find your strip?

I’ll try this over the weekend, and let you know how I get on. Thanks for your help on this.