AltHUE: Unknown colormode ct

Hi @amg0,

my logs are full of this alert:

luup_log:318: ALTHUE: warning: Unknown colormode:ct for Hue:6, uniqueid:XXX , state:{"hue":12875,"effect":"none","on":false,"colormode":"ct","sat":51,"mode":"homeautomation","reachable":true,"xy":[0.4573,0.4119],"alert":"select","bri":254} 

This is a Hue Bloom:

"6": {
      "productname": "Hue bloom",
      "capabilities": {
        "streaming": {
          "renderer": true,
          "proxy": false
        },
        "control": {
          "mindimlevel": 10000,
          "colorgamuttype": "A",
          "colorgamut": [
            [
              0.704,
              0.296
            ],
            [
              0.2151,
              0.7106
            ],
            [
              0.138,
              0.08
            ]
          ],
          "maxlumen": 120
        },
        "certified": true
      },
      "manufacturername": "Signify Netherlands B.V.",
      "swversion": "5.127.1.26581",
      "state": {
        "hue": 12875,
        "effect": "none",
        "on": false,
        "colormode": "ct",
        "sat": 51,
        "mode": "homeautomation",
        "reachable": true,
        "xy": [
          0.4573,
          0.4119
        ],
        "alert": "select",
        "bri": 254
      },
      "config": {
        "function": "decorative",
        "direction": "upwards",
        "startup": {
          "configured": true,
          "mode": "powerfail"
        },
        "archetype": "huebloom"
      },
      "swupdate": {
        "state": "noupdates",
        "lastinstall": "2020-07-29T12:54:04"
      },
      "name": "Luce Call",
      "type": "Color light",
      "modelid": "LLC011",
      "uniqueid": ""
    }
  },

Maybe this could be easily supported. Thanks!

according to https://rsmck.co.uk/hue

this is color temperature:

The colour temperature (white only) 154 is the coolest, 500 is the warmest
Thanks to Nathan for observing that this appears to be measured in Mireds, equivilent to 1000000/T (where T is the temperature in Kelvin) corresponding to around 6500K (154) to 2000K (500)

Hue device have several mode to store and give their current status. your device is inconsistent, it says it is in ct mode but as you can see in its state data, it does not have state.ct information. just xy
Maybe ask Philipps support ?

the Lua code is this:

if (v.state.colormode == "xy") and (v.state.xy~=nil) then
					r,g,b = cie_to_rgb(v.state.xy[1], v.state.xy[2], nil) -- v.state.bri
				elseif (v.state.colormode == "hs") then
					r,g,b = hsb_to_rgb(v.state.hue, v.state.sat, v.state.bri)
				elseif (v.state.colormode == "ct") and (v.state.ct~=nil) then
					local kelvin = math.floor(((1000000/v.state.ct)/100)+0.5)*100
					w = (kelvin < 5450) and (math.floor((kelvin-2000)/13.52) + 1) or 0
					d = (kelvin > 5450) and (math.floor((kelvin-5500)/13.52) + 1) or 0
				else
					warning(string.format("Unknown colormode:%s for Hue:%s, uniqueid:%s , state:%s",v.state.colormode,idx,v.uniqueid, json.encode(v.state)))
				end

I could, but it’s the latest firmware and I think it’s by design. I’ll comment the warning and we’ll see if this will occur in the future. Thanks!

I doubt it is by design. the fact is if the lamp is in ct mode and there is no ct information in the data, then we cannot invent the value of the lamp state

I don’t know why it happened. I just modified your code to look only for x/y and it seems to show what the Hue app is showing. Maybe is a transient state, I don’t know. I was just reporting it to you, but I realize maybe I’m the only one with this problem.
Changing the color seems to have fixed the status in the lamp as well.

Best Home Automation shopping experience. Shop at getvera!

© 2020 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules