LIFX Developer Zone

Python library for local bulb control

Lo forums. Does anyone have an opinion on a Python lib for accessing bulbs on the local LAN?

There are quite a few around github:

The first one looks simple, and says it’s based on the others. I wondered if anyone had an practical experience before I dive in. Cheers!

(sorry a couple of those aren’t proper links - new user restrictions)

use what suits you. Have a look at lifx-sdk on github and python docs by Daniel Hall from here.

I sure will use the library that suits me! Thanks!

Do you have any experience with any of them?

I have seen several mentions of Daniel’s library - but no one ever links to it… A search for “lifx-sdk” on github led me to another lib:

Also, where are “python docs”? Thanks

It is in the what are you building topic.
This came up In a bing search. 3rd one down

And
https://pythonhosted.org/lifx-sdk/index.html

I prefer the HTTP API as it works always for me. The LAN API whist fast had issues that I gave up on, I would set the colour of a bulb and for 3 to 5 seconds it would stay that colour then it would revert to the old colour, sometimes it did not do that. It was most likely my fault or just that Daniel has not completed his SDK so as I said I went back to HTTP and have been happy as.

Right thanks. That’s the lib I found just now too.

As I understand it, all HTTP API requests go via the LIFX cloud servers right? I want to keep all my traffic inside the network.

Yes correct. The HTTP API is provided by LIFX so has a dedicated developer team, all the LAN API’s are created based upon documentation and none of them are official LIFX API’s. The LAN protocol is faster but unless you write your own API you are limited by the quality of the API.

The LAN protocol does not have the scenes or group support that the HTTP API has so there is a functionality trade off unless you are going to build your own application to do it all.

It would be nice if LIFX could package the HTTP API into a local server offering to install where you want. Something like the Raspberri Pi would be a perfect local controller for it.

Nice! Looks like you could put me out of a job here @boxhead! :smile:

Actually we recently documented the groups messages, so you should be able to add groups support to most of the existing libraries out there.

My SDK is woefully incomplete, but it shouldn’t do that …