Lifx support out of the box

It's getting there, slowly - it's mostly a matter of finding time to work on it.

I have today off work, so I'll be trying to get more done on it.

First version will work with colour bulbs since that's mostly what I've got at the moment. I should probably get at least one Mini White and Mini Dawn to Dusk.

I think the Tile will be the trickiest one to work with, really not looking forward to that one.

@rob ouch, that must be hard when you haven got the item.
Peronsally I have a lot of the A19 bulbs and 1 A19+ (only got that one as it was cheaper than the A19 at the time; I don’t use the night ability on it). If you need someone else to help with your testing then I’m more than happy to help (I’m also working from home today if that helps at all)

Progress report

I now have the app and special discovery device working nicely and successfully scanning the network for devices - UDP is such a pain. Can still only turn devices on and off, but it's all coming together. Won't be the end of the month I don't suppose, but not too long now.

Ordered a Mini White and Mini Day & Dusk, which should arrive tomorrow.

5 Likes

Further progress - I've mostly got setting colour from a map, hue, saturation and level working. Some minor issues, most of which will be sorted by polling for the current values just prior to setting the new ones (LIFX doesn't let you set hue, saturation, brightness and/or colour temperature individually - you have to provide all 4 each time, which is a little irritating).

I also need to add regular polling to keep track of any settings that are changed outside of Hubitat.

After that it's waveform support and exposing some of the settings to the UI and LIFX Color support will be done. Then all I have to do is add drivers for the other types of device.

Still not sure when I'll be able to do this, but I think I may be hard at work this weekend. Who knows, there may even be a beta out soon!

5 Likes

Awesome! Can't wait to see the driver. I love Lifx but it's painful with the group driver.

@rob got a git repo I can check out? I haven't had time to look into it so I'd love to see how you are doing it.

Heading in to work soon, I'll probably make the repo public over the weekend

1 Like

Hey @rob. Any luck popping a public report up?

It's been a bit of a strange day, did a lot of rework, and was getting very variable results when it came to discovering devices, even with 6 passes it was occasionally only finding maybe half of them - although I have added a new wireless device to my network today, perhaps that is the issue. It seems to have settled down now.

I'm still trying to make discovery more reliable. Currently it deletes all devices when discovering, I may make another button that only looks for new devices tomorrow, possibly also checking that previously known devices are responding.

I'm wondering whether I can make a generic driver for all bulbs. I think they should mostly be compatible, I really don't want to copy and paste code, the only snag is that the capabilities are different, not sure if they can be defined dynamically per device or not.

1 Like

Or did you mean repo?

Does this show up? https://github.com/robheyes/lifxcode.git

It's not really ready yet, and probably has bugs that I've not found

1 Like

It does show. Well done on this! Sounds like is been a real mare to get going.
I might give it an install and see how it goes and report back if I find anything - I guess the more people that can install it the better for bug fixes

This isn't quite my latest version - I've not pushed the latest changes yet.

Let me know whether the instructions are any good as well.

1 Like

I like the instructions. They are very clear and easy to follow.

All installed ok. I’ve run the discovery and found some bulbs which seem to be working well so far.
My only suggestion would be when you start discovery - update the app screen to show discovery in progress and how many devices have been found (I pressed discovery button a few times as I thought I hadn’t actually pressed the button - I’m doing it from iPhone).

Looking at the logs I’m getting the following error:


app:8372019-02-03 03:18:26.211 amerrorcom.hubitat.app.exception.UnknownDeviceTypeException: Device type 'LIFXPlus Color' in namespace 'robheyes' not found on line 175 (updateDeviceDefinition)

Looks like you need to install the LifxPlus Color driver.

1 Like

Yeah, except there isn't one yet - you could probably fake it by installing another copy of the LIFX Color driver but changing the definition{} section to say LIFXPlus Color, as long as you don't need the infrared

1 Like

In my latest, uncommitted, code that's now a warning.

Not 100% sure how to update the app's display, still very unsure about large chunks of the ecosystem for apps and drivers, I'm guessing a combination of sendEvent and subscribe will do it somehow.

1 Like

@rob I’ve just done a google and found something on the LIFX site that might help for this bulb to add the capability? Let me have a play and see if I can do anything with your core driver and additional features from this:

ST-Better-LIFX-BULB/better-lifx-bulb-plus.groovy at master · ericvitale/ST-Better-LIFX-BULB · GitHub

Fyi
That driver uses the web API instead of the Local API.
The author and the code are "essentially" the same as the Lifx Group of Groups driver that I ported over and does not have the benefits of local communication.

1 Like

Thanks @stephack. I was more looking to grab the infra red feature from the Plus bulb with this driver and add it to robs driver (not that I need infra red but it would be nice to help complete that bulb type of possible)

1 Like

@rob - any chance of getting the latest version? That way I can try adding colour plus into the newer one.

Issues I’ve found so far in case your interested:

  1. When adding the bulb as a bulb or dimmer to a dashboard you can’t control the bulb and the icon shows a bit funny (in the pic below the bulb is called Master Bedroom Light).
  2. From Motion Lighting you cant control the bulb when using the following Lights To Turn On option (logs for ML show its sent the command to the device) :
    A. Set colour temperature per mode
    B. Set dimmer per mode
    C. Colour per mode
    It does however work for turn on switches per mode (and also for off command works too with this option)

Following pics are logs from Motion Lighting rule (ML), device log itself, and LIFX Master app: