Autolog LIFX Controller Discussion

Posted on
Sun Jun 22, 2014 4:02 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Autolog LIFX Controller Discussion

Please use this thread for any suggestions or questions on the Autolog 'LIFX Controller' Plugin that I have just started to develop :)

I am currently testing out options on how to make this work. I can already control my LIFX lamp from an action group as part of this testing. At the moment I only have one lamp to test with but I have ordered some more now which will help with my testing.

I will keep this thread posted on progress and post an announcement when the plugin is available.

Posted on
Sun Jun 22, 2014 5:00 am
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Autolog LIFX Controller Discussion

Excellento, I'm looking forward to this.. I've been considering some lifx bulbs and this might be just what the doctor ordered... Now if only indigo touch had some way of displaying a colour chart in a pop up ;)


Sent from my iPad using Tapatalk

Computer says no.

Posted on
Sun Jun 22, 2014 10:18 pm
manwithavan offline
User avatar
Posts: 76
Joined: Jan 14, 2014
Location: Melbourne Australia

Re: Autolog LIFX Controller Discussion

Kudos autolog! Bringing a warm white glow to my neural circuitry. :)


Sent from my iPad using Tapatalk

Posted on
Mon Jun 23, 2014 11:29 am
Indy_Larry offline
Posts: 133
Joined: Dec 03, 2013
Location: Indianapolis

Re: Autolog LIFX Controller Discussion

This is GREAT news. I currently have 2 Lifx bulbs and would really like to have them working with Indigo.


Sent from my iPad using Tapatalk

Larry

Insteon, Z Wave, Hue, Sonos

Posted on
Mon Jun 23, 2014 2:22 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Autolog LIFX Controller Discussion

I have started coding the plugin having finished my initial testing. :D

I am starting off by having two device types: A LIFX lamp and a LIFX preset (which will contain the values for Hue, Saturation and Brightness). As there isn't an easy way to set the colours (i.e. no colour sliders etc in Indigo) I though the easiest way would be to define a preset by saying save the current state of a lamp to a preset. That means the LIFX iPhone App can be used to set the required state and then an action can be run to save a preset. The plugin will provide an action to select a lamp and apply a preset to it. I also intend that the basic values of Hue, Saturation and Brightness can also be set by the plugin.

While not ideal, the plugin requires that Ruby 2.0 is installed so the lifx-http server can be run which the plugin communicates with. In the fullness of time and if and when an osx api is available then this could be changed.

I have some new lamps arriving Wednesday which will enable me to more easily test how to handle multiple lamps. :)

Posted on
Tue Jun 24, 2014 12:32 am
manwithavan offline
User avatar
Posts: 76
Joined: Jan 14, 2014
Location: Melbourne Australia

Re: Autolog LIFX Controller Discussion

Brilliant!


Sent from my iPad using Tapatalk

Posted on
Tue Jun 24, 2014 11:13 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Autolog LIFX Controller Discussion

Here is a quick update on progress :)

The basic plugin framework is in place and I can now toggle my LIFX Lamp on and off. I can also set the colour. All from Indigo Touch :D

The Plugin automatically defines devices for any LIFX Lamps it finds. At the moment I have only tested with one lamp. I get two more tomorrow (they have arrived at the store - I just need to go and pick them up).

Next steps that I have planned at the moment are to:
  • finish off the additional actions for lamp control
  • add in any functionality required for multiple lamps
  • set-up thread control sub-processing for the lifx-http server (at the moment I am running it in a terminal session)
  • code the Preset processing
  • do some documentation - how to install and basic running

Once it is in a reasonable state (maybe within a week or sooner), I will release it as an Alpha test version.

Posted on
Tue Jun 24, 2014 11:39 am
Indy_Larry offline
Posts: 133
Joined: Dec 03, 2013
Location: Indianapolis

Re: Autolog LIFX Controller Discussion

I'm sure you've already seen this but the bulb have a firmware update.

http://updates.lifx.co


Sent from my iPad using Tapatalk

Larry

Insteon, Z Wave, Hue, Sonos

Posted on
Tue Jun 24, 2014 12:00 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Autolog LIFX Controller Discussion

Indy_Larry wrote:
I'm sure you've already seen this but the bulb have a firmware update. ...

I hadn't - Thanks for the heads-up - I'll put it to the top of my to-do list :)

