ebaauw / homebridge-hue

Homebridge plugin for Philips Hue
Apache License 2.0
898 stars 91 forks source link

IKEA Tradfri GU10 Color + White Spectrum - stays blue, can't change color #956

Closed smiatek closed 3 years ago

smiatek commented 3 years ago

Issue

I bought my first IKEA Tradfri bulb, added it to Hue Bridge and connected with Apple Home using homebridge-hue.

White spectrum is working fine (except maybe marker on color wheel, which is blue), but when I'm trying to pick a color, bulb turns blue and color picker in Home App turns blue after few seconds. Color of the bulb never changes. Same thing in Eve application.

Bulb firmware says 1.0.021.

https://www.ikea.com/gb/en/p/tradfri-led-bulb-gu10-345-lumen-wireless-dimmable-colour-and-white-spectrum-80439228/

Log Messages

[16/03/2021, 19:25:26] [Hue] Philips Hue: /lights/18: Extended color light "Extended color light 1"
[16/03/2021, 19:25:26] [Hue] Philips Hue: /lights/18: config: {"on":true,"bri":true,"ct":true,"xy":true,"speed":false,"colorLoop":true,"lastBoot":false,"lastSeen":false,"resetTimeout":500,"waitTimeUpdate":20,"minCt":250,"maxCt":454,"gamut":{"r":[0,0.0001],"g":[0,0],"b":[0,0.0001]},"unknown":false,"noTransition":true}

[...]

[16/03/2021, 18:57:17] [Hue] Extended color light 1: homekit saturation changed from 100% to 87%
[16/03/2021, 18:57:17] [Hue] Extended color light 1: homekit hue changed from 209˚ to 17˚
[16/03/2021, 18:57:19] [Hue] Extended color light 1: set homekit hue from 17˚ to 209˚
[16/03/2021, 18:57:19] [Hue] Extended color light 1: set homekit saturation from 87% to 100%

Debug Files

homebridge-hue.json.gz

log.txt

ebaauw commented 3 years ago
[16/03/2021, 19:25:26] [Hue] Philips Hue: /lights/18: config:  {(...) ,"gamut":{"r":[0,0.0001],"g":[0,0],"b":[0,0.0001]}, (...)}

That's not good: Homebridge Hue figures the light only supports xy values in the triangular range ([0, 0.0001], [0, 0], [0, 0.0001]), or basically: only [0, 0.0001]. That's blue alright.

It's actually the Hue bridge that exposes the invalid colour gamut (see below). Haven't seen this before. This is probably a bug in the IKEA firmware (exposing the wrong values for the attributes in the Defined Primaries Information set). We would need to use a Zigbee sniffer or to connect the spot to deCONZ to verify.

I can work around this by hardcoding the gamut for IKEA lights. Before using the default gamut, could you please list the output of ph -H 192.x.x.2 probe -v /lights/18 to check if these new lights report the actual colour (rather than echoing the requested colour)?

BTW: this is the first IKEA Extended Color Light I've seen (supporting both ct and xy); the older CWS bulbs only support xy.

{
  "state": {
    "on": true,
    "bri": 254,
    "hue": 0,
    "sat": 33,
    "effect": "none",
    "xy": [
      0,
      0.0001
    ],
    "ct": 250,
    "alert": "select",
    "colormode": "xy",
    "mode": "homeautomation",
    "reachable": true
  },
  "swupdate": {
    "state": "notupdatable",
    "lastinstall": "2021-03-16T16:36:48"
  },
  "type": "Extended color light",
  "name": "Extended color light 1",
  "modelid": "TRADFRI bulb GU10 CWS 345lm",
  "manufacturername": "IKEA of Sweden",
  "productname": "Extended color light",
  "capabilities": {
    "certified": false,
    "control": {
      "colorgamuttype": "other",
      "colorgamut": [
        [0, 0],
        [0, 0],
        [0, 0]
      ],
      "ct": {
        "min": 250,
        "max": 454
      }
    },
    "streaming": {
      "renderer": false,
      "proxy": false
    }
  },
  "config": {
    "archetype": "classicbulb",
    "function": "mixed",
    "direction": "omnidirectional"
  },
  "uniqueid": "ec:1b:bd:ff:fe:6c:9c:00-01",
  "swversion": "1.0.021"
}
smiatek commented 3 years ago

During probing, the bulb changes colors accordingly.

ph probe: /lights/18: cool ... done
ph probe: /lights/18: warm ... done
ph probe: /lights/18: red ............................................................... timeout
ph probe: /lights/18: green ............................................................... timeout
ph probe: /lights/18: blue ............................................................... timeout
{
  "manufacturername": "IKEA of Sweden",
  "modelid": "TRADFRI bulb GU10 CWS 345lm",
  "type": "Extended color light",
  "bri": true,
  "ct": {
    "min": 250,
    "max": 454
  },
  "xy": {
    "r": [
      0.9961,
      0.0001
    ],
    "g": [
      0.0001,
      0.9961
    ],
    "b": [
      0.0001,
      0.0001
    ]
  }
}
ebaauw commented 3 years ago

Thanks. So no real feedback from the light; I’ll use the default gamut.

ebaauw commented 3 years ago

In v0.13.4.

smiatek commented 3 years ago

It works perfect. Thank You!