esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
290 stars 34 forks source link

Can't control warm white brightness on RGBW LED #1213

Closed ofalvai closed 3 years ago

ofalvai commented 4 years ago

Operating environment/Installation (Hass.io/Docker/pip/etc.):

pip, v1.15.0-dev

ESP (ESP32/ESP8266, Board/Sonoff):

ESP8266 (inside a H801 LED controller)

Affected component:

RGBW light

Description of problem:

After updating from the latest stable release to the latest dev, I can't control the warm white LED independently from the main brightness setting (which controls the brightness of the R, G and B leds).

This setting used to set the warm white LED led to 100% brightness while turning off the other LEDs (regardless of the selected color): image

Now every LED is disabled in this state, the warm white LED only turns on if I increase the brightness slider (which increases the brightness of all the LEDs at once)

Problem-relevant YAML-configuration entries:

output:
  - platform: esp8266_pwm
    pin: 12
    frequency: 1000 Hz
    id: pwm_b
    max_power: 80%
  - platform: esp8266_pwm
    pin: 13
    frequency: 1000 Hz
    id: pwm_g
  - platform: esp8266_pwm
    pin: 15
    frequency: 1000 Hz
    id: pwm_r
  - platform: esp8266_pwm
    pin: 14
    frequency: 1000 Hz
    id: pwm_w

light:
  - platform: rgbw
    name: "Desk LED strip"
    red: pwm_r
    green: pwm_g
    blue: pwm_b
    white: pwm_w

Logs (if applicable):

This is the log if I first increase the white slider then the brightness:

[13:29:32][D][light:264]: 'Desk LED strip' Setting:
[13:29:32][D][light:286]:   Red=100%, Green=100%, Blue=100%
[13:29:32][D][light:289]:   White Value: 24%
[13:29:32][D][light:303]:   Transition Length: 1.0s
[13:29:33][D][light:264]: 'Desk LED strip' Setting:
[13:29:33][D][light:286]:   Red=100%, Green=100%, Blue=100%
[13:29:33][D][light:289]:   White Value: 57%
[13:29:33][D][light:303]:   Transition Length: 1.0s
[13:29:34][D][light:264]: 'Desk LED strip' Setting:
[13:29:34][D][light:286]:   Red=100%, Green=100%, Blue=100%
[13:29:34][D][light:289]:   White Value: 81%
[13:29:34][D][light:303]:   Transition Length: 1.0s
[13:29:34][D][light:264]: 'Desk LED strip' Setting:
[13:29:34][D][light:286]:   Red=100%, Green=100%, Blue=100%
[13:29:34][D][light:289]:   White Value: 100%
[13:29:34][D][light:303]:   Transition Length: 1.0s
[13:29:55][D][light:264]: 'Desk LED strip' Setting:
[13:29:55][D][light:277]:   Brightness: 17%
[13:29:55][D][light:303]:   Transition Length: 1.0s
[13:29:56][D][light:264]: 'Desk LED strip' Setting:
[13:29:56][D][light:277]:   Brightness: 67%
[13:29:56][D][light:303]:   Transition Length: 1.0s

Additional information and things you've tried:

ofalvai commented 4 years ago

I think I tracked it down to this change: https://github.com/esphome/esphome/pull/925/files#diff-bfa351b24f2e7a768492e0dec67e4105L188

While I understand the reasoning behind the PR, this behavior makes it impossible to control the warm white level in case of RGBW lights (where the maximum cold white level is R=G=B=100%)

pinkeen commented 4 years ago

Seconded. Same problem here. I cannot get warm white using rgbww strip because white enables the rgb components too at the same time as ww producing cold white.

On the other hand the light seems nice with single chip strip so that got me thinking that it would be possible to control temperature with this kind of strip without cw component. I'm willing to implement this if this is something that could be merged into mainline. Option to have light temp control with rgbww leds is very appealing and could be a killer, distinguishing feature IMO. (Obviously the effect won't be as good with strips with separate rgb and ww chips.)

BTW Ive got a couple of yeelight bulbs and bringing the saturation down seems to add white led to the mix thus keeping the brightness at a nice level. As this is a software-only feature it would be neat to have it also.

ivanovd commented 3 years ago

Any updates on this? I updated to the latest version of ESPHome and now I cannot independently control the White channel without messing with the brightness of the RGB LEDs.

Thankfully I keep the old bin, however, I cannot make adjustments to the yaml configuration now as it will bring the new behavior back.

peterforeman commented 3 years ago

I was already wondering why my RGBW (actually, the W) strips did not seem to work anymore. Can we get this fixed? It breaks significant functionality.

speldos commented 3 years ago

Same here. Ww is not working as before. If i increase ww the rgb tuns to bright white.

probot-esphome[bot] commented 3 years ago

rgbww source rgbww issues rgbww recent changes (message by IssueLinks)

probot-esphome[bot] commented 3 years ago

rgbw source rgbw issues rgbw recent changes (message by IssueLinks)

CornHead764 commented 3 years ago

Stumbled upon this thread while troubleshooting a similar problem... Does the color_interlock option solve your problem?

https://esphome.io/components/light/rgbw.html

Here's some copy/paste:

color_interlock (Optional, boolean): When enabled, this will prevent white leds being on at the same time as RGB leds. See Color Interlock for more information. Defaults to false.

Color Interlock With some LED bulbs, setting the RGB channels to maximum whilst wanting a white light will have a undesired hue affect. Additionally, the brightness command may not work as expected depending upon configuration, leaving users to adjust the white component level separately. For these cases a new configration variable has been added: color_interlock.

Setting this variable to True will turn off RGB leds when white value is above 0 (or if they are to 255,255,255) and turn off white leds if color is not set to 255,255,255. This also allows the brightness parameter to control the intensity of the white leds.

margau commented 3 years ago

Can you have a look, maybe https://github.com/esphome/esphome/pull/1325 also solves this issued?

MattXcz commented 3 years ago

I will try it today

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

SpacebarStar commented 3 years ago

Hey, is there any update on this? I'm still experiencing exactly the same issue with the Home Assistant add-on version 1.16.2

nickyivyca commented 3 years ago

I'm still experiencing this as well. With 1.16.2, same behavior as the original post here. https://github.com/esphome/esphome/pull/1325 Did not fix the issue apparently.

I forked and made a repo which reverts a few changes to fix the issue (interlock completely disabled). As mentioned above https://github.com/esphome/esphome/pull/925/files#diff-bfa351b24f2e7a768492e0dec67e4105L188 had to be reverted in the end.

MattXcz commented 3 years ago

Best workaround is to use RGB + W as seperte light.

YSmetana commented 3 years ago

Same here. From 1.16.2 can not use my light automation properly (controlling W-channel separatelly).

craggyh commented 3 years ago

This seems to have broken White control on neopixel RBGW lights. I have 3 sets of leds and since updating them to latest version of esphome I'm unable to have white only lighting. The RGB channels are always enabled and can't turn them down when the white channel is turned up. This leaves the colour as kind of blueish. I tried using color_interlock: false but this won't compile as i presume it's only supported on RGBW platform.

MattXcz commented 3 years ago

This seems to have broken White control on neopixel RBGW lights. I have 3 sets of leds and since updating them to latest version of esphome I'm unable to have white only lighting. The RGB channels are always enabled and can't turn them down when the white channel is turned up. This leaves the colour as kind of blueish.

I tried using color_interlock: false but this won't compile as i presume it's only supported on RGBW platform.

You can set it as two separate lights... monochrome white + RGB if that fits you.