Posted on
Sat Jun 28, 2014 11:54 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Autolog LIFX Controller Discussion

Quick update on progress:

1. Additional LIFX bulbs acquired, firmware updated and all working OK
2. As anticipated, using multiple bulbs highlighted problems with the plugin code.
3. However, that is all now sorted and the following functions seem to be working:
  • LIFX Status
  • Turn On LIFX Lamp
  • Turn Off LIFX Lamp
  • Toggle LIFX Lamp On/Off
  • Color Set
  • Hue Set
  • Saturation Set
  • Brightness Set
  • Kelvin Set
  • Apply Preset
  • Define Preset

Presets are created and updated in Indigo Variables - allowing any number (within reason) to be defined.

The Plugin is probably fairly near a version that can be released for Alpha Testing. Over the next few days I will put together some documentation and upload a version that can be tested :)
Last edited by autolog on Mon Jun 30, 2014 7:24 am, edited 1 time in total.
Reason: Spelling mistakes

Posted on
Sat Jun 28, 2014 1:44 pm
Indy_Larry offline
Posts: 133
Joined: Dec 03, 2013
Location: Indianapolis

Re: Autolog LIFX Controller Discussion

Great work. I guess I'll have to wait until after vacation before I can DL it and try it out.

Larry

Insteon, Z Wave, Hue, Sonos

Posted on
Sun Jun 29, 2014 11:14 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Autolog LIFX Controller Discussion

Download now available - see announcement :)

Posted on
Sun Jun 29, 2014 8:03 pm
Indy_Larry offline
Posts: 133
Joined: Dec 03, 2013
Location: Indianapolis

Re: Autolog LIFX Controller Discussion

Hi Autolog,

Thanks for getting this plugin up and going. I have installed the plugin but it does not show my bulbs (I have 2) individually, I just see "all bulbs". Also I'm not able to control the bulbs with triggers or action groups.

I have reloaded the plugin
I have reset both Lifx bulbs

Jun 29, 2014, 9:40:56 PM
Enabling plugin "Autolog LIFX 0.1.0"
Starting plugin "Autolog LIFX 0.1.0" (pid 5283)
Started plugin "Autolog LIFX 0.1.0"
Autolog LIFX Autolog 'LIFX Controller' initializing
Autolog LIFX Initialising LIFX Command thread for 127.0.0.1:56780 [lifx-http]
Autolog LIFX LIFX Command thread initialised for 127.0.0.1:56780 [lifx-http]
Autolog LIFX Started 'All: LIFX Lamps': 'ALL'
Autolog LIFX Started 'All: LIFX Lamps': 'ALL'

Again thanks for your work on getting this plugin developed and sharing it with everyone.
Attachments
Screen Shot 2014-06-29 at 9.59.21 PM.png
This is my device view, note that it says they are off, but they are not
Screen Shot 2014-06-29 at 9.59.21 PM.png (131.53 KiB) Viewed 9474 times

Larry

Insteon, Z Wave, Hue, Sonos

Posted on
Mon Jun 30, 2014 12:00 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Autolog LIFX Controller Discussion

For some reason it isn't detecting any of your lamps. The 'All: LIFX lamps' gets added in by default assuming that lamps will be found - I will maybe need to change how this works in a future version to avoid confusion. Also the custom states for 'All: LIFX lamps' and 'Group: ...' lamps don't mean anything - I will alter this as well.

I will have to enhance the error reporting and debugging to determine what is going on.

As an initial step, can you check that lifx-http is working correctly as detailed in the LIFX-HTTP API web-page.

I suggest the following steps:
  1. Disable my plugin
  2. Open a terminal window and enter 'lifx-http' - the server should start
  3. Open another terminal window and enter 'curl http://127.0.0.1:56780/lights.json' - your lights should be listed

If you can post back the results of the curl command then I can see if it highlights anything.

In the meanwhile I will improve the error checking - this may take a few days :)

Posted on
Mon Jun 30, 2014 2:36 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Autolog LIFX Controller Discussion

I found the problem - I had temporarily disabled the call to the LIFX-HTTP server :oops:

This meant it would never work on another system with a fresh install. It worked on mine because I had the LIFX-HTTP running in a terminal window as I was debugging some code.

Hopefully it will work now :)

Who is online

Users browsing this forum: No registered users and 2 guests