Having tried a few of the other solutions like Hue (Re)Connect, Hue Advanced (Connect), and Hue B Smart, was running into trouble with issues of inconsistent conversions between SmartThings values (hue, brightness, etc) and Hue values, difficulties identifying color vs color temperature mode, etc., I adapted my own.
My goals were:
- As little deviation from the stock SmartThings Hue integration code as possible
- Work with groups and (native Hue) scenes, with scenes including the " in the room" part of the name
- Clear identification of color temperature mode (so I can mirror a group to a light, which was one of my aims)
In case anyone else is looking for similar, my code is up at:
- Based on the latest published native Hue (Connect) code
- Group device handler, with an interface just like the hue bulb
- Scene device handler, which acts as a momentary push button
- Bulb and Group conform to the “Color Mode” capability, so you can tell via currentValue(“colorMode”) whether you are in color temperature mode (“colorTemperature”) or not (“color”)
- Polling occurs every one minute, and updates bulbs and groups with color info (including color mode). Groups are counted as “on” if any bulb in the group is on, and their color info is determined by any bulb in the group – all of this as directly aligned with the Hue API as possible.
The code includes a smartapp as well as device handlers for hue bridge, bulb, white ambiance bulb, group, and scene. I didn’t bother to convert over the other types (Bloom, Lux bulb, etc) because I don’t use them, but it would be trivial to do if anyone needs it.