version 1.0 [27/01/2016]
Background
This is a release for LIFX Groups, using the final V1 of LIFX’s Cloud API.
Grouping lights together is surprisingly tricky using Smartthings. Although there are some great apps like “Color Coordinator” and @Kriskit’s “Trend Setter” that help you do this, there is still an issue that lighting groups made with these apps turn on the lights sequentially rather than all at the same time.
However, if you are an LIFX user and you use the app to control group lights there are two things it does better that the current Smartthings integration with a grouping Smartapp:
1… There is almost no lag at all between turning on (or any command) and the device responding.
This is because the LIFX app uses the LAN API rather than the Cloud API. Unfortunately at this point ST does not support UDP, which is the protocol that the LAN API uses. So until they change this we are stuck with laggy lights that won’t work if your internet goes down. Maybe @duncan or @Tyler could comment on when or if this will ever be sorted. If this ever does get fixed I’ll make a device handler that uses it.
2… All lights in the group come on simultaneously (and beautifully!).
This is much needed (in my opinion) and this is something that the device handler solves.
…
Installation
…
Adding an LIFX group is a 4 stage process:
1… Get an LIFX access token
Todo this go to: https://cloud.lifx.com, sign in and then go to the settings section and select generate new token. save the token somewhere safe.
2… Get the ID of the group that you would like to control
Todo this go to List Lights, then copy and paste your access token into the key button at the bottom of the page, type: “all” into the selector box, and then click: “try it” There will be what looks like a load of code that comes back. Look for the part of the code that says: group, and has the name of the goup that you want to control. it will also have a value ( “id”: ) - copy this value as this is your group ID
3… Install the device handler below using the Smartthings IDE, look in the code for the access token field (I have put: “put access token here!” to make it easier to find) and add in your access token.
4… Create a new device in the IDE and assign it this device handler. Call it whatever you want (I’d use the group name), and ensure that under the “Device Network Id” field you enter in your group ID. Then hit save.
That’s it!
…
Credit goes to LIFX, Smartthings and @zzarbi as I used their device handlers as a basis to make this one:
Known issues in v1.0
-
When you first come into the device in the app, the level slider always shows itself as 0. Just hit the refresh button to make it update. I’m not sure how to fix this and have tried quite a few things… I’ve tested the device handler and it always reports the correct level in the logs, but for some reason the slider wont show the correct level until you refresh… if anyone knows the solution please let me know
-
Colour changing bug - if you change the colour in the app, it works but there is an odd behaviour: If you change the colour in the app and then immediately exit the colour wheel then it behaves as expected - however if you change the colour, and then wait a few seconds before exiting the colour wheel, then once you exit the colour will return to the previous colour. Again I have no idea how to fix this so if anyone has encountered this issue please let me know.