Code Monkey home page Code Monkey logo

esphome-yeelight-ceiling-light's Introduction

esphome-yeelight-ceiling-light

GitHub actions GitHub stars GitHub forks GitHub watchers "Buy Me A Coffee"

Esphome custom firmware for some Yeelight Ceiling Lights.

Requirements

Supported devices

Name Model Model no. Specs
Yeelight Ceiling Light YLXD76YL yeelink.light.ceil26 YLXD76YL AC220V, 23W, 1500lm, 2700K-6500K, 32cm
Yeelight XianYu C2001C550 yeelink.light.ceil26 C2001C550 AC220V, 50W, 2700K-6500K, 55.5cm
Yeelight XianYu C2001C450 yeelink.light.ceil26 C2001C450 AC220V, 50W, 2700K-6500K, 45.5cm
Yeelight XianYu C2001S500 (untested!) yeelink.light.ceil26(?) C2001S500 AC220V, 50W, 2700K-6500K, 50.5x50.5cm
Yeelight 1S YLDD05Y Lightstrip yeelink.light.strip6 YLDD05Y AC220V, 50W, RGB
Yeelight Meteorite Ceiling Light yeelink.light.ceiling10 YLDL01YL AC220V, 33W, 2700K-6500K, 7W RGB ambient light, 90x7x4 cm
Yeelight Ceiling Light YLXD42YL yeelink.light.ceiling15 YLXD42YL AC220V, 32W, 2200lm, 2700K-6500K, 48cm
Yeelight Ceiling Light YLXD41YL yeelink.light.ceiling11 YLXD41YL AC220V, 28W, 1800lm, 2700K-6500K, 32cm
Yeelight Staria Bedside LED yeelink.light.lamp9 YLCT02YL AC220V, 20W, 350lm, 2700K-6500K, without charger
Yeelight Staria Pro Bedside LED yeelink.light.lamp9 YLCT03YL AC220V, 20W, 350lm, 2700K-6500K, Qi charger
Mi Smart LED Ceiling Light yeelink.light.ceiling22 MJXDD001 / MJXDD01SYL AC220V, 45W, 3100lm, 2700K-6000K, 45cm
Yeelight Ceiling Light YLXD50YL yeelink.light.ceiling20 YLXD50YL AC220V, 50W, 3100lm, 2700K-6500K, RGB ambient light, 47cm
Yeelight Arwen 450C yeelight.light.ceilc YLXD013-B AC220V, 50W, 4000lm, 2700K-6500K, RGB ambient light, 50cm
Yeelight Arwen 450S yeelight.light.ceilc YLXD013 AC220V, 50W, 3000lm, 2700K-6500K, RGB ambient light, 45cm
Yeelight Arwen 550C yeelight.light.ceilc YLXD013-C AC220V, 50W, 4500lm, 2700K-6500K, RGB ambient light, 60cm
Yeelight Arwen 550S yeelight.light.ceilb YLXD013-A AC220V, 50W, 3500lm, 2700K-6500K, RGB ambient light, 55cm
Yeelight Arwen A2001 450 yeelight.light.ceil29 YLXD032 AC220V, 50W, 4500lm, 2700K-6500K, 50cm
Yeelight Arwen A2001 550 yeelight.light.ceil29 YLXD031 AC220V, 50W, 4800lm, 2700K-6500K, 60cm
Yeelight Ceiling Light 235C yeelight.light.ceil20 YLXDD-0030 AC220V, 18W, 1200lm, 2700K-6500K, RGB ambient light
Yeelight Ceiling Light 300C yeelight.light.ceil20 YLXDD-0033 AC220V, 21W, 1600lm, 2700K-6500K, RGB ambient light
Yeelight Ceiling Light 400C yeelight.light.ceil20 YLXDD-0034 AC220V, 24W, 2000lm, 2700K-6500K, RGB ambient light

More esphome + yeelight projects

Features

yeelink.light.ceil26, yeelink.light.ceiling22

  • Light (CCWW)
    • Brightness
    • Color temperature (2700K-6500K)
  • Nightlight (2700K)
    • Brightness
  • Sensor
    • Power supply voltage (ESP32 VCC)

yeelink.light.ceiling10, yeelink.light.ceiling20, yeelight.light.ceilb, yeelight.light.ceilc

  • Light (CCWW)
    • Brightness
    • Color temperature (2700K-6500K)
  • Nightlight (2700K)
    • Brightness
  • Ambient light (RGB)
    • Brightness
    • Color
  • Sensor
    • ADC1
    • ADC2

yeelight.light.ceil29

  • Light (CCWW)
    • Brightness
    • Color temperature (2700K-6500K)
  • Nightlight (2700K)
    • Brightness
  • Sensor
    • ADC1
    • ADC2

yeelink.light.ceiling15, yeelink.light.ceiling11

  • Light (CCWW)
    • Brightness
    • Color temperature (2700K-6500K)
  • Nightlight (2700K)
    • Brightness
  • Sensor
    • ADC1
    • ADC2

yeelink.light.lamp9, yeelink.light.lampX

  • Power button
  • Light (CCWW)
    • Brightness
    • Color temperature (2700K-6500K)
  • Nightlight (2700K)
    • Brightness

yeelink.light.strip6

  • Light strip (RGB)
    • Brightness
    • Color

Known bugs

Bootloop when BLE Tracker configured. Luckily ESPHome goes into safe mode after 10 unsuccessful boot attempts by default. So the device can be flashed OTA nevertheless.

Bootlog
[11:59:23]ets Jun  8 2016 00:22:57
[11:59:23]
[11:59:23]rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[11:59:23]configsip: 0, SPIWP:0xee
[11:59:23]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[11:59:23]mode:DIO, clock div:2
[11:59:23]load:0x3fff0018,len:4
[11:59:23]load:0x3fff001c,len:1044
[11:59:23]load:0x40078000,len:8896
[11:59:23]load:0x40080400,len:5828
[11:59:23]entry 0x400806ac
[11:59:23][I][logger:166]: Log initialized
[11:59:23][C][ota:366]: There have been 8 suspected unsuccessful boot attempts.
[11:59:23][I][app:029]: Running through setup()...
[11:59:23][C][power_supply:010]: Setting up Power Supply...
[11:59:23][C][light:097]: Setting up light 'unused_yeelight night light'...
[11:59:23][D][light:265]: 'unused_yeelight night light' Setting:
[11:59:23][D][light:278]:   Brightness: 100%
[11:59:23][C][light:097]: Setting up light 'unused_yeelight ceiling light'...
[11:59:23][D][light:265]: 'unused_yeelight ceiling light' Setting:
[11:59:23][D][light:278]:   Brightness: 100%
[11:59:23][D][light:282]:   Color Temperature: 1.0 mireds
[11:59:23][D][light:287]:   Red=100%, Green=100%, Blue=100%
[11:59:24][D][esp32_ble_tracker:148]: Starting scan...
[11:59:24][D][binary_sensor:034]: 'unused_yeelight Status': Sending initial state OFF
[11:59:24][C][adc:018]: Setting up ADC 'unused_yeelight power supply'...
[11:59:24][D][text_sensor:015]: 'unused_yeelight Esphome Version': Sending state '1.15.3 Feb 25 2021, 11:57:31'
[11:59:24][C][wifi:033]: Setting up WiFi...
[11:59:24][I][wifi:194]: WiFi Connecting to 'xxxxxxxx'...
[11:59:24][D][sensor:092]: 'unused_yeelight Uptime': Sending state 0.00001 days with 0 decimals of accuracy
[11:59:24][D][adc:056]: 'unused_yeelight power supply': Got voltage=3.90V
[11:59:24][D][sensor:092]: 'unused_yeelight power supply': Sending state 3.90000 V with 2 decimals of accuracy
[11:59:24][D][esp32_ble_tracker:544]: Found device 50:XX:XX:XX:XX:XX RSSI=-62
[11:59:24][D][esp32_ble_tracker:565]:   Address Type: PUBLIC
[11:59:24][D][esp32_ble_tracker:544]: Found device 49:XX:XX:XX:XX:XX RSSI=-91
[11:59:24][D][esp32_ble_tracker:565]:   Address Type: RANDOM
[11:59:29]E (6637) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
[11:59:29]E (6637) task_wdt:  - IDLE0 (CPU 0)
[11:59:29]E (6637) task_wdt: Tasks currently running:
[11:59:29]E (6637) task_wdt: CPU 0: loopTask
[11:59:29]E (6637) task_wdt: Aborting.
[11:59:29]abort() was called at PC 0x400ea723 on core 0
[11:59:29]
[11:59:29]Backtrace: 0x40091698:0x3ffbe520 0x400918a9:0x3ffbe540 0x400ea723:0x3ffbe560 0x4008494e:0x3ffbe580 0x4000bfed:0x3ffcdb20 0x4008f135:0x3ffcdb30 0x4008e28f:0x3ffcdb50 0x400d8df1:0x3ffcdb90 0x401df9c9:0x3ffcdc30 0x401dfa95:0x3ffcdc50 0x400e0959:0x3ffcdc70 0x400e3632:0x3ffcdcc0 0x400e8973:0x3ffcdf50 0x4008e535:0x3ffcdf70
WARNING Found stack trace! Trying to decode it
WARNING Decoded 0x40091698: invoke_abort at /home/paul/src/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:707
WARNING Decoded 0x400918a9: abort at /home/paul/src/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:707
WARNING Decoded 0x400ea723: task_wdt_isr at /home/paul/src/esp32-arduino-lib-builder/esp-idf/components/esp32/task_wdt.c:252
WARNING Decoded 0x4008494e: _xt_lowint1 at /home/paul/src/esp32-arduino-lib-builder/esp-idf/components/freertos/xtensa_vectors.S:1154
WARNING Decoded 0x4008f135: vTaskExitCritical at /home/paul/src/esp32-arduino-lib-builder/esp-idf/components/freertos/tasks.c:3507
WARNING Decoded 0x4008e28f: xQueueGenericReceive at /home/paul/src/esp32-arduino-lib-builder/esp-idf/components/freertos/queue.c:2520
WARNING Decoded 0x400d8df1: esphome::esp32_ble_tracker::ESP32BLETracker::loop() at /home/sebastian/esphome/unused_yeelight/src/esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp:241
WARNING Decoded 0x401df9c9: esphome::Component::call_loop() at /home/sebastian/esphome/unused_yeelight/src/esphome/core/component.cpp:111
WARNING Decoded 0x401dfa95: esphome::Component::call() at /home/sebastian/esphome/unused_yeelight/src/esphome/core/component.cpp:111
WARNING Decoded 0x400e0959: esphome::Application::setup() at /home/sebastian/esphome/unused_yeelight/src/esphome/core/application.cpp:50 (discriminator 2)
WARNING Decoded 0x400e3632: setup() at /home/sebastian/esphome/unused_yeelight/src/main.cpp:360
WARNING Decoded 0x400e8973: loopTask(void*) at /home/sebastian/.platformio/packages/framework-arduinoespressif32@src-ff59aeb8b43c3669326fe991d70309ba/cores/esp32/main.cpp:14
WARNING Decoded 0x4008e535: vPortTaskWrapper at /home/paul/src/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:403
[11:59:29]
[11:59:29]Rebooting...

GPIOs

yeelink.light.ceil26

Name Label ESP32 GPIO Stock firmware limits
Warm white PWM W GPIO19 0.4V - 1.5V
Cold white PWM C GPIO21 0.5V - 3.0V
Night light PWM NL GPIO23
Power supply GPIO STB GPIO23
VCC measurement ADC1 GPIO35
TXD TP5 GPIO1
RXD TP4 GPIO3
GPIO0 TP3 GPIO0
GND TP2 PIN1
3V3 TP1 PIN2
# Pinout of the pin header at the bottom of the LED driver board

   CW -->o o<-- WW
  3V3 -->o o<-- NC
  GND -->o o<-- NC
  STB -->o o<-- NC
 ADC1 -->o o<-- NL

Please use 3V3 and GND of the pin header to power the daugther board / the ESP32 if you flash the ESP32 the first time. The ESP32 will enter the serial bootloader when GPIO0 (test point TP3) is held low (GND) on reset / power.

yeelink.light.ceiling10

Name Label ESP32 GPIO Stock firmware limits
Warm white PWM W GPIO19 0.42V - 2.55V
Cold white PWM C GPIO21 0.41V - 2.51V
Night light PWM NL GPIO23 N/A
Red PWM R GPIO33
Green PWM G GPIO26
Blue PWM B GPIO27
Power supply GPIO ON/OFF GPIO22 3.08V / 0V
TXD TX GPIO1
RXD RX GPIO3
GPIO0 IO0 GPIO0

The ESP32 will enter the serial bootloader when GPIO0 (test point IO0 at the back) is held low (GND) on reset / power.

yeelink.light.ceiling11

see Yeelight Ceiling Light YLXD41YL The ESP32 will enter the serial bootloader when GPIO0 (test point IO0 at the back) is held low (GND) on reset / power.

yeelink.light.ceiling15

Name Label ESP32 GPIO Stock firmware limits
Warm white PWM W GPIO19 0.67V - 3.08V
Cold white PWM C GPIO21 0.67V - 3.08V
Night light PWM NL GPIO23 0.06V - 3.0V
VCC measurement ADC1 GPIO36 2.0V
VCC measurement ADC2 GPIO32 1.76V
TXD GPIO1
RXD GPIO3
GPIO0 TP1 GPIO0

The ESP32 will enter the serial bootloader when GPIO0 (test point TP1 at the back) is held low (GND) on reset / power.

  ADC1 NL  WW GND           O  -- GND
   |   |   |   |            O  -- TXD
   8   6   4   2            O  -- RXD
   |   |   |   |           [O] -- 3V3
   o   o   o   o

   o   o   o   o
   |   |   |   |
   7   5   3   1
   |   |   |   |
  3V3 ADC2 CW GND

yeelink.light.ceiling22

Name Label ESP32 GPIO Stock firmware limits
Warm white PWM W GPIO19 14% - 50% duty cycle
Cold white PWM C GPIO21 20% - 88% duty cycle
Night light PWM NL GPIO23 10% - 100% duty cycle
VCC measurement ADC1 GPIO36
Power supply GPIO STA GPIO22 3.3V / 0V
3.3V TP1
GND TP2
GPIO0 TP3 GPIO0
TXD TP4 GPIO1
RXD TP5 GPIO3

The ESP32 will enter the serial bootloader when GPIO0 (test point TP3 at the back) is held low (GND) on reset / power.

yeelink.light.ceiling20

Name Label ESP32 GPIO Stock firmware limits
3.3V 3.3 3.3V
GND GND GND
Red PWM R GPIO33
Green PWM G GPIO26
Blue PWM B GPIO27
Night Light PWM NC GPIO23
Power supply GPIO STA GPIO22 3.3V / 0V
Cold white PWM C GPIO21 3.16V
Warm white PWM W GPIO19 1.58V
TXD TP5 GPIO1
RXD TP4 GPIO3
GPIO0 TP3 GPIO0

The ESP32 will enter the serial bootloader when GPIO0 (test point IO0 at the back) is held low (GND) on reset / power.

yeelink.light.lamp9, yeelink.light.lampUNKNOWN

Name Label ESP32 GPIO Stock firmware limits
Warm white PWM GPIO2 0.226V - 3.28V
Cold white PWM GPIO27 0.194V - 3.28V
Night light PWM GPIO12 0.197V - 3.27V
Power supply GPIO GPIO4
Button GPIO14
TXD TX, TP9 GPIO1
RXD RX, TP10 GPIO3
GPIO0 TP next to C37 GPIO0
SCL (I2C) GPIO18
SDA (I2C) GPIO17
LED (YLCT03YL only) GPIO33
3.3V +, TP7 3.3V
GND -, TP8 GND

Disassembly

YLXD76YL

YLXD41YL

C2001C550

Remove the single safety screw on the back and rotate the cover counterclockwise.

YLDL01YL

The grey plastic frame can easily be removed with a credit card between the outer white body and the grey frame. It is just clipped into place. Kudos to @fhloston.

References, sources & inspiration:

YLXD42YL

