1. Creation, Modification, and Deletion of Hue Hub Groups and Scenes - directly from SmartThings
– These features will appear on the Groups page and the Scenes page in the HLGS service manager (after inital installation).
As of March 26th: new abilities include
Color Temperature Slider Control from Bulbs or Groups
Transition Time Slider Control from Bulbs or Groups
Ability to update Scene settings directly from Scene device
Scene devices can retrieve & display Hue Hub sceneID
Group devices can retrieve & display Hue Hub groupID
Bulbs and Groups have colorloop effect
Claytonnj and I have created a Hue Service Manager that finds and installs (1) individual Hue Lights, (2) Hue Groups, and (3) Hue Scenes.
Installation Instructions
If you already have an existing Hue Service Manager and Hue Lights in your SmartThings system, completely remove the app and all lights.
Install and publish the service manager SmartApp into your IDE. You can find the code here
Install and publish the 5 device type handlers into your IDE. You can find the code for each here
In the SmartThings App, go to the “My Apps” section of the SmartApps Marketplace, and install the “Hue Lights and Groups and Scenes (OH MY)” SmartApp.
In that app, find and authorize your Hue Hub. Once that is done, there is a separate page for finding and selecting Hub Bulbs, Hue Groups, and Hue Scenes.
Use
The Lights work as normal.
The Groups work just like the lights do.
The Scenes are set up as Momentary Switches. Just press the button and all the lights in the scene are adjusted all at once (and very fast)!
The Scenes have a “setScene” function that can be used via other SmartApps. The parameter for the setScene() function is “groupID” - which is the number that your Hue Hub assigned to that group. Use 0 for all lights. So, if you wanted to apply a scene you set up called “Movies” and only have it applied to the group you set up with id of 1 (maybe named “Living Room”), then you would call Movies.setScene(1). If you wanted that scene’s settings to apply to all lights in the scene, then you would call Movies.setScene(0).
Known Issue
Due to the 20 second limit for routines, you need to limit the number of devices (meaning lights, groups, and scenes) that you install at a single time. Typically less than 20 works for me. This does not mean that you cannot have more than 20 total, just that IF you receive an error upon installation, then try installing 20 or less devices and then install more by opening up the “Hue Lights and Groups and Scenes (OH MY)” SmartApp again.
Thanks to zpriddy for his work on Hue Groups (Connect)!
I should add a note here… I am about to release an update for my hue groups! I now have better control of the groups updating the lights and vise-versa not to mention a TON of code cleanup! I have been working to standardize all of the code to make it more friendly to work with.
I am also working on a section of the code to allow you to read from the hue dimmer switch
I like the idea of the scenes and I will have to dig into the code later!
I would also be down for merging the two into a new GitHub repo. Feel free to message me
When you say that its not picking up any new scenes - do you mean scenes that you created via the Hue hub after installing my SmartApp? Just making sure, as I see such new scenes here.
It has picked up newly created scenes from the hub (I just hadn’t given it enough time) the Change in names for scenes on the other hand, which i believe just creates another scene - they didn’t show up no matter how long i waited.
I’m going to factory reset my bridge tonight, just to make it all clean again. And see what happens
Hi, thanks for creating such a great Smartapp. I am having a problem getting it installed, however. As I go through the installation process, everything goes smoothly until the end when the app asks me to select Scenes. Regardless of whether I check off any scenes or leave it blank, when I click Done, I get a red error message which states: “Failed to save page: Scene Discovery.”
What’s especially weird is that I went into the Hue API and deleted all of my scenes thinking that might fix the problem. I then started over with the SmartApp’s installation process, but it still finds three scenes for my Hue Beyond (Hue Beyond Down 1, Hue Beyond Up and Hue Beyond 1). The app identifies these as Scenes, but the API shows them as Groups (which I cannot uninstall for some reason). I rechecked the API and confirmed that there are no Scenes in the Bridge. I also uninstalled and reinstalled the SmartApp and all devices, but I still got the same error message.
Just wanted to say thank you so much for the app and all your hard work!
I do have one small issue that I searched forums and here for, but couldn’t find anyone having this issue. (I’m a 1 week old Smartthings user, so please take it easy on me) ;0)
Everything is working as stated and all my scenes / lights and groups made it but I seem to have an issue with the color wheel for any given light.
When you change color with color wheel, it shuts hue bulb off, then you have to use slider to bring the bulb back on and then the color changes.
I can pull logs or whatever you might need, but I might honestly have to have a little handholding when it even comes to that. Very new to all this but have some code background so hopefully won’t be too painful.
That’s very weird. I am unable to replicate that problem on my device. Logs would be very helpful.
In general, open the IDE logs on a computer while you are using the device. Try to identify the errors (if any) and/or the events that show up when you are using the color wheel. Let me know what you find. Also - are you using iOS or Android?
Hi Tony. I will get you that information tonight. I will need to uninstall the current Hue Connect app I am using and all devices and reinstall your Smartapp and devices. Anything else I should do to reinstall on a clean slate?
I use an iPhone (iOS 9.2.1) in case that matters. Also, I am using a first gen Hue bridge and second gen ST.
I don’t know where to find the logs to share though. Here is the list of events and event details of changing the color, if that is what you need.
Date Source Type Name Value User Displayed Text Changed
2016-02-23 12:06:17.275 PM EST moments ago COMMAND off off command was sent to Al’s Room true
2016-02-23 12:06:17.237 PM EST moments ago DEVICE switch off Al’s Room switch is off true
2016-02-23 12:06:10.412 PM EST moments ago COMMAND setLevel setLevel(44) command was sent to Al’s Room true
2016-02-23 12:06:10.379 PM EST moments ago DEVICE level 44 Al’s Room level is 44 true
2016-02-23 12:05:45.688 PM EST moments ago COMMAND setAdjustedColor setAdjustedColor({“red”:255,“level”:100,“hex”:"#ff4901",“blue”:1,“saturation”:99.6078431372549,“hue”:4.724409448818897,“green”… true
2016-02-23 12:05:45.614 PM EST moments ago DEVICE color #ff4901 Al’s Room color is #ff4901 true
2016-02-23 12:05:36.107 PM EST moments ago COMMAND on on command was sent to Al’s Room true
Name Value
archivable true
commandId 519504
date 2016-02-23 12:05:45.688 PM EST (2016-02-23T17:05:45.688Z)
description setAdjustedColor({“red”:255,“level”:100,“hex”:"#ff4901",“blue”:1,“saturation”:99.6078431372549,“hue”:4.724409448818897,“green”:73,“alpha”:1}) command was sent to Al’s Room
deviceId a11811b3-4e36-40ce-ad5f-5d87bd7f1fec
displayed false
eventSource COMMAND
groupId 8b40afd5-56c7-4703-b247-c2dbf62ca8ed
hubId dbf2c784-9ce4-487e-ad45-870d00fe8624
id adbe7580-da4f-11e5-8e2d-22000b4e0638
isStateChange true
isVirtualHub false
linkText setAdjustedColor({“red”:255,“level”:100,“hex”:"#ff4901",“blue”:1,“saturation”:99.6078431372549,“hue”:4.724409448818897,“green”:73,“alpha”:1})
locationId 7d6f5bd9-6d97-4d74-8be5-0bd421d1511b
rawDescription setAdjustedColor
translatable false
unixTime 1456247145688
value setAdjustedColor
viewed false
It sounds like you might have identified the problem - you need to install all of the device types used by the smartapp (and remove the original Hue Connect app). Let me know how it goes.
Okay, I started from scratch last night and deleted/reinstalled the app and the various device types. I am still getting the same error message at the end of the installation process – “Failed to save page: Scene Discovery.”
I checked the logs in IDE and the only error message I see (multiple times) is:
0c51f42f-b5a7-4f66-bdb7-f9ba6c45b4c9 8:02:01 AM: error java.lang.StringIndexOutOfBoundsException: String index out of range: 248 @ line 771
On another failed attempt to install the app, I saw the following error message:
Is anyone using this with Friends of Hue products (i.e. Lightstrips, Hue Go, etc.)? With the standard SmartThings device type, the colors of the Friends of Hue products don’t match the colors of the regular hue bulbs when set with the same HSB using setColor. Just wondering if this has the same issue before I spend the time removing everything and switching it over. Thanks!
It will have the same problem because they will use the same devicetype. It’s not an easy problem to solve because the regular bulbs can’t reproduce the same gamut of colors as the Friends of Hue products; but the first step would be a different devicetype for regular bulbs and other Hue products that use the wider color gamut.
Hue gets around this by mainly using the x,y coordinates for sending color to the bulbs, so they will always match unless the selection is outside the range that the bulbs can produce and in that case the x,y automatically selects the closest match.
The hue/saturation combo that ST uses is much easier to implement across multiple products and particularly when a color wheel selector isn’t available; but it relies on calibration at the devicetype level and there isn’t a reference for that calibration.
@claytonjn I’m just personally using the standard 3 pack hue color bulbs that came in the hub deal, so nothing really extravagant yet. Most of my devices are just zwave at this point so the “branching out” is all brand new
I’m also having the exact same problem. I get the “Scene Discover” error message. I tried uninstalling the SmartApp and Device Handlers and then reinstalling, but still got the same error. I’m wondering if we have to hard reset the Hue Hub. I don’t really want to do this though because it will delete all of the scenes and I’ll have an angry wife if I do this (it took months to get Hue to an acceptable WAF and I’m finally there).