Capability Color Temperature (Hue "ct")


(Kristopher Kubicki) #1

CT - Color Temperature:

http://www.developers.meethue.com/documentation/core-concepts

I suppose I am more curious to see if the command method is even supported more than anything else. If not I could write a CT to HSL converter (though what fun would that be…)


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #2

This a good request, @Kristopher, and an excellent example of what could or should be an extension (i.e., new Commands, Command Signatures, and/or Attribute(s)) to the existing “Capability Color Control”:

The problem is that whenever a Capability is extended, all existing SmartDevice Types that claim that Capability need to be refactored to implement all the new Command(s), Command Signatures, and Attribute(s) in some meaningful way.

SmartThings does not (currently) support any concept of “optional” Commands / Signatures / Attributes. There are various ways the Platform could handle such a concept, but that’s off-Topic.

Perhaps @tyler, @ben, or designate can comment on optional Capability Properties and/or ways of handling the impact of extending a Capability.


So if we can’t extend “Capability Color Control”, then this requirement is safely fulfilled by adding a new incremental granular Capability as per the Topic title (Capability “Color Temperature Control”):

Attribute: colorTemperature in Units
Command: setColorTemperature(number)

What Units to Use?

Philips Hue uses a scale called “mirek” (reciprocal megakelvin), similar to “mired” (micro reciprocal degree). I don’t know why they don’t just use straight-up Degrees Kelvin (2700K = warm white).

If “mirek” or “mired” are typical, then I’d vote for that unit.

(NB: we’ve just run into the bigger issue of unit choice for all measurement Capabilities, again. :confounded:)


Getting Philips Hue Values
(Scott G) #3

It’s just a scaling convention. A 1 degree K shift in color temp is meaningless, so they make the steps larger. Hue uses it because that is the standard that Zigbee adopted based on the science below. Zigbee also mentions that when changing color temperature the device shall create a continuous path from the current color temperature to the new one taking the path through color space along the “Black Body Line”.

From Wikipedia on color temp:

The color temperature of the electromagnetic radiation emitted from an ideal black body is defined as its surface temperature in Kelvin, or alternatively in mireds (micro-reciprocal Kelvin).[4] This permits the definition of a standard by which light sources are compared