LIFX Local Control

Hehe I did say I’m dumb :wink:

By the way, thanks for the above - I really didn’t know we had that level of control in custom commands - hehe my eyes have been opened and it should solve a problem I’ve been seeing for a few days in a new garden Hue light where I can’t set hue and saturation to get the exact colour I want (PS, if your looking for outdoor flood lights, don’t go for Hues new light; they just aren’t very bright)

1 Like

That's a helpful scenario - and very familiar from my day job :smiley:
I'll see what I can do.

1 Like

New version 0.9.2-alpha which should address most of the issues listed above.

  • Only apply power level change if different from the current state
  • Discovery is now faster, and displays a progress percentage rather than "pass n of m"
  • Setting colour temperature on day and dusk devices works again
  • Dropped HealthCheck capability (ie Ping) since there was no corresponding method!
  • Power on and off now utilise the defaultTransition time if there is one - should restore to previous brightness/hue/saturation/temperature correctly
  • Discovery now uses a queue of ipAddresses to check and runInMillis to process it, rather than a simple loop with pauseExecution - in theory this should make it behave as a better citizen.

Oh, sorry, I forgot to add that this time you'll need to update all device drivers as well as the app


When the app needs to be updated, do we need to re-run the discovery process? Or can we just overwrite the code and carry on?

Generally speaking, that shouldn't be necessary. If it is then I'll definitely mention it.

@rob, please include the link to the Raw Code for your drivers and apps in the header. This way we could just do an Import and paste the location. Easy Peazy.

Edit: See example here:

1 Like

I had intended to start a new thread somewhere with those once it goes to beta with the links. Perhaps I should do it this weekend. I'd also like to add App Watchdog support so you'd be notified when anything was updated.

1 Like

Thanks for fixing the DD driver. Any chance of adding a transition time value for color temperature? The current one says "set color time", but I think it really means level.

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


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:


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


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.

Download the Hubitat app