LIFX Local Control

@rob thanks for adding this!

setting dimmer on the strip seems to override the color. Is this expected?

Edit. Weird it seems to be happening on lifx color also. Doing some direct tests with the multicolor device, setting any dimmer change does indeed change the color. I have tried to clear the color map but i must be doing something wrong.

Does this happen for you when setting the level directly on the device's page? I can't reproduce it here.

What happens to the RGB, hue and saturation values on the device's page when you do this?

i'm using the direct device itself not groups if that makes a diff.

it occurs with motion lighting app and when changing the device directly.

Custom color set via lifx app for strip:

change dimmer in device page (only dimmer set level) results in this:

sorry I could have made those screenshots smaller :slight_smile:

to be clear the strip is set via lifx with multi color i.e one of the create themes.

but changing the level makes the whole strip the one color. have you tried reproducing it with multi colors on the strip? @rob

Ah, pretty sure that can't work with multi colours at the moment, the SetLevel command currently has to update the HSBK values (Hue, Saturation, Brightness, Kelvin). To change the level with multi colours it would need to sent multiple HSBK values for each zone.

Ah right. So I should keep them as a group device for now ? Or same issue.

May need to go back to group of groups just for the strips

A group device is likely to have the same issue.

I'll see what I can do about fetching and updating the zones, pretty sure I can manage that.

The stumbling block I have with multizone devices is in creating some sort of UI to display and edit the zone colour maps (82 of them!).

Adjusting the level is relatively straightforward, although ideally I'd want to apply a delta value across all the zones rather than an absolute level.

Tiles are even worse, since each tile has 64 individual pixels.

yeah i can imagine. thanks so much for your work on this. I'll use group of groups just for my strips for now. easy enough

Hmmm, I wonder if I can instead do this by saving the current state, i.e. setting up the device in the app, and then retrieving the current state and storing it in the device's state? Or possibly in the master app's appState to make it easier to transfer states between different devices. Might need some form of run length encoding to reduce storage demands.

I'm just thinking out loud here of course :slight_smile:

1 Like

happy to test for you. Lifx group of groups Hub driver seems to break my motion lighting./make it not run all the time.

So I may run the strip lighting sep (it's part of other main groups) for now.

Hoping to get something sorted this weekend - spent good few hours today working on it, can now fetch the current state, and display it in much the same way as it is in the LIFX app

Along the way I found a few bugs, which is all to the good - I'm not 100% sure but I think that the runEvery1Minute method may possibly be cumulative ie if you call it a second time with the same handler then it may set up a second schedule. I've change the initialize() methods of all drivers to call unschedule() just in case.

There was a definite bug in the LIFX packet parsing when it came to parsing arrays.

I've also replace the RGB/HSV processing to use the built-in routines in hubitat.helpers.ColorUtils, which definitely seems to improve colour accuracy.

I need to do more coding, and a lot more testing, but things are looking promising for something to be released this weekend - fingers crossed.

My current thinking on adjusting dimmer levels is to take the current overall brightness level as a baseline - create a delta from that with the intended level and apply that delta to all the zones of beam/strip. Does that sound reasonable?

1 Like

i'm assuming lifx don't share how they do it?

I assume that they just use the normal API, although they may have some hidden, unsupported, means as well.

Do you have a donation page ? I'd love to say thanks as this local control has been great.

No donation page, at least not yet :slight_smile:

Hi Rob,

Just a quick update that this Monday 2 AM thing has not been resolved even though I tore the system down and rebuilt it with one light and one contact and Hubitat Simple Lighting. The error centers around that time every week. I would think that even if something was occurring somewhere else on my network, I would only log a couple of actual errors before it recovered...? I won't bother to show a screen capture of the log, it looks the same.

To answer your question, the Lifx Master App is still there after this error flood starts.

I understand that you are not seeing this same problem so that makes it difficult for you to troubleshoot. So, what action(s) could I take that might help us narrow it down more? I was thinking of transferring the hub to a different router I have in my house just to see if the router I am currently connected to is the cause. This router is used for all my home automation connected devices as well as my Roku.

Again, no crisis. I have a workaround plan that if I can't get this solved on Hubitat, I'll reenable my Smartthings hub for my Lifx connections.

It's very puzzling that's for sure.

I have no idea how the driver can lose the 'device' like that, unless that's not the issue.

You could add

logDebug "Device is $device"

as the first line of the poll() method in e.g. LIFX Color.groovy

At least then we'd know for sure whether that's what the error message is referring to.

So far this is working pretty well, I can now save the zone states by name and restore them by name as well, and can even specify an optional duration for the transition, which works really nicely

Still haven't got around to adjusting the brightness, but I can probably manage that. The tricky part is what happens when e.g. dimming below 0 or brightening above 100 - I would have to clamp the value to 0 and 100 respectively. That is likely to cause issues with some colours when trying to brighten after dimming or vice versa.

I won't worry about that for the moment though.

1 Like

Cool stuff ahead:

2 Likes

EDIT: for some reason i missed installing the plus driver - i have done so but it's still showing the below error. Do I have to resetup again? pushing discover devices will remove the lights from my automations thats all. I don't use groups as the state is not passed through where as it is if i use the device itself.

All good will set up again it doesn't take long.

I'm assuming Lifx plus color will just work with the standard Color driver?

  • getting error: (No driver installed for LIFXPlus Color)

not sure how to change the driver - it doesn't appear in my list of devices but has that error in the lifx master app @rob
thank you

And you definitely have the LIFXPlus Color driver showing under Drivers code?

You can always use the "Discover only new devices" button to find the LIFX Plus ones