Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Govee] Brightness Channel is not in sync with color channel #17807

Open
felixschndr opened this issue Nov 25, 2024 · 15 comments · May be fixed by #17812
Open

[Govee] Brightness Channel is not in sync with color channel #17807

felixschndr opened this issue Nov 25, 2024 · 15 comments · May be fixed by #17812
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@felixschndr
Copy link
Contributor

felixschndr commented Nov 25, 2024

I recently bought a Govee ceiling light and wanted to control it via the LAN API. The device (H60A1) is not listed as a supported device, but I figured I'd give it a try and return it unsuccessful. Fortunately the device supports being controlled via the LAN API. Thus I was ready to implement it into OpenHAB.

However I found a bug: The brightness channel is not in sync with the brightness component of the color channel.

I configured two items as decribed in the docs

# Color
Color Licht_Arbeitszimmer_Deckenlampe_Farbe {channel="govee:govee-light:Licht_Arbeitszimmer_Deckenlampe:color"}

# Brightness
Dimmer Licht_Arbeitszimmer_Deckenlampe_Helligkeit {channel="govee:govee-light:Licht_Arbeitszimmer_Deckenlampe:color"}

Example:

  1. Set the color to 0,100,100 (100% brightness).
  2. Set the brightness channel to 50. The color channel is not updated (stays at 0,100,100), however the lamp goes to 50% effective brightness (the actual brightness of the lamp).
  3. Change the color: The light will be at a maximum of 50% effective brightness, even if set to 100% in the color part. So setting the color to 180,100,100 results in a different color but still at 50% brightness.
  4. Set the brightness channel back to 100 results in the light ramping up to 100%.
  5. Lower the brightness of the color (180,100,10). This results the lamp to go to 10% brightness while the brightness channel is still at 100.
  6. If the brightness channel is now lowered as well. The effective brightness seems to be the product of the color and brightness channel (color: 0,0,50, brightness 20, result: 50% of 20% = 10%) (tbh not entirely sure about how the calculation work, might need to re-check)

These channels don't seem to update properly like the channels of other bindings do.

This itself is kinda a bummer but becomes even more problematic when working with color temperature as this only uses the brightness channel.
Example:

  1. Set the color to 0,0,50.
  2. Set the color temperature to X (some amount of Kelvin), the light changes to white but starts at 100%.
  3. Since the light is really bright after coming from 50% color to 100% white it is usual to lower the brightness way down (in my experience 20% white is pleasant after 50% color.)
  4. When changing back to a color now the light only goes up to max 20% since the brightness channel caps the max brightness.

There seems to be a bug in the binding. I wrote three rules and added like some proxy items to build around this but I think this should be fixed in upstream.

