LIFX Local Control

Thanks!
I am on hub version 2.2.9.129

I've tried your pull request and it does indeed fix the error. However, I still can't get it to set a level. It seems like any setLevel commands I issue act as a simple switch on/off. If I set level to 0, it switches off. Any other level above 0 it switches on. But it doesn't actually set the brightness/dimming level. On top of that, if I use a transition time, it does nothing.

For reference, this is what I get in the logs if I try to set the level to 50 with a duration of 5 seconds:

2021-10-09 10:51:21.464 pm debugSending buffer [42, 0, 0, 52, 68, 76, 69, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 0, 0, 0, 255, 255, 64, 75, 76, 0]
2021-10-09 10:51:21.419 pm debugSending buffer [188, 2, 0, 52, 68, 76, 69, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254, 1, 0, 0, 136, 19, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]`
2021-10-09 10:51:21.311 pm debugSending [colors:[:], index:0, apply:1, duration:5000, colors_count:null, zone_count:null]

Hmm, seeing that the zone_count is null, it seems that the multizone polling has not successfully saved the state yet - so we don't know how many zones to set. I need to go back and review the LAN protocol to see what better options there may be, but this will impact any command you try to send, whether hue, saturation, brightness, or kelvin.

1 Like

Thanks for your help. Seeing your reply made me rhink maybe the device was not configured properly after the initial discovery.
I tried removing and resetting the device and starting over. The multizone state would still not be set, but then tried clicking “initialize” in the device page in Hubitat and that seemed to set the multizone state.
All commands are working now.

Not sure if there is a more robust way to handle the initial multizone polling, but wanted to report back that everything is working for me now.

Thanks again!

I'm getting this error for my multizone light strip when trying to set it. Is this the same error being discussed above?

Looks a bit different... can't put my finger on it just now, will dig around the code a bit and try to make sense of it. Can you confirm the version of the App/Driver's you are using when the issue is reproduced?

FYI...The built in Lifx integration is now available in the latest version. Check out the release notes here:

4 Likes

Just curious - can anyone share some insight on how the new built-in differs from @rob's integration? Additional capabilities, better performance?

Holy frijole!

1 Like

yeah would like to know the difference. rob's works great.

@rob has been part of our beta group and he may be able to explain better the difference, next time he is around.

3 Likes

It's definitely a lot faster than mine, with far less popcorning.

And that's with the LIFX integration running on my dev hub, using Hub Mesh to access the devices on my main hub, so it's likely that with everything on the one hub it'll be even faster.

4 Likes

What is the process of switching to the integrated driver?

It's relatively straightforward, you can keep both running as you go - discovery is very quick (and automatic) on the integrated driver - I haven't tried discovery with the latest version - hopefully it's a little simpler now, e.g. providing the correct name for each LIFX device automatically. If you followed my original advice and created a group for each device then it's even more straightforward and you should only need to change the device that the group is pointing to and all your automations should work fairly seamlessly.

I would recommend deleting each original device as soon as all references to it are gone otherwise polling may cause issues.

4 Likes

Also the entire LIFX Lan Protocol was implemented in classes.. So it fully supports community drivers to tap into more advanced features.. I'm looking forward to what the community devs will come up with..

5 Likes

thankyou so much all! i have 80 lifx lights so need to dedicate some time ha

2 Likes

Just did it.

  • I first installed the new app and discovered my bulbs.
  • I added them with the same name as before, but with a "2" at the end.
  • I then went in any automation that referred to them, unchecked the old name, and checked the new name.
  • I removed the old app.
  • Went into Hubitat Package Manager and uninstalled the old app and drivers.
  • Finally I renamed the new devices removing the trailing "2".
2 Likes

noticing a big diff ? i'm excited to lose popcorn

1 Like

Just did it a few minutes before posting so have not done much but confirm they work. I do see much lower usage in the logs for both app and device.

2 Likes

I wonder if it still gets the UDP Socket error. Though I have not updated Rob's app in quite a few months so that might've been fixed anyway.

1 Like

No UDP socket error here.. It's all handled inside the hub not the app, the app is just there for UI. It's a server socket that stays open as long as the app is installed, and automatically starts up when the hub boots..

Download the Hubitat app