ebaauw / homebridge-hue

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

Warnings after Homebridge start (using default colour gamut for unknown light model) #1041

Closed jostrasser closed 2 years ago

jostrasser commented 2 years ago

Hi,

I can see the following warning after starting homebridge:

[01/11/2021, 06:24:24] [Homebridge-Hue] Philips hue: /lights/18: warning: using default colour gamut for unknown light model {"state":{"on":false,"bri":254,"hue":6805,"sat":188,"effect":"none","xy":[0.425,0.4027],"ct":308,"alert":"select","colormode":"ct","mode":"homeautomation","reachable":true},"swupdate":{"state":"notupdatable","lastinstall":"2020-05-11T12:50:31"},"type":"Extended color light","name":"Büro Decke","modelid":"371000002","manufacturername":"Paulmann Licht","productname":"Extended color light","capabilities":{"certified":false,"control":{"colorgamuttype":"other","ct":{"min":153,"max":370}},"streaming":{"renderer":false,"proxy":false}},"config":{"archetype":"classicbulb","function":"mixed","direction":"omnidirectional"},"uniqueid":"00:15:8d:00:04:4a:28:4a-01","swversion":"1400-0001"}

The lamp /lights/18 is a Paulmann Amaris lamp (controlled via Zigbee / Hue Bridge).

ph probe ( ph -H 192.168.0.50 -u "USER" probe -v /lights/18) gets a timeout on the color "red", "green" and "blue":

root@homebridge:/var/lib/homebridge# ph -H 192.168.0.50 -u "USER" probe -v /lights/18
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": "Paulmann Licht",
  "modelid": "371000002",
  "type": "Extended color light",
  "bri": true,
  "ct": {
    "min": 153,
    "max": 370
  },
  "xy": {
    "r": [
      0.9961,
      0.0001
    ],
    "g": [
      0.0001,
      0.9961
    ],
    "b": [
      0.0001,
      0.0001
    ]
  }
}
root@homebridge:/var/lib/homebridge#

Colors are generally working but sometimes inaccurate via Apples Home App (HomeKit) and also via the Philips Hue App with this lamp. When I want to switch back from "colors" to "warm light", the lamp sometimes doesn't recognize it.

Thanks for your help!

ebaauw commented 2 years ago

Colors are generally working but sometimes inaccurate via Apples Home App (HomeKit) and also via the Philips Hue App with this lamp.

That generally means the light supports a different gamut, but there's nothing I can do, since it doesn't report it. I could whitelist the light to get rid of the warning, but it's actually quite appropriate.

When I want to switch back from "colors" to "warm light", the lamp sometimes doesn't recognize it.

That could be an issue with (in order of likelihood):

  1. The light not being reachable by the Hue bridge;
  2. The Home app not sending the change to Homebridge Hue;
  3. The light firmware not accepting the Zigbee command from the Hue bridge;
  4. Homebridge Hue not sending the right command to the Hue bridge.

I would need to see the debug log file to analyse this further.

jostrasser commented 2 years ago

Hi @ebaauw I have now done some color changes and collected the homebridge.log in debug mode and also the dump from homebridge-hue.

Should I upload the logs here?

Thanks!

ebaauw commented 2 years ago

Yes, please.

jostrasser commented 2 years ago

@ebaauw sure, no problem... attached. Thanks!

homebridge.log homebridge-hue.json.gz

ebaauw commented 2 years ago

I only see three instances where you changed the light from HomeKit (while running in debug mode)? In all cases, Home sets Hue (and Saturation), not Color Temperature. Did you try and switch to Color Temperature while debug was running? I don't see that in earlier logs either.

$ grep -e changed -e PUT homebridge.log
[...]
[01/11/2021, 14:28:30] [Homebridge-Hue] Büro Decke: homekit hue changed from undefined˚ to 240˚
[01/11/2021, 14:28:30] [Homebridge-Hue] Büro Decke: homekit saturation changed from undefined% to 100%
[01/11/2021, 14:28:30] [Homebridge-Hue] Philips hue: request 29: PUT /lights/18/state {"hue":43690,"xy":[0.1355,0.0399]}
[01/11/2021, 14:28:34] [Homebridge-Hue] Büro Decke: homekit hue changed from 240˚ to 120˚
[01/11/2021, 14:28:34] [Homebridge-Hue] Philips hue: request 38: PUT /lights/18/state {"xy":[0.1724,0.7468]}
[01/11/2021, 14:28:37] [Homebridge-Hue] Büro Decke: homekit hue changed from 120˚ to 0˚
[01/11/2021, 14:28:37] [Homebridge-Hue] Philips hue: request 45: PUT /lights/18/state {"xy":[0.6987,0.2974]}

This first request sets hue in addition to xy. This will be ignored by the Hue bridge (as xy is specified), but this is not correct. Not related to lights not switching to ct, though.

