LIFX Local Control

@nigelmwilliams7 @larsplougmann testing complete on my end for the support of the original MZ packets (supporting MZ devices with firmware <2.77) - please take it for a spin and let me know if you run into any issues: MZ original protocol by dkilgore90 · Pull Request #89 · robheyes/lifxcode · GitHub

Both the MZ Driver and LIFX Master App are updated

NOTE: I believe you will need to manually trigger initialize() after updating the driver - embedded in this is the GET_FIRMWARE call that tells the driver that it needs to use the original MZ packets.

1 Like

I have a similar problem as @el.iancampbell. I keep getting the "No driver installed for null" error on discovery but only with recently added Lifx BR30+ Bulbs (firmware v3.60). Brand new bulbs.

I installed the Color+ driver , the bulbs are found by the Lifx Master app but can't be added because of this error.

Is there something I'm missing ? All other bulbs (A19, ZStrips) have been working with Rob's app for over a year without issues.

Thank-you

Probably another case of a newer HW version which isn't in the code: I'm guessing 65.

At line 1648 in the Master App, add a line case 65: - this would follow the case 46: line, and precede the corresponding device definition

PR containing this change (plus a couple additional new device IDs): add new device types (excluding candle color) by dkilgore90 · Pull Request #90 · robheyes/lifxcode · GitHub

It worked ! Thank-you @dkilgore90

Merged this and the previous 2 pull requests

I'd this part of the hubitat package manager? If not could it be?

I'm not sure I understand what you mean.

Later...
I must have missed the Hubitat Package Manager notice (not really been keeping up with the forums as much lately). I can certainly take a look, although anyone else is more than welcome add support for it.

2 Likes

@rob

Thanks for the LIFX device handler. I just moved over from SmartThings.
I found this driver is actually faster than the ST implementation. but there are a few issues with LIFXWhiteMono driver.

  1. It doees not have refresh capability, so sometimes, it is not reflecting the correct states.
    proposed change - add
    capability "Refresh"
    add below line to "def refresh()"
    def refresh() {
    poll()
    }
  2. setLevel didn't use transition time
    in def setLevel(level, duration = 0)
    change to
    def setLevel( level ) {
    sendActions parent.deviceSetLevel(device, level as Number, getUseActivityLog(), state.transitionTime ?: 0)
    runInMillis( ( 1000 * state.transitionTime ).intValue(), "refresh" )//this is important, otherwise the state is not updated.

....
}

Any luck with popcorning?

In spite of the pandemic I've not had time to work on it much I'm afraid - too many jobs around the house took priority. I have started on a possible solution, but it does require a fairly big change to the code and also requires a lot of thought. I'm sure I'll get around to it sometime though.

I have an if this then that trigger that sets the scene color of all my lifx at morning and at night. It uses the LIFX scene action in ifttt.

I'm finding the scene sitting in the lifx app to be a little buggy.

has anyone used the habitat scenes to set their LIFX colors at different times? How does it work for you?

I tried it about a year ago and found that I couldn't get it to work due to driver limitations or error on my part I'm not sure.

Thanks for this.
I have updated the Master App and the Multizone device.
I have Initialize'd the Multizone device

Now i seem to have an unrelated issue.
the multizone is not working and when I try and click on the link to the device in the list of devices in the Master App discovery I get this -


And when I track behaviour in Logs, I see this -

How can I re-create the Multizone device please?

Hmm - seems like the parent/child relationship got broken between the device and app... Only way I can think of to fix would be to find the device in your devices list, delete it, then re-discover via the Master app. Any rules or other integrations using the old device will need to be updated to point to the new device.

Before you do that, I'd double-check that you didn't accidentally introduce some typos in those code lines, and try updating to the latest HE platform update - they released another hot-fix version this afternoon. Hopefully that will sort it out.

Hi
Thanks for this.
I have tried this approach and I still get the same Error, as you say the Parent/Child is broken.
CAn you detail the process of 're-discover via the Master app' please?
I can see the LIFX Multizone device but how is the device then re-created?

