Autolog LIFX Controller Discussion

Posted on
Sat Dec 17, 2016 9:29 am
colinpartridge offline
Posts: 356
Joined: Jan 13, 2014
Location: London, UK

Re: Autolog LIFX Controller Discussion

Apologies if this is the wrong place but any thoughts on how I would go about creating a colour sequence, similar to colour cycle in the Lifx ios app?

Colin

Posted on
Sat Dec 17, 2016 4:55 pm
autolog offline
Posts: 3404
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Autolog LIFX Controller Discussion

Hi Colin,
colinpartridge wrote:
Apologies if this is the wrong place but any thoughts on how I would go about creating a colour sequence, similar to colour cycle in the Lifx ios app?

Definitely not the wrong place. :D

I haven't explored these options but have just taken a look at it. I think it would be quite difficult for a user to do from the plugin as it stands at the moment.

Are you using it on just one lamp or on a group of lamps?

My next task when I get back to the LIFX plugin is to add in Groups processing. Once this is in then it should make controlling a group of lamps a lot easier.

For the colour Cycle, I think there would need to be specific processing put into the plugin. Now that I have restructured the plugin to use the lifxlan library it is definitely doable.

I'll add it to the list :)

Posted on
Sat Dec 17, 2016 6:02 pm
colinpartridge offline
Posts: 356
Joined: Jan 13, 2014
Location: London, UK

Re: Autolog LIFX Controller Discussion

autolog wrote:
Hi Colin,
colinpartridge wrote:
Apologies if this is the wrong place but any thoughts on how I would go about creating a colour sequence, similar to colour cycle in the Lifx ios app?

Definitely not the wrong place. :D

I haven't explored these options but have just taken a look at it. I think it would be quite difficult for a user to do from the plugin as it stands at the moment.

Are you using it on just one lamp or on a group of lamps?

My next task when I get back to the LIFX plugin is to add in Groups processing. Once this is in then it should make controlling a group of lamps a lot easier.

For the colour Cycle, I think there would need to be specific processing put into the plugin. Now that I have restructured the plugin to use the lifxlan library it is definitely doable.

I'll add it to the list :)

Just the one lamp, currently doing christmas porch duties..would like to not have to rely on the IOS app for colour changing effects.

Colin

Posted on
Sun Dec 18, 2016 10:35 am
autolog offline
Posts: 3404
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Autolog LIFX Controller Discussion

Hi Colin,
Thinking about it, it is possible to do something but not as simple as the iOS App (yet :wink: ).

You can set-up an Action Group using a series of Set Color / White (Standard and Waveform) commands.

The first action (Standard) is to turn on the lamp and set its starting colour (e.g. red).
The next action (e.g. delayed by 2 seconds) is to set up an action (Waveform).
In this action choose your second colour (e.g. Magenta) and set up a period of '30000' = 30 seconds and a cycle of 10 (which gives 5 minutes).
Set the waveform to Sine which gives smooth transitions.
Save and run the action group and your light will change between the two colours for 5 minutes.

You can now setup another action with a delay of 5 minutes and 2 seconds to set another base colour (e.g. magenta)
and then duplicate the existing waveform action and set its colour to e.g. blue and save with a delay of 5 minutes and 4 seconds.

The delays are important on the Waveform command to make sure that the Standard command has set the starting colour before the Waveform command executes

So you now have a sequence that will run for 10 minutes.
You can then setup a schedule to execute the action every 10 minutes and you are good to go.

Obviously you can play around with the colours, cycle time and delays to get the desired effect.

As long as you set a duration of say 2 seconds on the Standard action then it should all appear to be seamless - just tested it out and it appears to work :)

Not quite as good as the iOS effect but possibly a useful stopgap until I can do something better in the plugin. :)

Posted on
Mon Dec 19, 2016 5:36 pm
Nidocamen offline
Posts: 32
Joined: Oct 18, 2011

Re: Autolog LIFX Controller Discussion

That's great news! I haven't yet upgraded to 7 yet but hopefully soon.

Were you able to test with any of the new LIFX products? I can report that the LIFX Z strips work with the existing version of the plugin with no problem. I haven't tested the other + products yet.

If I have some custom Python scripting setup with the existing plugin, will the same commands work with the new plugin on Indigo 7? Or is there new code to implement?

Thanks!

autolog wrote:
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:

Posted on
Mon Dec 19, 2016 5:51 pm
colinpartridge offline
Posts: 356
Joined: Jan 13, 2014
Location: London, UK

Re: Autolog LIFX Controller Discussion

autolog wrote:
Hi Colin,
Thinking about it, it is possible to do something but not as simple as the iOS App (yet :wink: ).

You can set-up an Action Group using a series of Set Color / White (Standard and Waveform) commands.

The first action (Standard) is to turn on the lamp and set its starting colour (e.g. red).
The next action (e.g. delayed by 2 seconds) is to set up an action (Waveform).
In this action choose your second colour (e.g. Magenta) and set up a period of '30000' = 30 seconds and a cycle of 10 (which gives 5 minutes).
Set the waveform to Sine which gives smooth transitions.
Save and run the action group and your light will change between the two colours for 5 minutes.

You can now setup another action with a delay of 5 minutes and 2 seconds to set another base colour (e.g. magenta)
and then duplicate the existing waveform action and set its colour to e.g. blue and save with a delay of 5 minutes and 4 seconds.

The delays are important on the Waveform command to make sure that the Standard command has set the starting colour before the Waveform command executes

So you now have a sequence that will run for 10 minutes.
You can then setup a schedule to execute the action every 10 minutes and you are good to go.

Obviously you can play around with the colours, cycle time and delays to get the desired effect.

As long as you set a duration of say 2 seconds on the Standard action then it should all appear to be seamless - just tested it out and it appears to work :)

Not quite as good as the iOS effect but possibly a useful stopgap until I can do something better in the plugin. :)


Thanks for the idea, will try it out.

Colin

Posted on
Mon Dec 19, 2016 6:20 pm
manwithavan offline
User avatar
Posts: 76
Joined: Jan 14, 2014
Location: Melbourne Australia

Re: Autolog LIFX Controller Discussion

New plugin has been working mostly great, thanks. Just getting a logging event at every polling interval:

20 Dec 2016, 11:03:53 am
LIFX LIFX Device 'G Table Lamp' re-connected at 203.219.105.XXX [d0:73:d5:10:85:49] using Port 56700
LIFX LIFX Device 'G Table Lamp' started.
LIFX LIFX Device 'L Tall LIFX' re-connected at 203.219.105.XXX [d0:73:d5:10:7b:49] using Port 56700
LIFX LIFX Device 'L Tall LIFX' started.


It's only these two of the fourteen LIFX devices that log this 're-connection', sometimes only one will log it in each polling period, sometimes multiple it'll happen multiple times in each polling period.

Any suggestions?

Posted on
Tue Dec 20, 2016 7:21 am
autolog offline
Posts: 3404
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Autolog LIFX Controller Discussion

manwithavan wrote:
... It's only these two of the fourteen LIFX devices that log this 're-connection', sometimes only one will log it in each polling period, sometimes multiple it'll happen multiple times in each polling period. ...

You should only be getting this message if contact has been lost with your lamp and it has gone 'no ack' (No Acknowledgement) and then been re-discovered.

Assuming this isn't a bug, then it means that these two lamps are having communication problems but recovering from them.

Are you also getting communication failure messages in the log e.g. Communication lost with "L Tall LIFX" - status set to 'No Acknowledgment' (no ack) ?
If not then it is possible the plugin has detected that they have gone 'no ack', issued a discovery and then immediately re-connected to them.

I could add in a plugin config option to be able to choose to suppress the re-connection messages?

What is your polling interval set to and what is the max polls missed limit set to?

You can check the custom state wifiSignal to compare that between lamps to see if these two have a weaker signal. Note, that at the moment these figures aren't refreshed and are as-at the plugin start (so reload plugin to get latest figures). I will add in a refresh option in the not to distant future.

btw - I am impressed that you have 14 LIFX bulbs! What models are they? :)

Posted on
Wed Jan 04, 2017 7:58 pm
manwithavan offline
User avatar
Posts: 76
Joined: Jan 14, 2014
Location: Melbourne Australia

Re: Autolog LIFX Controller Discussion

Thanks for the troubleshooting, but of course it all just magically fixed itself a couple of days later. :roll:
Loving the plugin. :D

Posted on
Sat Jan 28, 2017 12:07 am
karlg offline
Posts: 9
Joined: Nov 10, 2010

Re: Autolog LIFX Controller Discussion

Problem Updating from v3 to v4

I tried to update the plugin from v 3 to 4, and the lights aren't recognised by the plugin. If I ask the plugin to reload I get the following in the log:

Any ideas on how to fix it?

Thanks!
Karl


LIFX Autolog 'LIFX V4 Controller' Plugin shutdown requested
LIFX Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 510, in runConcurrentThread
AttributeError: 'str' object has no attribute 'put'

LIFX Stopping 'Lx Hall'
LIFX Autolog 'LIFX V4 Controller' Plugin shutdown complete
Stopped plugin "LIFX 4.0.4"
Starting plugin "LIFX 4.0.4" (pid 72365)
LIFX Autolog 'LIFX V4 Controller' initializing . . .
LIFX Warning Monitoring enabled for LIFX: Send & Receive
LIFX Warning Debugging enabled for LIFX: General
Started plugin "LIFX 4.0.4"
LIFX Discovering LIFX devices on network . . .
LIFX 'Lx Hall' discovered at 192.168.191.9 [d0:73:d5:01:09:16] using Port 56700
LIFX Error Error in plugin execution startup:

Traceback (most recent call last):
File "plugin.py", line 194, in startup
ValueError: NameNotUniqueError

LIFX Starting 'Lx Hall' . . .
Error updateStateOnServer() caught exception: LowLevelBadParameterError -- invalid color level key whiteTemperature for device Lx Hall
Error updateStateOnServer() caught exception: LowLevelBadParameterError -- invalid color level key whiteLevel for device Lx Hall
LIFX . . . Unable to connect to 'Lx Hall' as no corresponding LIFX device discovered on the network.
LIFX Error deviceStartComm: StandardError detected for 'Lx Hall' at line '691' = 'str' object has no attribute 'put'
LIFX Autolog 'LIFX V4 Controller' checking for Plugin update
LIFX Checking for updates...
LIFX No updates are available
LIFX Autolog 'LIFX V4 Controller' next update check scheduled for: Sunday, 2017-Jan-29 at 17:03

Posted on
Sat Jan 28, 2017 1:17 am
autolog offline
Posts: 3404
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Autolog LIFX Controller Discussion

I suspect you haven't read and actioned the Pre-Installation steps documented in the README document. :wink:

If you follow the Pre-Installation procedure, it should resolve your problem. :)

If you are still getting problems, report back and I will try to help :)

Posted on
Mon Jan 30, 2017 5:26 pm
karlg offline
Posts: 9
Joined: Nov 10, 2010

Re: Autolog LIFX Controller Discussion

Hi Jon,

Thanks for the incredibly fast response!

Yes, you were 100% right. I went back to the manual and re-started the process. Now all works!

Thanks!

Karl

Posted on
Thu Feb 16, 2017 7:45 am
autolog offline
Posts: 3404
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Autolog LIFX Controller Discussion

For those following this thread - Version 4.0.5 has been uploaded to Github - See link in announcement post. It fixes an error with not enough parameters being passed to info message when setting brightness value. :)

Posted on
Sun Mar 12, 2017 5:57 pm
Nidocamen offline
Posts: 32
Joined: Oct 18, 2011

Re: Autolog LIFX Controller Discussion

Hello again,

So I'm using this code with the v3.5.1 of the plugin - to script the control of white and color.

lightLIFX.executeAction("setColorWhite", indigo.devices[targetLight].id, props={"mode":"color", "messageType":"standard", "hue":myDegree, "brightness":desiredBrightness, "duration":myRate})

I'm aware, through testing, that the brightness parameter seems to control both brightness and saturation in "color" mode: brightness 1-50% are at full saturation and above 50% saturation decreases. I need to be able to control saturation independently of brightness, as I have to do some color-temp matching with existing LED lighting in a room and the Kelvin options just don't get me close enough.

For example, I need to be able to set the hue to 38 and saturation to 5 (or as low as possible). 38 is the "degree" that I adjust the color wheel to on the LIFX app (with the saturation slider at its lowest). And when I look at the Custom States in Indigo after setting the hue and saturation via the app, it shows saturation at 5. Also, the Custom States shows a hue of 11, which is weird since the hue in the LIFX app is technically set to 38. Also, even with brightness set at 100 via your plugin, the saturation will only go as low as 20 when viewed in Custom States (and visually via the app and the lights). The LIFX bulbs now support a very low saturation, which appears to be 5 (or at least the iOS app does).

I tried adding a "saturation" parameter to the above code but it doesn't affect the control of the light.

I found in the code of your plugin that there used to be an artificial limit of 20% minimum saturation, according to this post from 2015: https://github.com/LIFX/lifx-protocol-docs/issues/4 I tried to modify the plugin to reduce the 20% to 5% but it doesn't seem to do anything, it's the section that starts on line 2516. Anyways, I know you're probably not working on the old version of the plugin anymore, but if you could let me know what I could do to solve this issue, that would be great - either by lifting the 5% limit or being able to control brightness and saturation separately, just like the app does.

Thank you!

--Joe
Attachments
IMG_9007.JPG
Minimum saturation (5%) at full brightness
IMG_9007.JPG (63.61 KiB) Viewed 1693 times
IMG_9006.JPG
Minimum saturation (5%) at 58% brightness
IMG_9006.JPG (63.47 KiB) Viewed 1693 times

Posted on
Mon Mar 13, 2017 4:28 am
autolog offline
Posts: 3404
Joined: Sep 10, 2013
Location: West Sussex, UK [GMT aka UTC]

Re: Autolog LIFX Controller Discussion

Hi Joe,
I haven't really got time to delve into the code of the previous version. :(

There were a number of problems with the previous code; especially after LIFX changed the way their iOS App worked (allowing the user to change saturation). That is why in my LIFX 4.x versions I changed to using the LIFXLAN library. I have just tested your settings with the new version of the plugin and it appears to work OK.

I assume you haven't upgraded to Indigo 7? If you have, then I recommend that you upgrade to version 4 of the plugin which I am supporting. :)

Sorry to not be able to help but it would take too much time to sort it out. :|

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

Who is online

Users browsing this forum: No registered users and 2 guests