Rotate the cover counterclockwise.

YLCT02YL

Remove the 4 screws under the foot. The lower shell is held by 8 clips and can be separated with a plastic card and some force.

YLXD50YL

Remove the cover counterclockwise, disconnect from the AC (be safe!), pull out the RGB - C - W connectors (mark one of the last two). Unscrew the 2 screws from the base, and you can remove the controller box. Pick a flat screwdriver/plastic card and remove the plastic base from the box. Sometimes its harder, because the thermalpad. Pull out the PCB from the box, and you can remove the ESP module. Maybe some cleaning required from the glue. The test points are in the back of the ESP's PCB.

MJXDD01SYL

The disassembly process is almost, if not exactly the same, as with YLXD50YL. MJXDD01SYL seems a re-labled YLXD50YL.

Rotate the cover counterclockwise to remove the cover. Now you can see the outside of the board's housing. Unscrew the screws and unplug the two connectors. Now you can detach the housing from the base. On the back of the housing you need to remove the cover. Now you can take out the PCB from the housing. Unplug the ESP32 from the socket. Maybe you need to remove a bit of the glue between the PCM and the ESP32.

The Test Points (TP) are on the back side of the ESP32 module. The font is very small, maybe you need a magnifying glass.

To solder some wires to the TPs you need a bit of experience. Since other components are located very close to the TPs.

YLXDD-0033

To disasemble the unit, use a prying tool to un-clip the top part. There are no screws nor glue, only clips all around the ceiling light.

When flashing the YLXDD-00xx series you'll need an external 3.3V power supply and pull the enable (EN) pin to 3.3V.

esphome-yeelight-ceiling-light's People

Contributors

0neday avatar b48d81efcc avatar expeacer avatar fienberber avatar jkramarz avatar jvitkauskas avatar mrumpf avatar p1otr avatar stefan0001 avatar syssi avatar wouterdoornbos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

esphome-yeelight-ceiling-light's Issues

Unable to download custom framework-arduinoespressif32 build

-------------------------------------------------------------------------------- Tool Manager: Installing https://github.com/Jason2866/esp32-arduino-lib-builder/raw/framework-arduinoespressif32/framework-arduinoespressif32-release_v3.3-solo1-bd65eb8d1.tar.gz Error: Got the unrecognized status code '404' when downloaded https://github.com/Jason2866/esp32-arduino-lib-builder/raw/framework-arduinoespressif32/framework-arduinoespressif32-release_v3.3-solo1-bd65eb8d1.tar.gz

Running the latest esphome in HomeAssistant i'm getting this error trying to upload / update the device.

Combine night and day light into one entity

Do you know if we can merge the two light entity's (daymode / nightmode) into one?

I know there would be a jump in brightness but I would rather deal with that than having to control the lights separately.

Meteorite - low brightness and white tones issues

Hi @syssi , thanks again for your fast help in getting the meteorite up and running with esphome.
Finally a functioning and responsive light! :-)
When using the light today i found out, that when the main light is used with a low brightness and then changing the white tones somewhere to the middle, the shown white tone is very warm or cold (depending if you move the slider a bit to the right or left). Changing tones are happening very aprubtly by the light while on low brightness, while for a very short time, the right (mixed) color is flashing for about half a sec.
There seems to be something off, because if you improve the brightness by quite a bit (let's say half), changing white tones go very smoothly and are correctly mixed (through the ww and cw leds).
Attached you'll find my yaml-file.
Anyone got the same issues on lower brightness levels?

substitutions:
  name: yeelight_light_ceiling10

esphome:
  name: ${name}
  platform: ESP32
  board: esp32doit-devkit-v1
  platformio_options:
    platform: [email protected]
    platform_packages: tasmota/framework-arduinoespressif32 @ 3.10006.210420

wifi:
  ssid: xxxx
  password: xxxx
  fast_connect: true

ota:
api:
logger:

output:
  - platform: ledc
    pin: GPIO19
    id: output_warm
    power_supply: power
#    min_power: 0.13
    max_power: 0.82
  - platform: ledc
    pin: GPIO21
    id: output_cold
    power_supply: power
#    min_power: 0.13
    max_power: 0.82

  - platform: ledc
    pin: GPIO23
    id: output_nightlight
    power_supply: power

  - platform: ledc
    pin: GPIO33
    id: output_red
    power_supply: power
  - platform: ledc
    pin: GPIO26
    id: output_green
    power_supply: power
  - platform: ledc
    pin: GPIO27
    id: output_blue
    power_supply: power

power_supply:
  - id: power
    pin: GPIO22
    enable_time: 0s
    keep_on_time: 0s

light:
  - platform: monochromatic
    name: "${name} night light"
    id: night_light
    output: output_nightlight
    gamma_correct: 0
    on_turn_on:
      - light.turn_off: ceiling_light
  - platform: cwww
    name: "${name} ceiling light"
    id: ceiling_light
    cold_white: output_cold
    warm_white: output_warm
    cold_white_color_temperature: 6500 K
    warm_white_color_temperature: 2700 K
    constant_brightness: true
    gamma_correct: 0
    on_turn_on:
      - light.turn_off: night_light
  - platform: rgb
    name: "${name} ambient light"
    red: output_red
    green: output_green
    blue: output_blue
    gamma_correct: 0
    effects:
      # Use default parameters:
      - random:
      # Customize parameters
      - random:
          name: "Slow Random Effect"
          transition_length: 30s
          update_interval: 30s
      - random:
          name: "Fast Random Effect"
          transition_length: 4s
          update_interval: 5s
      - pulse:
          name: "Fast Puse"
          transition_length: 0.5s
          update_interval: 0.5s
      - pulse:
          name: "Slow Puse"
          # transition_length: 1s      # defaults to 1s
          update_interval: 2s
      - strobe:
          name: "Green Strobe"
          colors:
            - state: True
              brightness: 100%
              red: 0%
              green: 100%
              blue: 0%
              duration: 500ms
            - state: False
              duration: 250ms
      - strobe:
          name: "Red Strobe"
          colors:
            - state: True
              brightness: 100%
              red: 100%
              green: 0%
              blue: 0%
              duration: 500ms
            - state: False
              duration: 250ms
      - strobe:
          name: "Blue Strobe"
          colors:
            - state: True
              brightness: 100%
              red: 0%
              green: 0%
              blue: 100%
              duration: 500ms
            - state: False
              duration: 250ms
      - strobe:
          name: "Police Strobe"
          colors:
            - state: True
              brightness: 100%
              red: 0%
              green: 0%
              blue: 100%
              duration: 500ms
            - state: True
              brightness: 100%
              red: 100%
              green: 0%
              blue: 0%
              duration: 500ms
      - flicker:

YLLD01YL dissasembly

I have the Yeelight Floor lamp and would like to convert it to esphome, but I can't figure how to dissasembly it. Does anybody has any clue how to do it? Thanks

Crashes with esp32_ble_tracker

Seeing a lot of crashes with proposed esp32_ble_tracker configuration on esp32-wroom-32d. Most of the time I can't even finish OTA update, I get a crash and connection reset by peer message. Tried using default esp32_ble_tracker configuration by just leaving esp32_ble_tracker: in the yaml and I get no crashes, but lots of remote button presses are missed.

Is esp32 just not up to the task?

YLXD41YL bootloop in esphome 2022.12

Hi, I have a problem with the lamp after updating to esphome version 2022.12 it goes into bootloop. Anyone else noticed problems? The config and serial logs are attached. Unfortunately, I had to disassemble the lamp and flash the 2022.11.5 version.
serial_logs_reboot.txt

# merged configuration of:
# - https://github.com/syssi/esphome-yeelight-ceiling-light/blob/main/yeelight_light_ceiling15.yaml
# - https://github.com/jaddel/ESPHome-Configurations/blob/master/Devices/Ceiling%20Yeelight%20YLXD41YL/ceiling_yeelight_ylxd41xl.yaml

substitutions:
  name: kuchnia-yeelight-ceiling
#  external_components_source: github://syssi/esphome-yeelight-ceiling-light@main

esphome:
  name: ${name}

esp32:
  board: esp32doit-devkit-v1
  framework:
    type: esp-idf
    sdkconfig_options:
      CONFIG_FREERTOS_UNICORE: y
    advanced:
      ignore_efuse_mac_crc: true

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  use_address: 192.168.10.21
  fast_connect: on
  manual_ip:
    static_ip: 192.168.10.21
    gateway: 192.168.10.1
    subnet: 255.255.255.0

ota:
  password: "XXXXXXX"
api:
logger:

sensor:
  - platform: adc
    pin: GPIO36
    name: "${name} adc1"
    attenuation: 11db
  - platform: adc
    pin: GPIO32
    name: "${name} adc2"
    attenuation: 11db
#dodatkowe sensory
  - platform: uptime
    name: "${name} Last Restart"
    update_interval: 300s
    device_class: "timestamp"
    unit_of_measurement: ""
    filters:
      - lambda: |-
          auto time = id(homeassistant_time).now();
          if (time.is_valid()) {
            return int(time.timestamp) - int(x);
          } else {
            return {};
          }
  - platform: wifi_signal
    name: "${name} WiFi Signal"
    update_interval: 300s
    device_class: "signal_strength"

output:
  - platform: ledc
    pin: GPIO19
    id: output_warm
    frequency: 4882Hz
  - platform: ledc
    pin: GPIO21
    id: output_cold
    frequency: 4882Hz
  - platform: ledc
    pin: GPIO23
    id: output_nightlight
    frequency: 19531Hz

light:
  - platform: monochromatic
    name: "${name}-nightlight"
    id: night_light
    output: output_nightlight
    gamma_correct: 0.7
    on_turn_on:
      - light.turn_off: ceiling_light
  - platform: cwww
    name: "${name}"
    id: ceiling_light
    cold_white: output_cold
    warm_white: output_warm
    cold_white_color_temperature: 6500 K
    warm_white_color_temperature: 2700 K
    constant_brightness: true
    gamma_correct: 0.4
    on_turn_on:
      - light.turn_off: night_light

time:
  - platform: homeassistant
    id: homeassistant_time

Not an issue, just broken pin

Hi!!! nice work!!

With the first ceiling10 was very good flashing with esphome, but not so good with second one.
The RX pad on back side of PCB of ceiling10 it's broken, so i can't burn firmware on esp32.

GPIO3 should be RX, isn't it? i tried to solder over esp32 but still nothing going.

Some other alternative?

Thanks in advance

yeelink.light.ceiling20 vs. yeelink.light.ceiling22

Hi,

I have a Xiaomi Mi Ceiling Light (this is the name on the box).
Originally the device is made by Yeelight. It seems a re-branded (any maybe slightly modified) version of a Yeelight device.

The hostname / DNS of the light is yeelink-light-ceiling22-mibt1ADB (identifies as ceiling22).
On the device itself I can find two slightly different model no.:

  • MJXDD001
  • MJXDD01SYL

So far everything looks like it is a yeelink.light.ceiling22

BUT
According to your published pinout and the photos it fits more the YLXD50YL

So some details suggest it is yeelink.light.ceiling20 and some details suggest it is yeelink.light.ceiling22

What do you think?

Yeelight Light Strip1S on/off button does not work

Hi,
I successfully flashed a 1S light strip which was literally buried in a closet for the past two years, thank you! The light strip now works with Homeassistant, but with the new firmware the hardware on/off button stopped working. Is this a known issue or did I accidentally break the button, when I (forcefully) opened the case?

Best,
H.

Help for YLXD76YL rx tx

Hi All,

Somebody have a picture for YLXD76YL to clear which is the rx tx and vcc pins?
From this picture and sheet not clear for me, what should I do :)
I think something like that