Open the LIFX Master app (under Apps), click on Discover devices then under the list of devices there's a button called Discover only new devices

The only way that I know for the parent/child relationship to be broken is when you don't save the LIFX Master app before you try the discovery.

Hi,
I am seeing some strange behavior, wondering if its just me. This is tested using both Lifx Day/dusk bulbs and the color downlights.

I have a button (lets call it button1). On press it toggles a light on to level 25 and color temperature to 3500k.
The bulb turns on, but it first spikes up to level 100 (in turns of brightness, it looks like level 100, but on my dashboard i noticed on power on, the level goes to 0 at the time when the bulb flashes to 100, and then the level goes to 25 as the bul dims) before fading down to 25 over half a second or so.

I use this setup in my bedroom, so it results in a blinding flash of 100% output, 3500k light for a split second, before dimming to level 25 and the color changing, when i get up at 3am...

Is there no way to set the level, and or color before powering on the light?

If the light is in an off state (Hubitat shows the old level value, 100), then maybe the level should be reduced to zero (or 1) when a power off command is sent. This would solve the level change on startup. And I suspect this is what LIFX are doing in their app (as this behavior mentioned above is not seen when using the lifx app, with scenes).

Possibly there is something in the code that on power on, it first sends a 100 level, light on command, then quickly behind it another packet for actually setting the parameters provided?

Reason i post this in this thread is i have some Ikea zigbee bulbs connected via hue hub.
So i tried the same rules on these bulbs.
The Ikea bulbs do not show the same issue.

Possibly the issue here is delay when talking to the LIFX bulbs? Maybe the Ikea bulbs are working the same way, but commands are much quicker, so its barely/not perceptible.
So I only see this with my LIFX bulbs.
Ping wise, I see 0-4ms to the bulb.

I can think of a workaround:
Replace all my rules. Remove "Toggle" commands, instead use faders to turn lights off (possibly on as well). So fade level to 1 (cant fade to zero, thats considered a power off, so Hubitat keeps the light level at what it was previously, IE 100), then power off. That way any further turn on commands will start at minimum power level. Probably need to use a conditional action set for this. Will make all rules much more intensive to process i guess.

Open to other suggestions as well.

-edit-
When i turn the bulbs on via dashboard link, the bulbs do not "blink" to 100 level, they work as expected.
When i use "Toggle dimmer level" in rule machine, the light works as expected, no blink to level 100 before dimming to 25.
When I use "Toggle color temperature and level" it blinks to 100 before fading. To be even more obvious, if you use "Set color temperature and level", turn it on once, then press it again, the light flashes to 100% for every press.
When I setup a scene ( Master Bedsides: on, level 25, color temperature 1500), the lights blink to 100 during startup.
When the bulbs were previously on, and no changes are made to color temperature or level, turning the bulbs on/off works fine. But as soon as you change either level, or color temperature, the next time you hit the button, the bulb flashes to 100 then down to 25.

Cheers.

@whzzz28 can you share the rules you are running? I suspect your problem comes in a set of commands that sends multiple packets, rather than a single packet setting all of your desired attributes. I'll take a review through the code as well to see if we are doing extra unnecessary steps.

This is the scene I am using:
Master Bedsides: on, level 25, color temperature 1500

And here are two rules. First one activates the scene. Second one is basically the same, but not using scenes. Both result in the same blink to 100 on turn on.

hub1 hub2

I don't know what caused the improvement, but things are now running smoothly and swiftly. Maybe it was a Hubitat performance upgrade, maybe a LIFX firmware upgrade.. don't know. Popcorning is not an issue any more. What could previously take ten or more seconds for multi-light scenes now happens in about 1.5 seconds. The speed makes the difference of having to explain to guests why it looks odd when the lights turn on and guests just thinking it looks cool. Big thanks to the developers, @rob and @dkilgore90.

1 Like

Only thing im finding is the lifx app itself scenes Is not stable it seems to uncheck the lights that the scene is meant to apply to very strange. I want to take the time to migrate that feature to habitat as well. I'm pretty sure I can do it with the recent updates to multi colour zone strips eccetera