@stefan-hoehn and @andrewfg I saw you as a contributor, would you mind taking a look at this? I'd be happy to install debug bindings and send you any logs you might need or provide you with further information.
Please forgive me for pinging (don't want to be rude^^).

@felixschndr felixschndr added the bug An unexpected problem or unintended behavior of an add-on label Nov 25, 2024
@andrewfg
Copy link
Contributor

andrewfg commented Nov 25, 2024

Two things:

  1. In general, are you waiting long enough? The binding uses a polling model, so when you issue a command, it takes until the next polling cycle before the resulting final state is reported.
  2. Apropos Color Temperature, I recently did some work in OH core and on the Zigbee binding (see link below) in order to synch the color HSB value to the CT Kelvin. So this binding may have a similar issue..

openhab/org.openhab.binding.zigbee#855

@andrewfg
Copy link
Contributor

@stefan-hoehn I was looking at the code, and I certainly see some scope for improvement. So I am working on a PR

@andrewfg
Copy link
Contributor

@felixschndr in order for me to correctly debug it, can you please turn on log:set TRACE org.openhab.binding.govee and send me the log for your two failing use cases above?

@felixschndr

This comment was marked as outdated.

@andrewfg
Copy link
Contributor

Please let me know if you need more logs

@felixschndr many thanks for the logs. However I really need TRACE logs (not just DEBUG) please.

@felixschndr
Copy link
Contributor Author

felixschndr commented Nov 26, 2024

Haha

For now I just supress the log messages and ignore them.

I set the logs of the binding to TRACE, however I also set org.openhab.binding.govee.internal.CommunicationManager to ERROR to supress the thing Handler for 192.168.4.237 couldn't be found.. However these are the logs you are actually looking for^^


First case

2024-11-26 17:45:51.259 [INFO ] [openhab.event.ItemCommandEvent                                                  ] - Item 'GoveeLightColor' received command 5,100,100 # effective brightness 100
2024-11-26 17:45:51.262 [INFO ] [openhab.event.ItemStateChangedEvent                                             ] - Item 'GoveeLightColor' changed from 0,100,100 to 5,100,100
2024-11-26 17:45:51.267 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - Channel ID color type class org.openhab.core.library.types.HSBType
2024-11-26 17:45:52.571 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:45:52.579 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":100,"color":{"r":255,"g":21,"b":0},"colorTemInKelvin":0}}}
2024-11-26 17:45:52.580 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:45:54.572 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:45:54.580 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":100,"color":{"r":255,"g":21,"b":0},"colorTemInKelvin":0}}}
2024-11-26 17:45:54.581 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:45:56.573 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:45:56.581 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":100,"color":{"r":255,"g":21,"b":0},"colorTemInKelvin":0}}}
2024-11-26 17:45:56.582 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:45:58.274 [INFO ] [openhab.event.ItemCommandEvent                                                  ] - Item 'GoveeLightBrightness' received command 38.0  # effective brightness 38
2024-11-26 17:45:58.278 [INFO ] [openhab.event.ItemStateChangedEvent                                             ] - Item 'GoveeLightBrightness' changed from 100.0 to 38.0
2024-11-26 17:45:58.280 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - Channel ID color type class org.openhab.core.library.types.PercentType
2024-11-26 17:45:58.574 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:45:58.582 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":38,"color":{"r":255,"g":21,"b":0},"colorTemInKelvin":0}}}
2024-11-26 17:45:58.584 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:46:00.575 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:46:00.585 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":38,"color":{"r":255,"g":21,"b":0},"colorTemInKelvin":0}}}
2024-11-26 17:46:00.585 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:46:02.577 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:46:02.584 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":38,"color":{"r":255,"g":21,"b":0},"colorTemInKelvin":0}}}
2024-11-26 17:46:02.585 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:46:02.886 [INFO ] [openhab.event.ItemCommandEvent                                                  ] - Item 'GoveeLightColor' received command 172,100,100  # effective brightness 38
2024-11-26 17:46:02.887 [INFO ] [openhab.event.ItemStateChangedEvent                                             ] - Item 'GoveeLightColor' changed from 5,100,100 to 172,100,100
2024-11-26 17:46:02.889 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - Channel ID color type class org.openhab.core.library.types.HSBType
2024-11-26 17:46:04.578 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:46:04.596 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":38,"color":{"r":0,"g":255,"b":221},"colorTemInKelvin":0}}}
2024-11-26 17:46:04.596 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:46:06.587 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:46:06.597 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":38,"color":{"r":0,"g":255,"b":221},"colorTemInKelvin":0}}}
2024-11-26 17:46:06.598 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:46:06.762 [INFO ] [openhab.event.ItemCommandEvent                                                  ] - Item 'GoveeLightBrightness' received command 100.0  # effective brightness 100
2024-11-26 17:46:06.766 [INFO ] [openhab.event.ItemStateChangedEvent                                             ] - Item 'GoveeLightBrightness' changed from 38.0 to 100.0
2024-11-26 17:46:06.770 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - Channel ID color type class org.openhab.core.library.types.PercentType
2024-11-26 17:46:08.589 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:46:08.596 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":100,"color":{"r":0,"g":255,"b":221},"colorTemInKelvin":0}}}
2024-11-26 17:46:08.597 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:46:10.590 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:46:10.598 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":100,"color":{"r":0,"g":255,"b":221},"colorTemInKelvin":0}}}
2024-11-26 17:46:10.599 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:46:12.592 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:46:12.604 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":100,"color":{"r":0,"g":255,"b":221},"colorTemInKelvin":0}}}
2024-11-26 17:46:12.605 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:46:14.593 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:46:14.600 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":100,"color":{"r":0,"g":255,"b":221},"colorTemInKelvin":0}}}
2024-11-26 17:46:14.601 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:46:16.595 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:46:16.603 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":100,"color":{"r":0,"g":255,"b":221},"colorTemInKelvin":0}}}
2024-11-26 17:46:16.603 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:46:18.406 [INFO ] [openhab.event.ItemCommandEvent                                                  ] - Item 'GoveeLightColor' received command 172,100,9  # effective brightness 9
2024-11-26 17:46:18.410 [INFO ] [openhab.event.ItemStateChangedEvent                                             ] - Item 'GoveeLightColor' changed from 172,100,100 to 172,100,9
2024-11-26 17:46:18.413 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - Channel ID color type class org.openhab.core.library.types.HSBType
2024-11-26 17:46:18.596 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:46:18.604 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":100,"color":{"r":0,"g":23,"b":20},"colorTemInKelvin":0}}}
2024-11-26 17:46:18.605 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:46:20.596 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:46:20.604 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":100,"color":{"r":0,"g":23,"b":20},"colorTemInKelvin":0}}}
2024-11-26 17:46:20.604 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:46:22.436 [INFO ] [openhab.event.ItemCommandEvent                                                  ] - Item 'GoveeLightBrightness' received command 6.0  # effective dim, less than 6 or 9, more like 6% of 9%
2024-11-26 17:46:22.440 [INFO ] [openhab.event.ItemStateChangedEvent                                             ] - Item 'GoveeLightBrightness' changed from 100.0 to 6.0
2024-11-26 17:46:22.444 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - Channel ID color type class org.openhab.core.library.types.PercentType
2024-11-26 17:46:22.597 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:46:22.605 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":6,"color":{"r":0,"g":23,"b":20},"colorTemInKelvin":0}}}
2024-11-26 17:46:22.606 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:46:24.601 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:46:24.609 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":6,"color":{"r":0,"g":23,"b":20},"colorTemInKelvin":0}}}
2024-11-26 17:46:24.609 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:46:26.602 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:46:26.610 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":6,"color":{"r":0,"g":23,"b":20},"colorTemInKelvin":0}}}
2024-11-26 17:46:26.610 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:46:28.603 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:46:28.612 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":6,"color":{"r":0,"g":23,"b":20},"colorTemInKelvin":0}}}

second case

2024-11-26 17:52:46.341 [INFO ] [openhab.event.ItemCommandEvent                                                  ] - Item 'GoveeLightColor' received command 5,100,49
2024-11-26 17:52:46.345 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - Channel ID color type class org.openhab.core.library.types.HSBType
2024-11-26 17:52:46.346 [INFO ] [openhab.event.ItemStateChangedEvent                                             ] - Item 'GoveeLightColor' changed from 0,100,49 to 5,100,49
2024-11-26 17:52:46.932 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:52:46.942 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":100,"color":{"r":125,"g":10,"b":0},"colorTemInKelvin":0}}}
2024-11-26 17:52:46.943 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:52:48.934 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:52:48.945 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":100,"color":{"r":125,"g":10,"b":0},"colorTemInKelvin":0}}}
2024-11-26 17:52:48.946 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:52:50.935 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:52:50.945 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":100,"color":{"r":125,"g":10,"b":0},"colorTemInKelvin":0}}}
2024-11-26 17:52:50.946 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:52:52.936 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:52:52.946 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":100,"color":{"r":125,"g":10,"b":0},"colorTemInKelvin":0}}}
2024-11-26 17:52:52.946 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:52:53.060 [INFO ] [openhab.event.ItemCommandEvent                                                  ] - Item 'GoveeLightColorTemperatureAbs' received command 5500 K
2024-11-26 17:52:53.065 [INFO ] [openhab.event.ItemStateChangedEvent                                             ] - Item 'GoveeLightColorTemperatureAbs' changed from 5526.85 °C to 5226.85 °C
2024-11-26 17:52:53.070 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - Channel ID color-temperature-abs type class org.openhab.core.library.types.QuantityType
2024-11-26 17:52:53.070 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - Color Temperature Absolute change with Percent Type 5500 K
2024-11-26 17:52:53.071 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - COLOR_TEMPERATURE_ABS: lastColorTempInKelvin 5500
2024-11-26 17:52:53.071 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - computed lastColorTempInPercent 50
2024-11-26 17:52:53.071 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - sendColorTemp 5500
2024-11-26 17:52:54.937 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:52:54.947 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":100,"color":{"r":125,"g":10,"b":0},"colorTemInKelvin":5500}}}
2024-11-26 17:52:54.948 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:52:56.938 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:52:56.951 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":100,"color":{"r":125,"g":10,"b":0},"colorTemInKelvin":5500}}}
2024-11-26 17:52:56.952 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:52:57.055 [INFO ] [openhab.event.ItemCommandEvent                                                  ] - Item 'GoveeLightBrightness' received command 12.0
2024-11-26 17:52:57.059 [INFO ] [openhab.event.ItemStateChangedEvent                                             ] - Item 'GoveeLightBrightness' changed from 100.0 to 12.0
2024-11-26 17:52:57.063 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - Channel ID color type class org.openhab.core.library.types.PercentType
2024-11-26 17:52:58.940 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:52:58.951 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":12,"color":{"r":125,"g":10,"b":0},"colorTemInKelvin":5500}}}
2024-11-26 17:52:58.952 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:53:00.941 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:53:00.955 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":12,"color":{"r":125,"g":10,"b":0},"colorTemInKelvin":5500}}}
2024-11-26 17:53:00.955 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:53:02.943 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:53:02.958 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":12,"color":{"r":125,"g":10,"b":0},"colorTemInKelvin":5500}}}
2024-11-26 17:53:02.959 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:53:04.944 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:53:04.965 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":12,"color":{"r":125,"g":10,"b":0},"colorTemInKelvin":5500}}}
2024-11-26 17:53:04.965 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:53:06.957 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:53:06.965 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":12,"color":{"r":125,"g":10,"b":0},"colorTemInKelvin":5500}}}
2024-11-26 17:53:06.966 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:53:08.958 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:53:08.969 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":12,"color":{"r":125,"g":10,"b":0},"colorTemInKelvin":5500}}}
2024-11-26 17:53:08.969 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:53:10.912 [INFO ] [openhab.event.ItemCommandEvent                                                  ] - Item 'GoveeLightColor' received command 0,100,49
2024-11-26 17:53:10.914 [INFO ] [openhab.event.ItemStateChangedEvent                                             ] - Item 'GoveeLightColor' changed from 5,100,49 to 0,100,49
2024-11-26 17:53:10.916 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - Channel ID color type class org.openhab.core.library.types.HSBType
2024-11-26 17:53:10.959 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:53:10.967 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":12,"color":{"r":125,"g":0,"b":0},"colorTemInKelvin":0}}}
2024-11-26 17:53:10.967 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:53:12.786 [INFO ] [openhab.event.ItemCommandEvent                                                  ] - Item 'GoveeLightColor' received command 0,100,100
2024-11-26 17:53:12.790 [INFO ] [openhab.event.ItemStateChangedEvent                                             ] - Item 'GoveeLightColor' changed from 0,100,49 to 0,100,100
2024-11-26 17:53:12.790 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - Channel ID color type class org.openhab.core.library.types.HSBType
2024-11-26 17:53:12.960 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:53:12.969 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":12,"color":{"r":255,"g":0,"b":0},"colorTemInKelvin":0}}} # there should be a brightness of 100
2024-11-26 17:53:12.970 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-26 17:53:14.961 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-26 17:53:14.970 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":12,"color":{"r":255,"g":0,"b":0},"colorTemInKelvin":0}}}

@andrewfg
Copy link
Contributor

however I also set org.openhab.binding.govee.internal.CommunicationManager to ERROR

Again many thanks; but I really really need TRACE on everything please.

@andrewfg
Copy link
Contributor

^
And can you please tell me one more thing. If the lamp is OFF and you send a color temperature command. does it turn ON? And if so what is its perceived brightness?

@andrewfg
Copy link
Contributor

The effective brightness seems to be the product of the color and brightness channel

Yes. I am beginning to suspect that the binding has currently a big problem. Internally it has two control paths -- namely the color RGB and the brightness path. And it looks like the binding is commanding the brightness via BOTH paths -- i.e. by reducing the RGB values path AND by the brightness path. That would indeed result in a multiplication effect.

I am working on a solution to resolve this. And I would very much appreciate to have your testing support.

@felixschndr
Copy link
Contributor Author

however I also set org.openhab.binding.govee.internal.CommunicationManager to ERROR

Again many thanks; but I really really need TRACE on everything please.

Sorry, bad communication from my side. The first logs were with incorrect loglevel. The second logs were with everything set to TRACE. Or would you expect any more logs?


And can you please tell me one more thing. If the lamp is OFF and you send a color temperature command. does it turn ON? And if so what is its perceived brightness?

Will try in the afternoon today and get back to you.


I am working on a solution to resolve this. And I would very much appreciate to have your testing support.

Thank you very much for your work! You can send me a debug build any time and I will try it ASAP :)
P.S. I am currently on OH 4.2.0