Thank you for your time

O.

Light delay after AC power on

Hi, I have multiple lights YLXD032 and I decided to "ESPhome" some of them. Due to limitations with single core ESP32 I decided to desolder the ESP32 and replace with general dual core model. It is working fine but if I switch the light with regular AC switch, it now takes considerable time to actually light up. I would say over 1 second. With the stock ESP32 it was moreless instant.

I understand that these lights are meant to be powered all the time and control them using data commands but in some rooms I would like to have them controlled using regular wall switches - and yet I want to have ESPhome in them as the stock firmware is shit.

I am sorry for not understanding it more deeply so I ask here:

  • is it because the dualcore ESP32? I didn't try to flash the original one
  • is it some limitation of ESPhome (takes long time to boot up)
    • In this case I am quite amazed that Yeelight produced firmware that is so quick to boot
  • do you have any tips how to improve the startup delay?

Here is a video comparing those two lights. First stock firmware and second ESPhome
https://user-images.githubusercontent.com/106582464/172583555-0ec7f183-c8d5-423c-9f7d-26e090b6a78d.mp4
(listen for the switches clicks)

Yeelight Meteorite (ceiling10): replacing board

Hi,

Due to poor soldering skills, a friend of mine has burned the board of his Yeelight Meteorite.

Is it possible to replace it with a cheap ESP32-WROOM board? Luckily enough, the Meteorite has the connections for the board labeled into the case. so...

It just wire GND, +5V, PC, PW, NL, R, G, B and ON/OFF to the corresponding GPIO on the cheapo board based on the yaml configuration?

What are the two pins (labeled GND and +50V) for in the OEM board, left side? And the +50V one on the RGB plug at right side?

006

My idea is to replace it with a board like this:
91KkEpmzuHL SL1500

Thanks

[YLXD41YL] Ceiling Yeelight YAML Suggestion

I flashed my YLXD41YL Ceiling Yeelight with ESPHome partly following your configuration.

Disabling gamma correction and defining 9765Hz frequency for the ledc improved the usability a lot for me.

Here is my yaml config. Link

Do you know if there is a way to calibrate the brightness percentage? My light turns already off below 10% brightness. If i leave the gamma correction to default it already turns off at 40%.

Yeelight Arwen 450C (YLXD013-B)

Yeelight Arwen Ceiling Light 450C
YLXD013-B
https://en.yeelight.com/product/1383.html
"50W UFC-N Mainboard V02"
"P777 LED DRIVE BOARD"
"WIFI UFC V01"
"UFC RGB V1.0"

Have two of those and am kinda annoyed that they can't get as dark as my older yeelight ceiling lights.
So here are some pictures of it, seems very similar to other supported ones.
https://cloud.botox.bz/s/eFHFLfKRykkm4bJ
To open: Remove single screw in the back and rotate the cover.

Seems to come with dual core ESP32-WROOM-32D (ESP32-D0WD)

Also this project should have a few more infos in the readme:
What works/What doesn't? (I really would like to use the BT remote for example)
How to flash/update?
Revert to original firmware?

Is it possible to keep the factory firmware?

Faced a problem after updating the lamp to version 2.1.7_0028. Yeelight YLXD50YL (yeelink.light.ceiling20) DIED after update.
My topic on the Yeelight forum: CLICK

If I find a working firmware, I can download the firmware from it and restore a non-working lamp, right? #21

yeelink.light.strip2 support - Lightstrip Plus (YLDD04YL)

Would it be possibly to add support for this variant of the Lightstrip?
Perhaps it's just a swap-in replacement with the strip6? I can provide photos, etc as needed as I own the device. I also have the strip6 if that helps to find differences.

image

How to flash the meteorite

Thank you so much @syssi for your great work on unchaining these device from chinese cloud servers!
I would love to get my meteorite in esphome, but right now, i am a little bit struggling with your instructions.
I got a USB-TTL-Dongle ready up for some flashing action, but i actually don't understand how i can hold down the state of the GPIO01-Pin on the ESP. Do i need to bridge something to get it in that state?
Would you be so kind and give me some instructions how to get the esp32 in the proper state, to flash it through the dongle with esphome? The latter part i already know from to epaper-esp32-devices, but i'm just struggling with the part of preparing the esp32-board.
Thank you in advance and best wishes
Chris

Support for Jiaoyue 650

Hi,

Anyone got Jiaoyue 650 (white + RGB backlight), yeelink.light.ceiling4, YLXD02YL, work with ESPHome?

Brownout detector was triggered

