LIFX Local Control

I wish I could, but the parameters are fixed by the capability as far as I know.

The defaultTransition should apply to colour temperature. Or you can use SetState. I suppose I could add more preference settings for different transitions, but I'm a little reluctant to do that.

I see. I am not seeing defaultTransition being applied to color temperature on the D&D bulbs. Only level.

So far it's not exactly a harmonious combination with the Circadian Rhythm app due to the status updates. The CR app adjusts the CT as soon as it receives notice the bulbs are on, which in this case doesn't happen for many seconds. I think the Circadian app might need some modification to accommodate.

Okay, I'll take a look

1 Like

Yay!

My buttons work like this:
Button 1 Push = Toggle on/off
Button 2 Double-tap = Fade to 4500K and 100% brightness (This is my "bright lights" setting)
Button 2 Long-push = Fade to 2500K and 60% brightness (This is my "comfortable/TV lights" setting)

This works really well, and the only tweak I've made was to add a command at the end of my "off" trigger to set the lights to 2500K and 10% brightness (without power:on in the setState map). This way anytime I turn the lights on it first dims on to that level low easy-on-the-eyes setting and then dims from there to whichever of the two settings I requested with the button (bright or comfy)

EDIT: LOL! I just realized that by adding that extra setting after triggering off, I completely negated the whole toggle off and back on to the previous setting behavior I wanted! :joy::rofl:

@rob Thank you SO MUCH. Your work is amazing. Please let me know if I can help out in any way in the future.

1 Like

I've rolled back that dumb act of mine. :wink:

2 Likes

I'm hoping I've fixed the transition issue now

Links:

1 Like

Any further updates will have to wait for tomorrow :slight_smile:

Oh, and you may need to save your preferences for each device for default transitions to work. You should see a new state variable called transitionTime that contains the value you chose.

Thanks, it was missing the https at the beginning for some reason - I've fixed it now

@rob, just out of curiosity, which transition issue were you referring to?

The one reported in LIFX Local Control

It was working fine for me, or at least I thought it was. I was directly using the preferences setting for defaultTransition in some commands, but that seemed to stop working, so I'm now saving the value in the device's state.

Gotcha. Thanks.

Hmm... Now it's not utilizing the transition
time value for color temperature or level. Same behavior in the Color driver.

I'm able to manually change the values within the driver code and get it to work, but setting them via the preferences doesn't stick.

Do you see the transitionTime variable in the state? Note, not colorTransitionTime

If you don't try changing the value in preferences then saving again.

Both are there. The transitionTime variable changes with setting the preferences, and the colortransitionTime doesn't change. Unfortunately the reported state is not reflected in the bulb, which appears to stay at the default 0.0 time.

It doesn't use the default transition time for SetLevel in any driver because it's using the one from the SetLevel command. But it's definitely using it for SetColorTemperature on the LIFX Color driver for me, but not, as you say, for the Day and Dusk driver.

This is very puzzling

Wait, I see what's happening. transitionTime is actually referring to the on/off time, not the duration it takes to change from level-to-level or color-to-color.

Nope, that's not it - there's a stray reference to colorTransitionTime in the Day to Dusk driver after the commented out block - if you change that to state.transitionTime. I probably missed it because of that commented code.

Let me know if that fixes it for you and I'll update the code in github tomorrow

Yep, that's it. Had to check the capitalization too. Let me buy you a beer, Rob...

2 Likes

I am watching this thread with interest and am massively impressed with how fast @rob has refined this set of apps / drivers.

Currently I'm using the latest version in conjunction with some scene setting wall switches for bedside lights - where this works really well. For the rest of the house I'm still using the HTTP driver so that groups turn on and off in sync.

@rob Is that something that may be solve-able on the roadmap at some point?

edit: I checked out how these guys do it: (GitHub - mclarkk/lifxlan: Python library for accessing LIFX devices locally using the official LIFX LAN protocol.) - it seems they use multithreaded commands for groups.. is that even possible on Hubitat?