@andrewfg
Copy link
Contributor

Ok I am working on it today. I may have a new Jar this evening. I am building on OH V4.3 but it should probably work on your V4.2 system.

@andrewfg andrewfg linked a pull request Nov 27, 2024 that will close this issue
@andrewfg
Copy link
Contributor

@felixschndr see #17812

@felixschndr
Copy link
Contributor Author

felixschndr commented Nov 27, 2024

And can you please tell me one more thing. If the lamp is OFF and you send a color temperature command. does it turn ON? And if so what is its perceived brightness?

These are the logs for the old/stable binding:
The lamp turns on at the brightness (brightness channel, not the brightness of the color) it was on before turning off.
The brightness of the color channel is ignored, the lamp always turns on to the brightness of the brightness channel.

Logs of 100% brightness -> lamp off -> send color temp

2024-11-27 15:35:55.120 [INFO ] [openhab.event.ItemCommandEvent                                                  ] - Item 'GoveeLightColor' received command OFF
2024-11-27 15:35:55.125 [INFO ] [openhab.event.ItemStateChangedEvent                                             ] - Item 'GoveeLightColor' changed from 0,100,100 to 0,100,0
2024-11-27 15:35:55.129 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - Channel ID color type class org.openhab.core.library.types.OnOffType
2024-11-27 15:35:55.131 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Sending {"msg":{"cmd":"turn","data":{"value":0}}} to arbeitszimmer-deckenlampe.fs
2024-11-27 15:35:55.749 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-27 15:35:55.750 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Sending {"msg":{"cmd":"devStatus","data":{}}} to arbeitszimmer-deckenlampe.fs
2024-11-27 15:35:55.765 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":0,"brightness":100,"color":{"r":255,"g":0,"b":0},"colorTemInKelvin":4100}}}
2024-11-27 15:35:55.766 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-27 15:35:57.751 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-27 15:35:57.752 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Sending {"msg":{"cmd":"devStatus","data":{}}} to arbeitszimmer-deckenlampe.fs
2024-11-27 15:35:57.761 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":0,"brightness":100,"color":{"r":255,"g":0,"b":0},"colorTemInKelvin":4100}}}
2024-11-27 15:35:57.762 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.

2024-11-27 15:35:59.753 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-27 15:35:59.753 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Sending {"msg":{"cmd":"devStatus","data":{}}} to arbeitszimmer-deckenlampe.fs
2024-11-27 15:35:59.760 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":0,"brightness":100,"color":{"r":255,"g":0,"b":0},"colorTemInKelvin":4100}}}
2024-11-27 15:35:59.760 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-27 15:36:00.913 [INFO ] [openhab.event.ItemCommandEvent                                                  ] - Item 'GoveeLightColorTemperatureAbs' received command 4000 K
2024-11-27 15:36:00.917 [INFO ] [openhab.event.ItemStateChangedEvent                                             ] - Item 'GoveeLightColorTemperatureAbs' changed from 5226.85 °C to 3726.85 °C
2024-11-27 15:36:00.920 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - Channel ID color-temperature-abs type class org.openhab.core.library.types.QuantityType
2024-11-27 15:36:00.921 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - Color Temperature Absolute change with Percent Type 4000 K
2024-11-27 15:36:00.921 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - COLOR_TEMPERATURE_ABS: lastColorTempInKelvin 4000
2024-11-27 15:36:00.922 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - computed lastColorTempInPercent 28
2024-11-27 15:36:00.922 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - sendColorTemp 4000
2024-11-27 15:36:00.926 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Sending {"msg":{"cmd":"colorwc","data":{"color":{"r":0,"g":0,"b":0},"colorTemInKelvin":4000}}} to arbeitszimmer-deckenlampe.fs
2024-11-27 15:36:01.754 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-27 15:36:01.755 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Sending {"msg":{"cmd":"devStatus","data":{}}} to arbeitszimmer-deckenlampe.fs
2024-11-27 15:36:01.763 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":100,"color":{"r":255,"g":0,"b":0},"colorTemInKelvin":4000}}}

Logs of 19% brightness -> lamp off -> send color temp

2024-11-27 15:36:13.942 [INFO ] [openhab.event.ItemCommandEvent                                                  ] - Item 'GoveeLightBrightness' received command 19.0
2024-11-27 15:36:13.946 [INFO ] [openhab.event.ItemStateChangedEvent                                             ] - Item 'GoveeLightBrightness' changed from 100.0 to 19.0
2024-11-27 15:36:13.950 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - Channel ID color type class org.openhab.core.library.types.PercentType
2024-11-27 15:36:13.951 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Sending {"msg":{"cmd":"brightness","data":{"value":19}}} to arbeitszimmer-deckenlampe.fs
2024-11-27 15:36:15.180 [INFO ] [openhab.event.ItemCommandEvent                                                  ] - Item 'GoveeLightColor' received command OFF
2024-11-27 15:36:15.184 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - Channel ID color type class org.openhab.core.library.types.OnOffType
2024-11-27 15:36:15.185 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Sending {"msg":{"cmd":"turn","data":{"value":0}}} to arbeitszimmer-deckenlampe.fs
2024-11-27 15:36:15.774 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-27 15:36:15.775 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Sending {"msg":{"cmd":"devStatus","data":{}}} to arbeitszimmer-deckenlampe.fs
2024-11-27 15:36:15.784 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":0,"brightness":19,"color":{"r":255,"g":0,"b":0},"colorTemInKelvin":4000}}}
2024-11-27 15:36:15.785 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-27 15:36:16.552 [INFO ] [openhab.event.ItemCommandEvent                                                  ] - Item 'GoveeLightColorTemperatureAbs' received command 4900 K
2024-11-27 15:36:16.558 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - Channel ID color-temperature-abs type class org.openhab.core.library.types.QuantityType
2024-11-27 15:36:16.563 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - Color Temperature Absolute change with Percent Type 4900 K
2024-11-27 15:36:16.563 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - COLOR_TEMPERATURE_ABS: lastColorTempInKelvin 4900
2024-11-27 15:36:16.564 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - computed lastColorTempInPercent 41
2024-11-27 15:36:16.564 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - sendColorTemp 4900
2024-11-27 15:36:16.564 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Sending {"msg":{"cmd":"colorwc","data":{"color":{"r":0,"g":0,"b":0},"colorTemInKelvin":4900}}} to arbeitszimmer-deckenlampe.fs
2024-11-27 15:36:16.565 [INFO ] [openhab.event.ItemStateChangedEvent                                             ] - Item 'GoveeLightColorTemperatureAbs' changed from 3726.85 °C to 4626.85 °C
2024-11-27 15:36:17.776 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-27 15:36:17.777 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Sending {"msg":{"cmd":"devStatus","data":{}}} to arbeitszimmer-deckenlampe.fs
2024-11-27 15:36:17.790 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":19,"color":{"r":255,"g":0,"b":0},"colorTemInKelvin":4900}}}
2024-11-27 15:36:17.791 [WARN ] [org.openhab.binding.govee.internal.CommunicationManager                         ] - thing Handler for 192.168.4.237 couldn't be found.
2024-11-27 15:36:19.778 [DEBUG] [org.openhab.binding.govee.internal.GoveeHandler                                 ] - trigger Refresh Status of device Govee Light
2024-11-27 15:36:19.780 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Sending {"msg":{"cmd":"devStatus","data":{}}} to arbeitszimmer-deckenlampe.fs
2024-11-27 15:36:19.793 [TRACE] [org.openhab.binding.govee.internal.CommunicationManager                         ] - Response from 192.168.4.237 = {"msg":{"cmd":"devStatus","data":{"onOff":1,"brightness":19,"color":{"r":255,"g":0,"b":0},"colorTemInKelvin":4900}}}

@felixschndr see #17812

Will eat something now, then try and come back to you

@andrewfg
Copy link
Contributor

^
Perfect (re both the log and the lunch..)

@felixschndr
Copy link
Contributor Author

See the comments in the PR. Let's stick to that for discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants