Just wanted to say thanks for this works pretty good. I did have a few crashes when trying to set initial settings from within the app, just caused a force close on android. I then added the settings via the api and everything is working well now!
How does one set the settings via the api? I have been trying to set this up fin the Smartthings app for days without success. During the entry of the groups and the api number the Smarthings app crashes. Can anyone help or offer suggestions?
Do you know how to turn on logging in the IDE?
Could you capture the log with the error and post here?
Just letting everyone know that I have made a few changes to this device handler. You can update from GitHub.
LIFX Group of Groups (LGoG) provides the following capabilities through a device handler and an optional companion application (LIFX Sync):
Control a Group of LIFX Bulbs as a Single Device
This capability is the primary reason I created LGoG. By default, using the LIFX (Connect) app that comes with SmartThings all of your light bulbs will get added to SmartThings. If you have 1 bulb, this is likely just fine for you, however if you have many bulb, specifically bulbs you would like to control as a single device you are out of luck. Before LGoG you had to either download a SmartApp that would watch your bulbs and update the status of some of your bulbs based on the status of a master bulb or control them through CoRE (which you can still do with LGoG, however you are stuck selecting multiple lightbulbs. Specifically how LGoG works is…
- Create the groups of lights in your LIFX app. Yea, I know you can’t have a bulb in multiple groups, but LGoG fixes that!
- Generate and API key, instructions below.
- Install the LGoG device handler.
- Configure the device, add a single group or multiple groups.
Why is this better? It is more efficient. Let’s say you have a kitchen which as 10 LIFX bulbs in it. If you use the standard bulbs that ST gives you, if you want to turn them all on you have to turn 10 bulbs on. Weather you do it one by one manually, use a syncing app, or use CoRE, you are sending 10 commands to LIFX and then 10 commands back to your bulbs. Using LGoG you send a single command to LIFX and they in turn send a single command to your bulbs. You will find that your groups will become much more reliable.
Control Multiple Groups of LIFX Bulbs as a Single Device
Yes, that is right. You can create multiple groups within the LIFX app and configure this device handler to control multiple groups as a single device. For example, I have bulbs in my kitchen, dining room, foyer, & family room. I have 1 device setup in SmartThings to control each of these (so 4 in total) and another device configured to control all of these groups as a single device called “First Floor Lights”.
Create Multiple Devices for the Same Group or Set of Groups
This comes in handy when you want quick access to all of your light groups in a single “Room” within the SmartThings app, but also want to have the same device inside of the specific Room. For example I have my device “Kitchen Lights” in my Kitchen room and I have another device called “Kitchen Lights 2” which controls the same lights.
Sync the Status of your Groups
As you can create multiple groups that control a device, you can now use the LIFX Sync companion application. Once configured, if you turn on “Kitchen Lights” it will automatically update the status of the “Kitchen Lights 2” device and vis versa. You can also setup the sync to be either one way or two way. Must have companion app installed
2-way Example: When “Group A” is changed (switch or level) “Group B” is updated. “Group B” is changed then “Group A” is updated to match “Group B”.
1-way Example: When “Group D” (Group D contains Group A, B, and C) is changed (switch or level), “Group C” is updated. When “Group C” is changed, “Group D” does not get updated.
Scheduled Sync with LIFX
Schedule the DH to double check the light status via lifx and update the ST status accordingly.
Power Usage Reporting
Report power usage based on the number of bulbs in a group. This was all based on real world testing as accurate as I could get.
Thanks so much for your work on this! Exactly what has been needed for LifX!
I’m having an issue trying to configure my device in the app. I input the API token, and then set the name of group 1–setting it exactly as it is in the LifX app, and when I try to click done, the SmartThings app crashes. I’ve tried on multiple android devices, with the same result.
I set the preferences up through the ide, with the same info, and it is working, but if I go into the app preferences to change something, no matter what I do, it says “Please fill out the required field.” But all required fields are already filled out. Not sure what’s going on, but thought I’d report the bug.
Finally, I just purchased this dimmer: http://amzn.to/2iOQA7K , which I’m hoping to use a a physical control for one of these LifX groups. Do you think this will work? Any advice or anyone who’s had experience with this would be appreciated!
I think there is an issue with the SmartThings Android app. You are not the first one to mention that issue. I know there are other apps that don’t configure properly. I can take a look and see if I can remove some the the help text to see if that clears up the problem, works fine on iOS.
I don’t know if that dimmer works. I use this dimmer along with my DH and SmartApp manager for the dimmer to control the groups. Both are covered in this post. The dimmer I posted is battery operated and looks just like a regular dimmer.
Thanks for the quick reply! Please let me know if you get a chance to update the code to try to get this issue resolved in android. And thanks again for solving this problem for us!
Really like how this makes all the bulbs come on at one time, however I have a scenario where depending on the time of day I only want 2 of the five bulbs to come on, or all five, or three or only 1. Will I be able to use this for that? I would think I could just create multiple groups, but I see the part about not being able to have a bulb in multiple groups.
Try this branch, just copy and paste.
App no longer crashes, but I can’t exit the configuration screen as now all groups are required fields. Additionally, when I fill out every field, and click done, the configuration continues to say, “Please fill out the required field.”
Sorry about that, too much copy and paste. Just updated that branch on my iPhone from Lowes.
Update your code by copying and pasting the code from the branch again.
No doesn’t do that. You have to control the light individually. You could create a virtual switch that when turned on CoRE picks it up and turned on 1 to N lights based on the time of day.
However, you are more likely to use less power if you just turn all the lights on and dim to a % level.
App doesn’t crash, and it doesn’t appear that all the groups are required fields anymore (only Group 1 appears to be required), but when you hit done, it still returns with “Please fill out all required fields.” On Android, the required fields appear red, and then blue once you fill them in. I’ve tried filling every field in so they all turn blue, but I still get this message. Hope that helps explain what’s happening.
Can you post screenshots?
I blurred the api key, but here’s pics of what’s happening. No matter what I do, I get this message that I have to fill out all required fields. The only way out of config is to click back and discard any changes.
When you scroll all the way down are there any blank fields even without names?
Try deleting the device and starting over.
No empty fields that I can see. I’ve deleted the device and added it again each time I’ve updated the code. Pretty strange.
Update and try now. Make sure the “Number of Bulbs” is not 0. I changed the default value. Make the number of bulbs equal the number in the group.
Tried new code with a new device, with number of bulbs being set right. I had the same issue. Only difference was that now Log Level is a required field. But even with it and the others filled in, still getting the “Please fill out all required fields.”
I don’t know. It might be an issue with the ST app. I can’t seem to find the issue. I have a new android tablet. I can debug tomorrow. For now you can setup via the IDE?