openhab-addons: [Govee] Brightness Channel is not in sync with color channel

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^^).

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (15 by maintainers)

Commits related to this issue

Most upvoted comments

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

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.

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.