[OBSOLETE][UPDATED as of March 24, 2016] Hue Lights & Groups & Scenes (OH MY!)

Actually, the Philips Hue API has a color temperature variable – “CT” – that can be adjusted directly. One can set it from the warmest color (2000K) to coldest color (6500K) in terms of mireks. So the CT range is from the warmest color – i.e., a CT setting of 500 mireks – to the coldest color – i.e., a CT setting of 153 mireks.

So, I think I can add this ability, despite my not having a PhD. =)

Interesting. I had assumed that since none of the device handlers included color temperature it was not in the API. Just having setColorTemperature() implemented without being able to adjust this on the device handler property sheet would be great. It would save me from selling off a zillion of my Hue bulbs!

Hmm. Maybe I should wait and grab a bunch from you at those fire sale prices. :sunglasses:

I can’t promise that I can get it to work, but in theory there should be no difference between setting the CT and setting hue, saturation, level, transition time, etc…

Looking at your code again it looks like it shouldn’t be too much trouble. Will just need to scale the range and hopefully that is all it takes! I still like the Hue bulbs but it would be nice to get them to behave more like my LIFX.

My thoughts exactly. I have had some difficultly in the past with scaling a range. Will be posting a request for advice on this soon.

Tonight I will add in a setColorTemperature() section into the zigbee hue bulb code to test on a bulb I have connected directly to ST. I will let you know how it works out…

Sean

I’ve updated the SmartApp and the Bulb, Group, and Scene device types onto GitHub.

I need to check this out. Great job!

1 Like

@infofiend Nice app! I’m going to look to transition from the native to this one this coming weekend. Any chance of a future release being able to control the Hue Dimmer Switch?

Reason: I have a dining room fixture with 5 hue bulbs controlled by a Hue Dimmer Switch. It would be so much easier to just control the HDS for on/off/dim function rather than picking all 5 bulbs, setting up a group, etc etc. It may also then allow me to control the HDS via Amazon Echo since it would be seen by ST (that piece may take some work though).

Thanks for all of your hard work thus far!

No plans to include Hue Dimmers - others have made some effort, but I believe Philips hasn’t made it easy.

If you have an Echo - then skip the HDS altogether. An Echo works really well and easily with ST…

Is it possible to have the device handler publicize that it is color temperature capable so that bulbs show up for SmartApps looking for color temperature bulbs specifically?

Hmmm. I don’t think so (at least at the moment) – I don’t believe that ST has a “capability.colorTemperature” capability.

I implemented color temperature control by using custom commands / custom attributes in the Bulb & Group device types.

Interesting. Circadian Daylight is looking for exactly that. Also, when Circadian Daylight tries to adjust the color of the bulb I get this:

debug setColor: [hue:29, saturation:10, level:100]
error java.lang.IllegalArgumentException: All Values must be Integers between 0 and 100. Received: ([isStateChange:true], 29) @ line 307

EDIT: Actually, capability.colorTemperature is listed here: http://docs.smartthings.com/en/latest/capabilities-reference.html

There is a Color Temperature capability. I found it in the API section for SmartThings. Without it the bulbs don’t show up in RM if you want to select lights to adjust color temperature. However I didn’t have much luck on this end implementing it correctly.

I’m working on it now. I can do a pull request in a few minutes, I have everything working except the slider handle and ColorTemp reading.

Just installed your app and it looks good. Should this app work with the white Hue bulb?. My colour Hues are working perfectly however my white bulb doesn’t respond. It is detected as a bulb though when I try to switch it on via ST nothing happens. I have checked the live logging and the following error appears;

groovy.lang.MissingMethodException: No signature of method: script1457725292935317392756.log() is applicable for argument types: (java.lang.String) values: [Executing getId]

Have I done something wrong?

Well paint my butt white and call me an antelope. @claytonjn has already sent me some modifications to change the CT units used by the devices to Kelvin. So xmas may come early this year.

1 Like

It works (for me at least) perfectly on my “white” hues as well as on my “color” hues. The white hues will have level changes only.

Can you tell me a little more about the error? Was it when you pressed the device button? Send more of the log so I can figure out where its coming from.

@infofiend do the Hue Lux/White bulbs support transition time? If so, is there any reason you didn’t include it in their device handler?

The device looks like it has been recognised correctly - it only has the level option as you have said. Not sure where to get any more log information. I’m just looking at the Live Logging. When I try to switch on from ST this is all that is logged:

8:58:03 PM: error groovy.lang.MissingMethodException: No signature of method: script1457725292935317392756.log() is applicable for argument types: (java.lang.String) values: [Executing getId]
Possible solutions: now(), on(), poll(), icon(java.lang.String), on(java.lang.Object), page() @ line 1103

The switch goes green though if I navigate away and return to the switch it is set back to off. If I turn the light on via the Hue app it seems to refresh and show the bulb is on so it appears to be able to read the state, just not control it.

Only had ST for a few weeks at up until now have controlled them with the standard Hue Connect app - which I removed before installing yours.