esphome / issues

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

Intense LED flash when connecting power to H801 controller #1783

Closed MattiasC closed 3 years ago

MattiasC commented 3 years ago

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

Home Assistant OS

ESP (ESP32/ESP8266, Board/Sonoff):

platform: ESP8266 board: esp01_1m

ESPHome version (latest production, beta, dev branch)

1.15.3

Affected component:

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

Description of problem: When applying power to the controller all leds flash for a short time, like a camera flash.

Problem-relevant YAML-configuration entries:

# https://kvvhost.ru/2019/07/12/review-h801/
esphome:
  name: ---
  platform: ESP8266
  board: esp01_1m
  on_shutdown:
    then:
      - output.turn_off: output_blue
      - output.turn_off: output_green
      - output.turn_off: output_red
      - output.turn_off: output_white1
      - output.turn_off: output_white2

wifi:
  ssid: ---
  password: ---
  #manual_ip:
    # Set this to the IP of the ESP
    #static_ip: ---
    # Set this to the IP address of the router. Often ends with .1
    #gateway: ---
    # The subnet of the network. 255.255.255.0 works for most home networks.
    #subnet: ---

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: ---
    password: ---

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: ---

ota:
  password: ---

sensor:
  - platform: wifi_signal
    name: ---
    update_interval: 60s

#
output:
  # Blue
  - platform: esp8266_pwm
    pin: 12
    max_power: 0.95
    frequency: 1000 Hz
    id: output_blue

  # Green
  - platform: esp8266_pwm
    pin: 13
    max_power: 0.95
    frequency: 1000 Hz
    id: output_green

  # Red
  - platform: esp8266_pwm
    pin: 15
    max_power: 0.95
    frequency: 1000 Hz
    id: output_red

  # Cold white
  - platform: esp8266_pwm
    pin: 14
    max_power: 0.95
    frequency: 1000 Hz
    id: output_coldwhite

  # Warm white
  - platform: esp8266_pwm
    pin: 4
    max_power: 0.95
    frequency: 1000 Hz
    id: output_warmwhite

light:
- platform: rgbww
  name: "Golvlampan i kontoret"
  red: output_red
  green: output_green
  blue: output_blue
  cold_white: output_coldwhite
  warm_white: output_warmwhite
  cold_white_color_temperature: 6536 K
  warm_white_color_temperature: 2000 K

Logs (if applicable):

N/A

Additional information and things you've tried: This is the controller: https://translate.google.com/translate?sl=auto&tl=en&u=https://kvvhost.ru/2019/07/12/review-h801/

I have tried using on_boot to set all outputs to 0 as early as possible by changing the priority, but it made no difference, I suspect I can't get it to execute early enough.

I found this issue which was reported in Tasmota: https://github.com/arendst/Tasmota/issues/649 which handles the same problem.

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.

MattiasC commented 3 years ago

Recompiled with ESPHome 1.18.0 and the issue has been resolved.