Communication with the web server directly through ip addresses?

Hi there,

I have a chrome extension that tries to find resources available within local connected devices. I know there is a HTTP API, however, I am curious if it is possible to communicate with the LIFX bulb through the ip address that is assigned to it? I tried loading / of that ip and got a 404, if there exists a web server, is there a way I could communicate with it?

Thanks a lot!

Hi,

The devices can be communicated with over the local network using our binary protocol over UDP. The documentation for this protocol can be found at https://lan.developer.lifx.com/.

I’m not sure if a chrome extension would have the network access required to do that though.

Outside a chrome extension there are libraries like LIFXLan and Photons

You’re right. No socket access from Extensions unfortunately. The official line is that as extensions aren’t as sandboxed as Chrome Apps (which do support sockets) there’s a potential security risk.
https://bugs.chromium.org/p/chromium/issues/detail?id=152875

@shanbai6 can you rewrite your Extension as an App?

Also to answer your original question, there’s no web server running on LIFX bulbs.

Thank you all for your thoughts! I will look into these and see what I could do.