Robust local API implementation (accessible via REST)

Hello!

Long time supporter of your great bulbs, I am on a constant lookout for a properly working local implementation of the API. I’ve been using lifx-http with firmware 1 on my bulbs with relative success, however, it does not seem to perform well at all with my latest 2.0 bulbs.

I’ve dedicated a small linux VM to the light controller, so there really is not any limitation to what tech I can use - but after some time looking, I am just not able to find good reliable solution.

I would really, really appreciate your help! For last 2+ years, I have been on a lookout for a way to reliably control my bulbs and integrate them into my home automation setup. Am I correct to assume that there is no proper implementation of the latest protocol?

Anything running on linux works!

Well I for one don’t follow you at all.

  1. Firmware 1.0 never had access to the cloud and thus the HTTP API.
  2. Firmware 2 does and this is documented as well as the LAN protocol and a number of API’s have been created. They are discussed in these forums. There is a .net API, Python and more.
  3. You talk about local API via HTTP, maybe you mean the Ruby ones that were available. It has been made clear on github and here that they don’t work with firmware 2.0. Here is one that may work https://github.com/magicmonkey/lifxjs All of the LIFX released API’s on Github no longer are supported.

You can integrate the lights into your home automation system via the web API or use the documented LAN protocol. If you go to github you will find Daniel is working on a Python API that you could use on your server

As to a local HTTP API produced by LIFX at this stage there is none. As Daniel has mentioned many times LIFX expects others to create the API’s based upon their incomplete documentation.

Whilst not fast the web API works well but I only use it with Kodi at this stage. It isn’t as fast as a local API but this isn’t an issue for me as I am not running a nightclub. What I really want back is Lifxtend, I loved that app but the developer stopped because of a lack of LAN documentation and now that it is available it seems he either is too busy or just not interested any more.

I think @petr is talking about the Local HTTP API that was built by one of our employees @chendo in his spare time. I’d would be nice if it was updated it, but its unfair to expect him to work for LIFX during the day and ask him to also work on things in his free time.

I’m not amazing at Ruby, but if we can figure out together where the issue is and send him a PR, I’m sure he would gladly accept it. My position at LIFX includes developer support tasks so I can justify time spent on this.

Is there a particular reason that the public HTTP API is not up to scratch for you? Is it an issue with latency, throughput, complexity or something else. We really want to understand how people are using our API and how they wish they could use it so that we can make it better. We already have a bunch of good suggestions from users that are on their way.

1 Like

Yes, I’ve built simple local HTTP API for my own use - https://github.com/petrklus/lifx-simple

It’s quite basic but does all I need - sets colour of a bulb in a reliable matter (sends packet and retries if no ACK was received).

I am sure it will be very easy to customise.

1 Like