Autolog LIFX Controller Discussion

Posted on
Thu Aug 25, 2016 8:31 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Autolog LIFX Controller Discussion

wobbly wrote:
... 1. Are you turning the bulb on and off based on brightness settings?

Yes as that is what Indigo does with a normal dimmer device AFAIK. The plugin should remember the previous brightness value prior to the dim down happening, so that if you turn the lamp on it should go back to the previously remembered brightness.

wobbly wrote:
It seems that sometimes this is leaving my bulbs in weird states ...

What sort of weird state (so I can try and understand what the problem is)? :wink:

wobbly wrote:
2. Can we separate this functionality, or does that make no sense?
Probably doesn't but it depends what your use case is - can you explain what that is in more detail? It might be possible to make this a user selectable option?

wobbly wrote:
3. How do you recommend I accomplish a long slow fade? Problem I'm facing is that sometimes when I do this, the bulbs seem to go into a weird state, where I can try and fade them up only to find they haven't turned on ... because they've turned themselves off when I faded out, but as I fade them up again the brightness rises but they're staying turned off?

This sounds like a bug. Can you give a step-by-step of what you are actually doing so that I can replicate it on my system for testing purposes?

One of the challenges with this plugin is trying to map the way the LIFX lamps work with the way Indigo works. At the moment Indigo doesn't have a concept of ramping down. So if a light is on say at 80% and you issue a command to dim it over say half an hour to 0% (off) - how do you map this as Indigo just shows the lamps on or off. It would be nice to have a visual indication of a lamp in ramping down (or up) mode. I currently use timers to update the lamp status while this process is active.

I am actually in the process of re-engineering this plugin to handle this situation better (improving the timer processing amongst other things), so if I understood in more detail what your requirements and issues are then I might be able to accommodate them. :)

Posted on
Thu Aug 25, 2016 8:56 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Autolog LIFX Controller Discussion

wibbly wrote:
I'm trying to understand the relationship between turning the LIFX bulbs on and off using the builtins and changing the brightness using 'Adjust'.

With my previous response, I just dived into the detail and ignored your first sentence :oops:

I have just tried adjusting via the built in commands and yes I can see that this may not work as intended e.g. lamp is off, you adjust the brightness up by 20% and the lamp doesn't come on - obviously needs fixing. :)

I guess the question is how would you like it to work?

If you want to have a long ramp time you have to use the specific LIFX Plugin Action Set Color/White where you can set all the parameters. :)
Last edited by autolog on Tue Sep 06, 2016 2:53 am, edited 1 time in total.
Reason: grammar correction

Posted on
Sun Aug 28, 2016 7:58 pm
wibbly offline
Posts: 6
Joined: Aug 24, 2016

Re: Autolog LIFX Controller Discussion

Sorry not to respond quickly ... have been distracted by actual work.

I'm glad you've seen the problem now. Saves me generating a test case. :?

I'm not sure of the best approach, but it needs to be consistent.

The LIFX app turns the bulb on if you make any adjustment to the brightness, but also doesn't have the idea of 0% brightness. When you dial it down it stops at 1% and then you use the power button. Any adjustment to brightness when it is off will turn it on.

As I see it, you can either couple the colour/brightness to the on/off ... or completely separate it.

Both have limitations, but both also have advantages.

For now I'll try to use the LIFX Plugin actions and see how that goes.

[The specific use case is that I like to have daylight in my bedroom when I wake up, but I live in a country that is in a manipulated timezone on the equator, so it is always dark until 7am. I use a couple of LIFX bulbs to bring a nice bright daylight before the sun has risen. I do that with a 30 minute fade. I have been doing this via IFTTT (because the LIFX app has been less reliable with schedules), but I want to move it to Indigo.]

Thanks!

Posted on
Mon Sep 05, 2016 9:22 pm
wibbly offline
Posts: 6
Joined: Aug 24, 2016

Re: Autolog LIFX Controller Discussion

I've converted my schedules to use only the "Autolog LIFX Plugin Action Set Color/White" and everything is working beautifully ...

Posted on
Tue Sep 06, 2016 2:51 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Autolog LIFX Controller Discussion

wibbly wrote:
I've converted my schedules to use only the "Autolog LIFX Plugin Action Set Color/White" and everything is working beautifully ...

Thanks for the update - pleased it is working OK for you. :)

Posted on
Tue Sep 06, 2016 10:00 am
wibbly offline
Posts: 6
Joined: Aug 24, 2016

Re: Autolog LIFX Controller Discussion

I spoke too soon. I'll generate some test cases before I say any more. There's definitely something weird going on.

Posted on
Thu Dec 01, 2016 10:36 pm
Nidocamen offline
Posts: 34
Joined: Oct 18, 2011

Re: Autolog LIFX Controller Discussion

OK, I originally posted about needing some scripting documentation, but found it earlier up in the thread. I was able to run some commands to my LIFX bulbs via Python, but can't seem to figure out how to read some of the attributes of the bulbs, such as current kelvin and hue?

Another question is how to update several LIFX lamps as a group, beyond just on/off control as a "virtual device group". Can the plugin detect "groups" that are defined in the LIFX app? Do those get pushed to the bulbs, or do the groups just exist within the app?

Thanks,

--Joe

Posted on
Fri Dec 02, 2016 5:07 am
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Autolog LIFX Controller Discussion

Hi Joe,
Nidocamen wrote:
OK, I originally posted about needing some scripting documentation, but found it earlier up in the thread. I was able to run some commands to my LIFX bulbs via Python, but can't seem to figure out how to read some of the attributes of the bulbs, such as current kelvin and hue?