Hi, I get a boot loop with a YLXD50YL. I got it also with the original firmware, so i think it is a hardware error. But i needed also a lot of tries with different system to read a backup of the original firmware. During this i have done a lot of reboots to download mode with gpio0. Could this be a reason ?
If there is no solution, how could i replace the chip ?

Brownout detector was triggered

ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac
[I][logger:174]: Log initialized
[C][ota:379]: There have been 9 suspected unsuccessful boot attempts.
[I][app:029]: Running through setup()...
[C][power_supply:010]: Setting up Power Supply...
[C][light:035]: Setting up light 'yeelight_light_ceiling20 night light'...
[D][light:035]: 'yeelight_light_ceiling20 night light' Setting:
[D][light:040]: Color mode:
[D][light:050]: Brightness: 100%
[C][light:035]: Setting up light 'yeelight_light_ceiling20 ceiling light'...
[D][light:035]: 'yeelight_light_ceiling20 ceiling light' Setting:
[D][light:040]: Color mode: Cold/warm white
[D][light:050]: Brightness: 100%
[D][light:070]: Cold white: 100%, warm white: 100%
[C][light:035]: Setting up light 'yeelight_light_ceiling20 ambient light'...
[D][light:035]: 'yeelight_light_ceiling20 ambient light' Setting:
[D][light:040]: Color mode: RGB
[D][light:050]: Brightness: 100%
[D][light:054]: Color brightness: 100%
[D][light:058]: Red: 100%, Green: 100%, Blue: 100%
[C][wifi:037]: Setting up WiFi...

Brownout detector was triggered

ets Jun 8 2016 00:22:57

Error 'platformio/toolchain-esp32ulp @ ~1.22851.0' on 'linux_aarch64'

I am trying to build yeelight_light_ceiling10.yaml on my raspberry pi3 with the ESPHome Homeassistant addon, but am getting the following error:

INFO Reading configuration /config/esphome/yeelight-crystal-pendent.yaml...
INFO Generating C++ source...
INFO Compiling app...
Processing yeelight-light-ceiling10 (board: esp32doit-devkit-v1; framework: espidf; platform: platformio/espressif32 @ 3.5.0)
--------------------------------------------------------------------------------
Tool Manager: Installing platformio/toolchain-esp32ulp @ ~1.22851.0
Error: Could not find the package with 'platformio/toolchain-esp32ulp @ ~1.22851.0' requirements for your system 'linux_aarch64'

My steps

I want to build the binary on the raspberry and then flash it to the yeelight device per ESPHome Web. So i open the ESPHome Addon, click New Device > Install > Manual Download > Modern Format and get the above error.
The Raspberry is running Home Assistant OS and everything is up-to-date. I am pretty new to the ESPHome stuff, so i hope it is ok to ask for help here.

[BUG] Could not find the package with espressif/toolchain-riscv32-esp

The following error happens while running esphome run yeelight_light_ceilc.yaml (possibly happens to other yaml files as well):

Tool Manager: Installing espressif/toolchain-riscv32-esp @ 8.4.0+2021r2-patch2
INFO Installing espressif/toolchain-riscv32-esp @ 8.4.0+2021r2-patch2
Error: Could not find the package with 'espressif/toolchain-riscv32-esp @ 8.4.0+2021r2-patch2' requirements for your system 'windows_amd64'

The issue has been adressed in a different project: mmakaay/esphome-xiaomi_bslamp2#116
The temporary workaround to extend the yaml file with the following lines helps:

esphome:
  platformio_options:
    platform_packages:
      - "toolchain-riscv32-esp @8.4.0+2021r2-patch5"

Improve boot times

Hi,
I noticed, that yeelight lamps with standard firmware are starting blazing fast, where as esphome flashed lamps require 1-2 seconds to turn on.
Not only that is a a hassle for presence sensors, but also guests think lamps are broken, if lamps don't turn on instantly.

Is there a way to improve that behavior?

BR
mau

Add Yeelight YLXD50YL (yeelink.light.ceiling20) support

Hello @syssi ,
thanks again for your great support. As my meteorite lamp is running smoothly since i've upgraded to esphome, i now would like to address my struggling Ceiling Lamp Yeelight YLXD50YL (yeelight ceiling lamp 20), as it is almost always unavailable in HA, as well as there are problems using my CW-LEDs.
This Lamp got a combined Lumen output of 7200lm, as well as a color-LED-Stripe facing to the ceiling.
So far it seems no one have documented anything about this lamp yet, so i teared it apart to see, what i'm working with:

It seems to use a ESP-WROOM-32D Controller on a small WIFI CTRL-Board (VZ6REV 0.1), which fortunately can be removed from the mainboard. The provided PINs allow to directly mount a cable to 3.3V, GND, ADC1, STA.
There are little testpoints from TP1 to TP5.
So far i was unable to find any TX/RX-PINs, so i guess they're hidden in two of these TP, as well as GND0.

I assume as soon as we now, which of those points are important for flashing, it's only a matter of time to get esphome on it.

Do you got hints or any documentation about this Controller @syssi to get started with an USB UART-TTL-Adapter? How is it possible to find out those missing PINs necessary for a flash?

Thanks in advance and best regards.
Chris

OTA progress effect

I am using the following code on my yeelight_light_ceiling20 to enable OTA progress effect.
Got the idea from the Makaay's bslamp2 project.
Going to leave this here if somebody wants to add it to their light or if Sebastian finds it useful then maybe this could be integrated this project by default

ota:
  password: "#YOUR_OTA_KEY"
  safe_mode: true

  on_begin:
    then:
      #turn lights off
      - output.turn_off: output_nightlight
      - output.turn_off: output_cold
      - output.turn_off: output_warm
      - output.turn_off: output_red
      - output.turn_off: output_green
      # enable blue leds to show that OTA process has begun
      - output.set_level:
          id: output_blue
          level: 15%

  on_progress:
    then:
      #Show OTA progress status using green leds. Effect is a bit choppy... 
      #I only get 2-3 brightness changes, but that is better than nothing ;)
      #Effect could probably be made smoother with a better custom lambda code?
      output.set_level:
        id: output_green
        level: !lambda |-
          // output value must be in range 0 - 1.0
          return x / 100.0;

  on_end:
    then:
      - output.turn_off: output_blue
      - output.turn_on: output_green

  on_error:
    then:
      - output.turn_off: output_green
      - output.turn_on: output_red

Custom firmware will avoid connecting drops?

Hi,

thanks so much for this contribution!

I wanted to ask if your firmware would do a better job with making the device accessible again if it loses wifi connection in between? With the original firmware the lights once losing connection would not be accessible anymore via LAN Control (I use Home Assistant integration). I don’t know if they actually lose connection, maybe it’s another issue within the firmware itself. When this happens I need to power cycle the device to be able to access it again.

Thanks,
Helge

Issues with restoring to the previous state after updates and power outages.

Hi, do you have any thoughts on how to make an ESP32 (flashed with ESPHome) retain its state after a restart? Currently, with each update or power outage, I have to set the brightness and color from the beginning. If this is a straightforward question and I should know the answer, please point me in the direction where I can find it. Below, I'm providing YAML with code for ESPHome, which I am using.

yldl01yl:

substitutions:
  name: yldl01yl

esphome:
  name: ${name}

esp32:
  board: esp32doit-devkit-v1
  framework:
    type: esp-idf
    sdkconfig_options:
      CONFIG_FREERTOS_UNICORE: y
    advanced:
      ignore_efuse_mac_crc: true

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  fast_connect: true
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "yldl01yl Fallback Hotspot"
    password: "************"

ota:

logger:
  level: DEBUG

api:

output:
  - platform: ledc
    pin: GPIO19
    id: output_warm
    power_supply: power
    min_power: 0.13
    max_power: 0.77
    frequency: 1220Hz
    zero_means_zero: true
  - platform: ledc
    pin: GPIO21
    id: output_cold
    power_supply: power
    frequency: 1220Hz
    zero_means_zero: true
    min_power: 0.13
    max_power: 0.76

  - platform: ledc
    pin: GPIO23
    id: output_nightlight
    power_supply: power

  - platform: ledc
    pin: GPIO33
    id: output_red
    power_supply: power
  - platform: ledc
    pin: GPIO26
    id: output_green
    power_supply: power
  - platform: ledc
    pin: GPIO27
    id: output_blue
    power_supply: power

power_supply:
  - id: power
    pin: GPIO22
    enable_time: 0s
    keep_on_time: 0s

light:
  - platform: monochromatic
    name: "${name} night light"
    id: night_light
    output: output_nightlight
    gamma_correct: 0
    on_turn_on:
      - light.turn_off: ceiling_light
  - platform: cwww
    name: "${name} ceiling light"
    id: ceiling_light
    cold_white: output_cold
    warm_white: output_warm
    cold_white_color_temperature: 6500 K
    warm_white_color_temperature: 2700 K
    constant_brightness: true
    gamma_correct: 0
    on_turn_on:
      - light.turn_off: night_light
  - platform: rgb
    name: "${name} ambient light"
    red: output_red
    green: output_green
    blue: output_blue
    gamma_correct: 0

ylxd013-b:

substitutions:
  name: ylxd013-b

esphome:
  name: ${name}

esp32:
  board: esp32doit-devkit-v1
  framework:
    type: esp-idf
    sdkconfig_options:
      CONFIG_FREERTOS_UNICORE: y
    advanced:
      ignore_efuse_mac_crc: true

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  fast_connect: true
  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "ylxd013-b Fallback Hotspot"
    password: "*************"

ota:

logger:
  level: DEBUG

api:

output:
  - platform: ledc
    pin: GPIO19
    id: output_warm
    power_supply: power
#   min_power: 0.13
    max_power: 0.50
  - platform: ledc
    pin: GPIO21
    id: output_cold
    power_supply: power
#   min_power: 0.13
    max_power: 0.96

  - platform: ledc
    pin: GPIO23
    id: output_nightlight
    power_supply: power

  - platform: ledc
    pin: GPIO33
    id: output_red
    power_supply: power
  - platform: ledc
    pin: GPIO26
    id: output_green
    power_supply: power
  - platform: ledc
    pin: GPIO27
    id: output_blue
    power_supply: power

power_supply:
  - id: power
    pin: GPIO22
    enable_time: 0s
    keep_on_time: 0s

light:
  - platform: monochromatic
    name: "${name} night light"
    id: night_light
    output: output_nightlight
    gamma_correct: 0
    on_turn_on:
      - light.turn_off: ceiling_light
  - platform: cwww
    name: "${name} ceiling light"
    id: ceiling_light
    cold_white: output_cold
    warm_white: output_warm
    cold_white_color_temperature: 6500 K
    warm_white_color_temperature: 2700 K
    constant_brightness: true
    gamma_correct: 0
    on_turn_on:
      - light.turn_off: night_light
  - platform: rgb
    name: "${name} ambient light"
    red: output_red
    green: output_green
    blue: output_blue
    gamma_correct: 0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.