[OBSOLETE] LIFX Groups

Adam, thank you for this handler. I’ve always been a bit annoyed by ST’s handling of grouping lights. So far appears to be working great. One request, if it’s possible. Is there a way to have your handler or even the “Lifx Connect” poll the status of the bulbs after an interval? If I turn on or off my lights using anything but smartthings it never refreshes in ST. Really annoying, especially when using SmartTiles.

@stephack - I haven’t seen @AdamV post on this thread in a while. I created a new device handler called LIFX groups of groups. It allows you to do a single group or multiple groups. It also doesn’t require you to know the group id, just the name like “Kitchen” or “Office”. My device handler kind of does what you want when some of the lights are on/off or you use another app to turn them on or off. Right now you have to hit refresh. Working on this tonight to make it so you don’t have to. It might already do it, I just didn’t test the time for the poll refresh.

Great…thank you. I’ll check out your handler later today and look forward to any updates you can make. Hopefully it has a decent polling rate already. This is why I love the ST community.

I tested it out last night (meaning payed attention to it). It doesn’t refresh correctly. I have stated another thread asking for some help / feedback.

No help from the community thus far I guess.
Let me know if you come across anyway to get this working. If not, thanks anyway.

Well, I am actively trying to figure this problem out because I use it everyday. I’m not giving up.

1 Like

Hey guys - sorry for the silence… I’ve been away.

Re: Group of groups … this looks great. I live in a flat so I guess I never thought of that! Regarding grouping of devices in general, there is an exceptional app out there called “Trend Setter” by @Kriskit which can group together and sync up all kinds of devices (not just lights), and make new group devices for them in your smartthings setup. Check it out! I’ve been using it for about 6 months with few issues

Re: refreshing - have you tried pollster?

@AdamV - I was using Trend Setter. Unfortunately I have a lot of lights and it took too long for Trend Setter to turn them on 1 by 1. For groups of group I used their API to send a list of groups and they all turn on instantly.

BTW - I’ve added a background refresh option that the user can set on the device so that if you use the LIFX app, SmartThings will eventually keep up based on how frequently you poll their servers. According to LIFX you can make 216K requests per day (60 per minute). With the settings I use I only do about 288 (every 20 minutes). Could do more I guess…

That’s very nice!

Also thanks for solving the initial level bug - I spent ages on that when i first did this and got nowhere

If you fancy taking on and iterating the main LIFX Groups code or amalgamating it all into one base please feel free to do so - and I’ll share the Github with you so you can put it all in one place.

From my perspective, I’ve got it all working as I’d like in my place (although I’d prefer to be using the local UDP protocol… but that’s not possible at present). However I can see how a lot of your iterations and improvements could make this considerably better going forward… so if you wanna take this on… it’s all yours… let me know!

Looks promising…how do I add this to my current device type.

Instructions on my ReadMe.

I already have the device handler installed and functional. I just need to know how to configure the polling schedule you described and pictured above. I even reloaded the code from:

but i still dont see the option for scheduling.

Go into the detailed view of the device on your phone. It will look like this but with a different name.

Hit the gear icon on the top right.

Scroll down to the bottom of the settings. Its a long way down.

It isn’t perfect but it works. LIFX allows 200,000+ requests per day. Setting them to 5 minutes takes only 288 requests.

I understand your instructions but when I scroll to the bottom of the settings page I have Group 10, Log Level and then the remove button. There is no schedule section as pictured. I don’t believe I am running the same updated code that you are. Please see the link I referenced in my previous post. Is this the correct code for the device handler you are currently using? If not, please post a direct link. It might also be a good idea to use version numbers and a brief description of whats changed since the last version in the comments at the top of your code. This would help us know if we are using new or outdated code.

I added version numbers and committed BUT… The version with the auto refresh capability has been in github since 07/09/2016, you can look at the history. Make sure you are updating correctly from GitHub. BTW, mind taking this conversation over to the device handler’s thread?

1 Like

Thank you. I update my smartapp and handler code manually. Don’t ask why, I’m just a creature of habit and that’s how I’ve always done it. It now works like a charm. I guess when I first “updated”… the new code wasn’t in the github yet. Thanks for your hard work on this and also providing the version numbers. This way us manual updaters can be sure we are working with current code.

Sorry for stupid question, but haven’t seen much mention of the lifx wifi led light strips, just wanted to confirm that it is compatible with ST, at least with the use of your dh? And if so, I assume it will be the same install process as set out in the OP? Thanks!

this has been working great for ages.

just recently i’ve noticed that it is setting the lifx group to 1% brightness instead of what its set in the smartapp as 80%. anyone else seeing this?

Both lifx custom device types aren’t working very well now. Perhaps lifx did something to their API

this is all non lan still isn’t it? I wonder if smartthigns will ever enable this. very tempted to move over to hass (too much effort) or hubitat. :>