You should be able to access the the custom states by using code such as:
Code: Select all
dev = indigo.devices[<YOUR LIFX DEVICE ID>]  # e.g. 12345678
hue = dev.states['hue']  # 0 - 360
lifxHue = dev.states['lifxHue']  # 0 - 65535
kelvin = dev.states['kelvin']  #  2500 - 9000
indigo.server.log(u"LIFX device '%s': Hue = %s [%s], Kelvin = %s" % (dev.name, hue, lifxHue, kelvin))
The available states are viewable under Custom States in the main device window.

Nidocamen wrote:
Another question is how to update several LIFX lamps as a group, beyond just on/off control as a "virtual device group". Can the plugin detect "groups" that are defined in the LIFX app? Do those get pushed to the bulbs, or do the groups just exist within the app? ...

The plugin doesn't handle Groups at the moment. :|

However, I am currently doing a fundamental re-write of the LIFX plugin with the aim of making it more reliable. I am changing it to use the opensource lifxlan library (although I am having to make a few changes to that) - Initial results are very encouraging and it is my top priority at the moment - I want to get this Indigo V7 out as soon as I can. Adding in Groups shouldn't be too difficult but it is something I will add in after I have done the initial release of the Indigo V7 version. :)

Posted on
Fri Dec 02, 2016 2:29 pm
Nidocamen offline
Posts: 34
Joined: Oct 18, 2011

Re: Autolog LIFX Controller Discussion

That's great info, I will give it a try later today, thank you!

In the main device window (double-click the device from device list), I don't see the various attributes or states of the LIFX lamp, just the basic config details. Is there another device window that I've never seen before (that would be embarrassing as I'm a longtime Indigo user lol) I'm on Indigo 6.1.9 if that helps any.

Great to hear about the possibility of Groups, thanks for working on this plugin and for your help!

Posted on
Fri Dec 02, 2016 5:06 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Autolog LIFX Controller Discussion

Nidocamen wrote:
... In the main device window (double-click the device from device list), I don't see the various attributes or states of the LIFX lamp, just the basic config details. Is there another device window that I've never seen before (that would be embarrassing as I'm a longtime Indigo user lol) I'm on Indigo 6.1.9 if that helps any. ...

You don't need to double-click the device in the main window - Just select a LIFX lamp in the device list and the Custom States are listed beneath the On/Off/Brightness Controls - You may have to scroll the pane to see them.

Hope this helps. :)

Posted on
Sun Dec 04, 2016 4:48 pm
Nidocamen offline
Posts: 34
Joined: Oct 18, 2011

Re: Autolog LIFX Controller Discussion

Wow, ok.....thank you! I feel like such an idiot, I never tried scrolling that pane - of course it doesn't help that Apple made scrollbars basically invisible several OS X versions ago :-/

Posted on
Tue Dec 06, 2016 3:11 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Autolog LIFX Controller Discussion

Just a quick update for those following this thread :)

I am happy to report that I have the new version of my LIFX plugin almost ready for beta testing. Even though I will initially release it as a beta it appears to be quite stable - so much so that I am now using it in my production system to control all the LIFX lamps in our house.

I have fundamentally changed the plugin to use a modified version of LIFX LAN open source code from Github.

This has made things more reliable and adds some new features into the plugin. For example, you can now set the values for a LIFX device without having it turn on - i.e you can preload the device with required values. The Waveform command ( to pulse and flash the lights is much improved) - just in time for Christmas. :)

The plugin requires Indigo 7 and supports the new RGBW colour controls. It is not 100% accurate as LIFX works on Hue, Saturation and Brightness and there is a little bit lost in translation between the different colour models but it is pretty good. :)

One of the great things about LIFX devices is the ability to specify a duration over which a command should be processed. The plugin supports different durations for on / off / dimming etc, that can be specified at the plugin, device and command level, overriding as required. The messages sent to the event log when a LIFX command is executed now show the duration (length of time) the command will take. Because the LIFX device can be ramping up or down over a period of time, the plugin updates the status of the LIFX device every second. So if you dim say over 10 seconds from 100%, you will updates to the brightness at 90%, 80%, 70% and so on.

The plugin handles the situation where LIFX devices either can't be found or alternatively get switched off (probably by mistake). The LIFX device will be flagged as 'No Ack' and a discovery process will take place at the next polling event (defined in the plugin config). There is also a new action to just run discovery if you need to do it manually.

Because the plugin has been largely re-written, it will not be just a simple install over the old version - there was no easy way round this. The update procedure is not too bad though.

Over the next couple of days, I will update the documentation and then take requests to beta test it prior to a full release. Just want to double check it is all OK before general release. :)

Posted on
Tue Dec 06, 2016 3:52 pm
thatdamncat offline
Posts: 11
Joined: Jul 03, 2016

Re: Autolog LIFX Controller Discussion

Nice! This is sounding great, thank you!

Posted on
Wed Dec 07, 2016 4:03 am
manwithavan offline
User avatar
Posts: 76
Joined: Jan 14, 2014
Location: Melbourne Australia

Re: Autolog LIFX Controller Discussion

Sounds terrific! Keen to test the beta. :)


Sent from my iPhone using Tapatalk

Posted on
Thu Dec 15, 2016 5:42 pm
autolog offline
Posts: 3988
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Autolog LIFX Controller Discussion

I have now released the Indigo 7 version of my LIFX plugin (for those of you following this thread). :D

See the announcement here: LIFX Controller (V4) Information

OK - That's the marketing done - I'll await feedback and reports of any issues :wink:

Page 7 of 12 1 ... 4, 5, 6, 7, 8, 9, 10 ... 12

Who is online

Users browsing this forum: No registered users and 2 guests