LIFX Developer Zone

Stand Alone LAN App


#1

I need a wifi connected bulb for an embedded product. There is an embedded processor with no internet, no Android, no IoS.

I have been successful controlling a bulb that is already connected. Is it possible to get a LIFX bulb to connect to the wifi network without internet, Android, IoS or additional apps?


#2

This looks pretty related: Can I connect a LIFX bulb to a WiFi router without a smartphone app?


#3

Thanks.

I found that thread, but it ended over a year and a half ago :frowning:

I was hoping for more current information.


#4

It is an interesting business model …

… force people to use your free app and use it as a barrier to using your bulbs that you sell !?


#5

As long as your lightbulb and embedded device are connected to the same local area network, you should be fine. No external internet connection is required.

You are welcome to try my Java code for interfacing with the lights over LAN. As long as your embedded device can run java, it should do whatever you need.


#6

Hi Nicholas,

Many thanks for the code.

I’m not a Java developer so maybe I missed it, but I don’t see anything related to connecting to a bulb that has not already been connected to the network using the LIFX app.

Did I miss something?

Thanks.


#7

Ah yes, I see what you mean. This code is only for operating the device
once the wifi details have already been uploaded to the bulb using either
the android/ios app or the Windows/Linux software.

Sorry, I guess this isn’t what you are looking for afterall. I may add that
missing functionality at a later time. However, for now, I guess you’ll
need to look elsewhere.

Best of luck,

-Nick


#8

Do you know where to find the information to develop that code? I don’t mind writing and testing the code, I just don’t know the protocol or process.


#9

LIFX … comments please ???


#10

Sorry for the late response. I haven’t looked into that, so I am not sure where you would need to begin. However, if I recall correctly, when I was setting up my lights an ad-hoc wifi network was created by the light (that my phone connected to) and from there the actual wifi credentials were uploaded. Try analyzing the network traffic during this process and maybe you’ll strike some luck


#11

Hi,
Thank you very much for this code.
Is it possible to select one bulb, or to retrive the list of available bulbs, group, etc with your code ?
I have read your Main.java file and have figured out that you manipulate all the available bulbs on your network.


#12

Yes, you can select individual bulbs. I believe the samples I include in my main function I show an example of sending the command only to one device as specified by its IP Address. Theoretically it is also possible to broadcast the command over the whole network with the tagged field and MAC Address properly set in the message itself to also achieve this result.

If you transmit the GetService message to the whole network, while listening for traffic in Wireshark (sorry I didn’t automate this in my code, but you could add it) the StateService messages that are returned will come from the IP address of the bulb(s) on the network. You can also download the firmware update checker tool from Lifx’s website or view your router’s config page to obtain these IP addresses.


#13

Hi,
I’m trying to manipulate one bulb at a time.
Did you figure it out how to do so?


#14

Follow the examples used in the default main function; there is at least command that is broadcast to a specified IP address. When the message is broadcast with this method, only the bulb with the specified IP address will be affected.