My setup contains a mix of Signify products (lamps, sensors) and a few third party products, among them two TradFri Bulbs : Color Temperature Light (TRADFRI bulb E27 WS opal 980lm)
Bridge association was quite simple and everything worked "out of the box", but suddendly stopped working, on a fresh session clicking the menu showed nothing
journalctl /usr/bin/gnome-shell -f -o cat
JS ERROR: TypeError: this.bridesData[bridgeid].lights[lightid].state.xy is undefined
_getGroupColor@/home/dk/.local/share/gnome-shell/extensions/[email protected]/extensionmenu.js:258:1
switch (this.bridesData[bridgeid]["lights"][lightid]["state"]["colormode"]) {
case "xy":
[tmpR, tmpG, tmpB] = Utils.XYBriToColor(
this.bridesData[bridgeid]["lights"][lightid]["state"]["xy"][0],
{"state":{"on":true,"bri":130,"ct":250,"alert":"none","colormode":"xy","mode":"homeautomation","reachable":true},"swupdate":{"state":"notupdatable","lastinstall":"2021-11-10T18:34:35"},"type":"Color temperature light","name":"Color temperature light 1","modelid":"TRADFRI bulb E27 WS opal 980lm","manufacturername":"IKEA of Sweden","productname":"Color temperature light","capabilities":{"certified":false,"control":{"ct":{"min":250,"max":454}},"streaming":{"renderer":false,"proxy":false}},"config":{"archetype":"classicbulb","function":"functional","direction":"omnidirectional"},"uniqueid":"d0:cf:5e:ff:fe:1f:05:7f-01","swversion":"1.2.217"}
Althought colormode is set to "xy", ...["state"]["xy"] is undefined and ["state"]["ct"] is
if (this.bridesData[bridgeid]["lights"][lightid]["manufacturername"] === "IKEA of Sweden")
{
Utils.logDebug("Found an IKEA bulb");
Utils.logDebug(this.bridesData[bridgeid]["lights"][lightid]["name"]);
continue;
}
But there are many occurences of this check, and I'm not comfortable enough with JS to provide a decent patch
grep -n '\["state"\]\["xy"\] === undefined' extensionmenu.js
246: if (this.bridesData[bridgeid]["lights"][lightid]["state"]["xy"] === undefined &&
353: if (data["lights"][id]["state"]["xy"] === undefined) {
1512: this.bridesData[bridgeid]["lights"][lightid]["state"]["xy"] === undefined &&
1567: this.bridesData[bridgeid]["lights"][lightid]["state"]["xy"] === undefined &&