esphome / issues

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

CCT Bulb troubles.. temperature and brightness control shenanigans. #4950

Open remlei opened 1 year ago

remlei commented 1 year ago

The problem

Basically its messed up

CCT bulb controls are buggy at best.

the pins are correct. I can control the bulb correctly using openbeken firmware. but not esphome.

Which version of ESPHome has the issue?

2023.9.3

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2023.8

What platform are you using?

libretiny

Board

generic-bk7231n-qfn32-tuya

Component causing the issue

No response

Example YAML snippet

esphome:
  name: crabtek-a65-cct
  friendly_name: smartbulb_cct
  name_add_mac_suffix: false

bk72xx:
  board: generic-bk7231n-qfn32-tuya

logger:

web_server:
  port: 80
api:
ota:
captive_portal:
mdns:

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  ap:
    ssid: ${name}AP
    password: "ESPNotHome"

button:
- platform: restart
  name: Restart

debug:
  update_interval: 30s

text_sensor:
- platform: debug
  reset_reason:
    name: Reset Reason
- platform: libretiny
  version:
    name: LibreTiny Version

sensor:
- platform: uptime
  name: Uptime

output:
  - platform: libretiny_pwm
    id: brightness_pwm
    pin: P7
  - platform: libretiny_pwm
    id: color_temp_pwm
    pin: P8

light:
  - platform: color_temperature
    name: "crabtek_a65_cct"
    color_temperature: color_temp_pwm
    brightness: brightness_pwm
    cold_white_color_temperature: 6500 K
    warm_white_color_temperature: 2700 K

Anything in the logs that might be useful for us?

No response

Additional information

No response

agreenfield1 commented 1 year ago

I’ve been using the libretiny platform for a bit and I’m thinking there may be some issues with libretiny_pwm. I have two different rgbww lights and the color selection works usually, but sometimes gets way off or wont set a chosen color at all. For testing I set up the light as five independent lights in esphome and would sometimes get unexpected interactions between them.

patagonaa commented 10 months ago

possibly related to https://github.com/libretiny-eu/libretiny/issues/200 (which is fixed in libretiny now), which causes PWM outputs to stop working when turning them off and on again

Until ESPHome comes with this new framework version, you can try replacing bk72xx: with

bk72xx:
  framework:
    version: 0.0.0
    source: https://github.com/libretiny-eu/libretiny.git

in your device yaml to check if that is/was the issue

ChuckMash commented 9 months ago

possibly related to libretiny-eu/libretiny#200 (which is fixed in libretiny now), which causes PWM outputs to stop working when turning them off and on again

Until ESPHome comes with this new framework version, you can try replacing bk72xx: with

bk72xx:
  framework:
    version: 0.0.0
    source: https://github.com/libretiny-eu/libretiny.git

in your device yaml to check if that is/was the issue

I am having this same issue, using the patched source has corrected it.

Hopefully, we can get this fix into ESPHome


I've made a video showing both the above issue, and the above solution. https://www.youtube.com/watch?v=U2H-pdLK2CY

remlei commented 9 months ago

thanks for the fix, yes using that specific framework did fix the issue on my side, no major changes at all with the yaml file aside from adding the extra lines for framework. I hope esphome pull the fixes soon.