Skip to content

Wrap component log string for ESPHome 2026.1 compatibility#7

Open
stas2k wants to merge 1 commit intojorticus:masterfrom
stas2k:fix-esphome-log
Open

Wrap component log string for ESPHome 2026.1 compatibility#7
stas2k wants to merge 1 commit intojorticus:masterfrom
stas2k:fix-esphome-log

Conversation

@stas2k
Copy link
Copy Markdown

@stas2k stas2k commented Dec 25, 2025

This change allows me to compile the component on ESPHome 2026.1.

@stratogk
Copy link
Copy Markdown

Hi there,

I am trying to use this PR to fix compatibility with the latest ESPHome (2025.12.1), but I am facing issues with the RX feedback.

My Setup:

  • MCU: ESP32-S3 DevKitC-1
  • DALI Interface: Waveshare Pico DALI2 (wired manually to the ESP32-S3 DevKitC-1)
  • Pins: TX = GPIO 21, RX = GPIO 40

The Issue:
While I can likely send commands, DALI Discovery fails completely, and no feedback is received. It appears the RX pin is floating or not being read correctly. On the ESP32-S3, combined with the Waveshare interface, it seems necessary to explicitly set INPUT_PULLUP on the RX pin for the signal to be read correctly.

My Questions:

  1. Does DALI Discovery work properly in your tests with this code?
  2. What MCU and DALI Interface hardware did you use for validation?

I suspect the esphome_dali.cpp needs to be updated to explicitly support INPUT_PULLUP for the RX pin to work reliably with modern ESP32-S3 boards and DALI 2 interfaces like the Waveshare unit.

Thanks!

@sehraf
Copy link
Copy Markdown
Contributor

sehraf commented Dec 26, 2025

FYI this has been an issue since October or so sehraf@b4a094d


On the ESP32-S3, combined with the Waveshare interface, it seems necessary to explicitly set INPUT_PULLUP on the RX pin for the signal to be read correctly.

The RX is pulled down by design
image

That said, receiving can be unreliable (see #3 ) and you might want to give my branch a try (see #3 again for more information):

external_components:
  - source: github://sehraf/esphome-dali@gpio_interrupt
    components: [dali]

@stas2k
Copy link
Copy Markdown
Author

stas2k commented Dec 26, 2025

Does DALI Discovery work properly in your tests with this code?

That said, receiving can be unreliable (see #3 ) and you might want to give my branch a try (see #3 again for more information):

I actually found you branch after creating this PR, and switched onto it. The RX does not work for me as well using the Pico-DALI2.

What MCU and DALI Interface hardware did you use for validation?

I am using Waveshare Pico-DALI2 hooked up to a KC868-A16 GPIO pins GPIO32(TX) and GPIO33(RX). The DALI dimmer I am using is Skydance LN-150-24-2DA.

Here is a snippet of my config:

external_components:
  - source: github://sehraf/esphome-dali@gpio_interrupt
    components: [dali]

dali:
  id: dali_bus
  tx_pin: GPIO32 #HT1
  rx_pin: GPIO33 #HT2

  discovery: false # does not work, finds no devices
  initialize_addresses: true

light:
  - platform: dali
    id: dali_light
    name: "All DALI Lights"
    restore_mode: ALWAYS_OFF

    color_mode: COLOR_TEMPERATURE
    # specific to my strip
    cold_white_color_temperature: 6500K
    warm_white_color_temperature: 2000K

Only broadcast works for me, but for now I will have only a single dimmer on the bus. Color temperature settings work. I am willing to buy a second set to test more the RX parts.

As a bus power supply I have a 220 Ohm resistor in series with a current limited bench PSU set to 12V 220mA.

@stas2k
Copy link
Copy Markdown
Author

stas2k commented Dec 27, 2025

Seems it is normal for DALI bus to be high on idle state. I will hook up a scope today and see what is there when RX happens

@stas2k
Copy link
Copy Markdown
Author

stas2k commented Dec 28, 2025

I have hooked up probes to RX and TX pins, and it seems the RX line is not pulled low enough for ESP32 to react.

Here is a screenshot of a RX pin while Waveshare itself is transmitting:

dali_tx

Yellow trace is from the Chx-RX pin and the blue one is from Chx-TX.

I also took a second trace of the same, but yellow is hooked up to the 5V Chx-Dali pin:

dali_tx_5v_pin

Measurement sidebar on both is for the yellow trace.

Both of them seem to not get pulled low enough.

@jorticus
Copy link
Copy Markdown
Owner

I've ordered the Waveshare DALI board + ESP32-S3, will try to test this by end of this month. Not sure what's going on here.

I tested the original code with a custom board using opto-isolators and a fast current source power supply, and a regular ESP32.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants