Skip to content

DDP Fails to compile for ESPHome version 2025.11.0+ with VERBOSE logging #29

@neilflatley

Description

@neilflatley

Hi,
Thanks for writing such a useful component. I have been using this for a short while without any issues until I upgraded ESPHome and rebuilt the firmware for my ESP32 device

I am getting the following attached error when compiling with the DDP component in 2025.11.5

I'd say this is related to the previously resolved issue #27 however my configuration has logging set to VERBOSE - The errors and source code point to ESP_LOGV function calls

Setting my logging level back to DEBUG allows the device firmware to compile successfully.

Having looked at the previous fixes and merges for 2025.11.0 perhaps this was a small oversight as I'd guess most configurations won't have VERBOSE logging.

INFO ESPHome 2025.11.5
INFO Reading configuration /config/ambilight.yaml...
INFO Updating https://github.com/KaufHA/common@None
WARNING GPIO2 is a strapping PIN and should only be used for I/O with care.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
INFO Compiling app... Build path: /config/.esphome/build/ambilight
Processing ambilight (board: esp32dev; framework: arduino, espidf; platform: https://github.com/pioarduino/platform-espressif32/releases/download/55.03.31-2/platform-espressif32.zip)
--------------------------------------------------------------------------------
INFO Package configuration completed successfully
INFO Package configuration completed successfully
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
 - contrib-piohome @ 3.4.4 
 - framework-arduinoespressif32 @ 3.3.2 
 - framework-arduinoespressif32-libs @ 5.5.0+sha.129cd0d247 
 - framework-espidf @ 3.50501.0 (5.5.1) 
 - tool-cmake @ 4.0.3 
 - tool-esp-rom-elfs @ 2024.10.11 
 - tool-esptoolpy @ 5.1.0 
 - tool-mklittlefs @ 3.2.0 
 - tool-ninja @ 1.13.1 
 - tool-scons @ 4.40801.0 (4.8.1) 
 - toolchain-xtensa-esp-elf @ 14.2.0+20241119
Reading CMake configuration...
Generating assembly for certificate bundle...
Dependency Graph
|-- Networking @ 3.3.2
|-- ESPmDNS @ 3.3.2
|-- Update @ 3.3.2
|-- noise-c @ 0.1.10
|-- ArduinoJson @ 7.4.2
Generating assembly for .pioenvs/ambilight/https_server.crt.S
Generating assembly for .pioenvs/ambilight/rmaker_mqtt_server.crt.S
Generating assembly for .pioenvs/ambilight/rmaker_claim_service_server.crt.S
Generating assembly for .pioenvs/ambilight/rmaker_ota_server.crt.S
Compiling .pioenvs/ambilight/src/esphome/components/api/api_connection.cpp.o
Compiling .pioenvs/ambilight/src/esphome/components/api/api_frame_helper.cpp.o
Compiling .pioenvs/ambilight/src/esphome/components/api/api_frame_helper_noise.cpp.o
Compiling .pioenvs/ambilight/src/esphome/components/api/api_pb2.cpp.o
Compiling .pioenvs/ambilight/src/esphome/components/api/api_pb2_service.cpp.o
Compiling .pioenvs/ambilight/src/esphome/components/api/api_server.cpp.o
Compiling .pioenvs/ambilight/src/esphome/components/api/list_entities.cpp.o
Compiling .pioenvs/ambilight/src/esphome/components/api/proto.cpp.o
Compiling .pioenvs/ambilight/src/esphome/components/api/subscribe_state.cpp.o
Compiling .pioenvs/ambilight/src/esphome/components/binary_sensor/automation.cpp.o
Compiling .pioenvs/ambilight/src/esphome/components/binary_sensor/binary_sensor.cpp.o
Compiling .pioenvs/ambilight/src/esphome/components/binary_sensor/filter.cpp.o
Compiling .pioenvs/ambilight/src/esphome/components/button/button.cpp.o
Compiling .pioenvs/ambilight/src/esphome/components/copy/sensor/copy_sensor.cpp.o
Compiling .pioenvs/ambilight/src/esphome/components/ddp/ddp.cpp.o
Compiling .pioenvs/ambilight/src/esphome/components/ddp/ddp_addressable_light_effect.cpp.o
In file included from src/esphome/core/component.h:8,
                 from src/esphome/components/ddp/ddp.h:5,
                 from src/esphome/components/ddp/ddp_addressable_light_effect.cpp:3:
src/esphome/components/ddp/ddp_addressable_light_effect.cpp: In member function 'virtual uint16_t esphome::ddp::DDPAddressableLightEffect::process_(const uint8_t*, uint16_t, uint16_t)':
src/esphome/components/ddp/ddp_addressable_light_effect.cpp:106:97: error: request for member 'c_str' in '((esphome::ddp::DDPAddressableLightEffect*)this)->esphome::ddp::DDPAddressableLightEffect::get_name()', which is of non-class type 'const char*'
  106 |   ESP_LOGV(TAG, "Applying DDP data for '%s' (size: %d - used: %d - num_pixels: %d)", get_name().c_str(), size, used, num_pixels);
      |                                                                                                 ^~~~~
src/esphome/core/log.h:90:102: note: in definition of macro 'esph_log_v'
   90 |   ::esphome::esp_log_printf_(ESPHOME_LOG_LEVEL_VERBOSE, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
      |                                                                                                      ^~~~~~~~~~~
src/esphome/components/ddp/ddp_addressable_light_effect.cpp:106:3: note: in expansion of macro 'ESP_LOGV'
  106 |   ESP_LOGV(TAG, "Applying DDP data for '%s' (size: %d - used: %d - num_pixels: %d)", get_name().c_str(), size, used, num_pixels);
      |   ^~~~~~~~
Compiling .pioenvs/ambilight/src/esphome/components/ddp/ddp_light_effect.cpp.o
Compiling .pioenvs/ambilight/src/esphome/components/ddp/ddp_light_effect_base.cpp.o
Compiling .pioenvs/ambilight/src/esphome/components/debug/debug_component.cpp.o
Compiling .pioenvs/ambilight/src/esphome/components/debug/debug_esp32.cpp.o
*** [.pioenvs/ambilight/src/esphome/components/ddp/ddp_addressable_light_effect.cpp.o] Error 1
In file included from src/esphome/core/component.h:8,
                 from src/esphome/components/ddp/ddp.h:5,
                 from src/esphome/components/ddp/ddp_light_effect.cpp:3:
src/esphome/components/ddp/ddp_light_effect.cpp: In member function 'virtual uint16_t esphome::ddp::DDPLightEffect::process_(const uint8_t*, uint16_t, uint16_t)':
src/esphome/components/ddp/ddp_light_effect.cpp:85:141: error: request for member 'c_str' in '((esphome::ddp::DDPLightEffect*)this)->esphome::ddp::DDPLightEffect::get_name()', which is of non-class type 'const char*'
   85 |   ESP_LOGV(TAG, "Applying DDP data for '%s->%s': (%02x,%02x,%02x) size = %d, used = %d", this->state_->get_name().c_str(), this->get_name().c_str(), payload[used], payload[used+1], payload[used+2], size, used);
      |                                                                                                                                             ^~~~~
src/esphome/core/log.h:90:102: note: in definition of macro 'esph_log_v'
   90 |   ::esphome::esp_log_printf_(ESPHOME_LOG_LEVEL_VERBOSE, tag, __LINE__, ESPHOME_LOG_FORMAT(format), ##__VA_ARGS__)
      |                                                                                                      ^~~~~~~~~~~
src/esphome/components/ddp/ddp_light_effect.cpp:85:3: note: in expansion of macro 'ESP_LOGV'
   85 |   ESP_LOGV(TAG, "Applying DDP data for '%s->%s': (%02x,%02x,%02x) size = %d, used = %d", this->state_->get_name().c_str(), this->get_name().c_str(), payload[used], payload[used+1], payload[used+2], size, used);
      |   ^~~~~~~~
*** [.pioenvs/ambilight/src/esphome/components/ddp/ddp_light_effect.cpp.o] Error 1

Many thanks
Neil

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions