Page 1 of 1

Difference between supportsColor and supportsRGB

PostPosted: Fri Jul 13, 2018 3:01 pm
by Colorado4Wheeler
As the title says, what is the difference between these two as far as Indigo is concerned? Can something not support color but does support RGB? Can something support color but not support RGB? If the latter then does that mean Indigo will control it via HSL instead?

I happened to be looking at something for a user of HomeKit Bridge and hadn't noticed, for whatever reason, in all the time I spent looking at device attributes that devices had both of these values, I always just referred to supportsColor assuming that if that was enabled it was capable of color.

Or am I grouping this wrong and supportsRGB will only be true so long as supportsRGBandWhiteSimultaneously is false, sort of the 'no, this doesn't do white but rather only does RGB'?

Re: Difference between supportsColor and supportsRGB

PostPosted: Fri Jul 13, 2018 4:18 pm
by matt (support)
I think these comments from the Dimmer SDK plugin will help. Supports Color is the base, which means it supports either RGB or different warn/cool white temperatures. We should document all this in the wiki too, of course. :roll:

Code: Select all
            SupportsColor:                        True or False
            -> SupportsRGB:                        True or False (requires SupportsColor to be True)
            -> SupportsWhite:                     True or False (requires SupportsColor to be True)
               -> SupportsTwoWhiteLevels:            True or False (requires SupportsWhite to be True)
               -> SupportsTwoWhiteLevelsSimultaneously:   True or False (requires SupportsTwoWhiteLevels to be True)
               -> SupportsWhiteTemperature:            True or False (requires SupportsWhite to be True)
               -> SupportsRGBandWhiteSimultaneously:   True or False (requires SupportsRGB and SupportsWhite to be True)
               -> WhiteTemperatureMin:               Optional integer value for minimum white color temperature
               -> WhiteTemperatureMax:               Optional integer value for maximumj white color temperature
         
         Two white level fields (SupportsTwoWhiteLevels) is used by some hardware
         to mix cool and warm white levels. Other hardware provides this capability
         by using a white temperature value (SupportsWhiteTemperature). The two
         techniques are mutually exlcusive, so choosing to enable two white levels
         will override (and not show) the white temperature UI.

If you still have questions about how Indigo treats the props let me know.

Re: Difference between supportsColor and supportsRGB

PostPosted: Fri Jul 13, 2018 4:56 pm
by FlyingDiver
And let me tell you, deciphering that on the fly to map to non-Indigo devices is a pain. Had to do it for the LIFX Bridge plugin to support controlling color lights from a Harmony remote. It's still not completely right, but it's workable. I also found a bug in the lifxlan Python library while I was at it...

Re: Difference between supportsColor and supportsRGB

PostPosted: Sat Jul 14, 2018 7:34 am
by Colorado4Wheeler
matt (support) wrote:
which means it supports either RGB or different warn/cool white temperatures

A little confusing but I think I get it, thank you.

FlyingDiver wrote:
And let me tell you, deciphering that on the fly to map to non-Indigo devices is a pain.

I went through similar pains translating from Hue to the HLS in HomeKit.