I double-checked using a Hue extended color light with Home on iPadOS 15.1: when selecting a colour, Home sets Hue and Saturation; when selecting a temperature, it sets Color Temperature.

jostrasser commented 2 years ago

Hi @ebaauw For the test I said to Siri "change the light color to green / red / blue" (only for the light "Büro Decke" which is the Paulmann Lamp).

After that I have run a scene to change the color back and bring it in sync with the other lamps in the room, this is what you see I think.

I can do only the color change again if you want.

ebaauw commented 2 years ago

When I want to switch back from "colors" to "warm light", the lamp sometimes doesn't recognize it.

I think you want to set a colour and then a colour temperature? Tbh, I never tried letting Siri change the colour nor colour temperature. I have a weird love/hate relationship with her, where she pretends to hear me but doesn't listen.

jostrasser commented 2 years ago

When I want to switch back from "colors" to "warm light", the lamp sometimes doesn't recognize it.

I think you want to set a colour and then a colour temperature? Tbh, I never tried letting Siri change the colour nor colour temperature. I have a weird love/hate relationship with her, where she pretends to hear me but doesn't listen.

Yes, I only set the color with Siri... or my Kid ;)

Normally we only set simple colors like red, green, blue and so on.

But after we do that and I start a scene where the lamp should switch back to adaptive lightning the lamp stays on this color or all lamps in the scene are doing nothing when I press a button on my Hue Dimmer switch. Only activating the scene via Home App is working and brings back the correct color. Really strange.

jostrasser commented 2 years ago

I have now done another test:

1) changed the color on "Büro Decke" via Home App to "red" 2) tried to activate another adaptive scene with this lamp via Hue Dimmer (not working) 3) activated adaptive scene with Home App (working) 4) tried again to change scene via Hue Dimmer (working again after 10-20sec)

homebridge.log

jostrasser commented 2 years ago

...strange. I have now reproduced it again with a Philips Hue Gen3 bulb... and I got the same behavior. When I switch the color via Home App (only one lamp/bulb) the the Hue Dimmers are no more working after that.

After activating the scene (which normally activates the Dimmer switch) via Home App all is working again.

So this behavior is not related to the Paulmann Lamp.

Any ideas @ebaauw ?

ebaauw commented 2 years ago

When I switch the color via Home App (only one lamp/bulb) the the Hue Dimmers are no more working after that.

What do you mean "are no more working"?

jostrasser commented 2 years ago

What do you mean "are no more working"?

I saw log entries with "dimmer pressed" but nothing changed / scenes not activated. So it isn't a communication problem between the switches and the bridges. I will check the communication between homebridge and the Hue bridge again.

How should we go on with the Paulmann lamp? Is there anything what you can do?

Thanks!

ebaauw commented 2 years ago

I saw log entries with "dimmer pressed" but nothing changed / scenes not activated. So it isn't a communication problem between the switches and the bridges. I will check the communication between homebridge and the Hue bridge again.

If you see the log entries, Homebridge Hue sees the button events alright. The communication between the dimmer, the Hue bridge, and Homebridge Hue is working. You should see the tile bump in Home. However, button actions as well as other HomeKit automations run on your home hub, not on your iPhone. If they don’t activate, there’s an issue with your home hub, or with the communication between the home hub and Homebridge.

Note that Homebridge Hue doesn’t cancel adaptive lighting when you change the colour temperature, only when you change the colour. If you set both colour temperature and brightness in your scene, the colour temperature probably gets overwritten by the newly computed adaptive colour temperature because of the changed brightness. This is a deviation from the standard I made in an attempt to cope with the way I setup my home automation, using Zigbee scenes. It’s not working out anyway, so I’ll change that. EDIT: I did already fix that. Confirmed in my logs that it's working.

How should we go on with the Paulmann lamp? Is there anything what you can do?

Not without knowing what colour gamut it supports.

jostrasser commented 2 years ago

Not without knowing what colour gamut it supports.

Hmm, is there a way to find this out? Or can you "whitelist" this Lamp that I don't get an error while starting up? In general, it is working with the defaults, and this is enough for me I think.

ebaauw commented 2 years ago

Hmm, is there a way to find this out?

Not without specialised hardware to analyse the colour the light is emitting. Even then, I wouldn't know how. ph probe only works if the light is updating its state with the actual colour, rather than simply echo-ing the last colour set.

Or can you "whitelist" this Lamp that I don't get an error while starting up?

It's a warning, not an error. Yes, I could whitelist the lamp, but that won't solve the inaccurate colours.

jostrasser commented 2 years ago

I understand. Anyway, thanks for your help!

ebaauw commented 2 years ago

In v0.13.28.

jostrasser commented 2 years ago

Thank you @ebaauw !