SzczepanLeon / esphome-components

136 stars 47 forks source link

[V4.0] Compile error with default config #120

Open ThomDietrich opened 1 week ago

ThomDietrich commented 1 week ago

Hey there, thanks for the 4.0 update! I ran into this error and am not sure what's going on.

With ESPHome 2024.9.0 and this config:

esphome:
  platformio_options:
    board_build.flash_mode: dio
    board_build.mcu: esp32c3
  project:
    name: "M5Stack.M5Stamp-C3U"
    version: "0.0"

esp32:
  board: esp32-c3-devkitm-1
  variant: esp32c3
  framework:
    type: arduino

time:
  - platform: sntp
    id: time_sntp
    timezone: Europe/Berlin

external_components:
  - source: github://SzczepanLeon/esphome-components@main
    refresh: 0d
    components: [ wmbus ]

wmbus:
  # frequency: 868.950
  # Pin 1 - GND
  # Pin 2 - VCC - Power supply 1.8 V-3.6V DC
  gdo0_pin: GPIO3 # GDO0 - Information output pin
  cs_pin: GPIO4 # CSN - Chip selection pin, for starting a SPI communication
  clk_pin: GPIO5 # SCK - SPI clock pin
  mosi_pin: GPIO6 # MOSI - SPI data input pin
  miso_pin: GPIO7 # MISO/GDO1 - SPI data output pin
  gdo2_pin: GPIO8 # GDO2 - Information output pin
  # led_pin: GPIO0
  # led_blink_time: "1s"
  # all_drivers: False
  # sync_mode: True
  # log_all: True

You get:

INFO ESPHome 2024.9.0
INFO Reading configuration wasserzaehler-hydrus-2-0.yaml...
INFO Updating https://github.com/SzczepanLeon/esphome-components.git@main
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
WARNING GPIO8 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
WARNING GPIO9 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...
Processing wasserzaehler (board: esp32-c3-devkitm-1; framework: arduino; platform: platformio/espressif32@5.4.0)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32-c3-devkitm-1.html
PLATFORM: Espressif 32 (5.4.0) > Espressif ESP32-C3-DevKitM-1
HARDWARE: ESP32C3 160MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-builtin, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-arduinoespressif32 @ 3.20005.220925 (2.0.5)
 - tool-esptoolpy @ 1.40400.0 (4.4.0)
 - toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ off, Compatibility ~ soft
Found 36 compatible libraries
Scanning dependencies...
Dependency Graph
|-- AsyncTCP-esphome @ 2.1.4
|-- WiFi @ 2.0.0
|-- FS @ 2.0.0
|-- Update @ 2.0.0
|-- ESPAsyncWebServer-esphome @ 3.2.2
|-- DNSServer @ 2.0.0
|-- ESPmDNS @ 2.0.0
|-- ArduinoJson @ 6.18.5
|-- SPI @ 2.0.0
|-- SmartRC-CC1101-Driver-Lib @ 2.5.7
Building in release mode
Compiling .pioenvs\wasserzaehler\src\esphome\components\wmbus\wmbus.cpp.o
Compiling .pioenvs\wasserzaehler\src\main.cpp.o
Archiving .pioenvs\wasserzaehler\lib65b\libESPAsyncWebServer-esphome.a
Archiving .pioenvs\wasserzaehler\liba8b\libDNSServer.a
Archiving .pioenvs\wasserzaehler\lib74b\libESPmDNS.a
Archiving .pioenvs\wasserzaehler\liba9c\libSmartRC-CC1101-Driver-Lib.a
Compiling .pioenvs\wasserzaehler\FrameworkArduino\FirmwareMSC.cpp.o
Compiling .pioenvs\wasserzaehler\FrameworkArduino\FunctionalInterrupt.cpp.o
Compiling .pioenvs\wasserzaehler\FrameworkArduino\HWCDC.cpp.o
Compiling .pioenvs\wasserzaehler\FrameworkArduino\HardwareSerial.cpp.o
Compiling .pioenvs\wasserzaehler\FrameworkArduino\IPAddress.cpp.o
Compiling .pioenvs\wasserzaehler\FrameworkArduino\IPv6Address.cpp.o
Compiling .pioenvs\wasserzaehler\FrameworkArduino\MD5Builder.cpp.o
Compiling .pioenvs\wasserzaehler\FrameworkArduino\Print.cpp.o
Compiling .pioenvs\wasserzaehler\FrameworkArduino\Stream.cpp.o
Compiling .pioenvs\wasserzaehler\FrameworkArduino\StreamString.cpp.o
Compiling .pioenvs\wasserzaehler\FrameworkArduino\Tone.cpp.o
Compiling .pioenvs\wasserzaehler\FrameworkArduino\USB.cpp.o
In file included from src/esphome/components/wmbus/dvparser.h:23,
                 from src/esphome/components/wmbus/meters.h:22,
                 from src/esphome/components/wmbus/wmbus.cpp:4:
src/esphome/components/wmbus/units.h:102:7: error: expected identifier before '(' token
     X(HZ,hz,"Hz",Frequency,"hz")                                        \
       ^~
src/esphome/components/wmbus/units.h:129:53: note: in definition of macro 'X'
 #define X(cname,lcname,hrname,quantity,explanation) cname,
                                                     ^~~~~
src/esphome/components/wmbus/units.h:130:5: note: in expansion of macro 'LIST_OF_UNITS'
     LIST_OF_UNITS
     ^~~~~~~~~~~~~
src/esphome/components/wmbus/units.h:102:7: error: expected '}' before '(' token
     X(HZ,hz,"Hz",Frequency,"hz")                                        \
       ^~
src/esphome/components/wmbus/units.h:129:53: note: in definition of macro 'X'
 #define X(cname,lcname,hrname,quantity,explanation) cname,
                                                     ^~~~~
src/esphome/components/wmbus/units.h:130:5: note: in expansion of macro 'LIST_OF_UNITS'
     LIST_OF_UNITS
     ^~~~~~~~~~~~~
src/esphome/components/wmbus/units.h:128:1: note: to match this '{'
 {
 ^
src/esphome/components/wmbus/units.h:102:7: error: expected unqualified-id before numeric constant
     X(HZ,hz,"Hz",Frequency,"hz")                                        \
       ^~
Compiling .pioenvs\wasserzaehler\FrameworkArduino\USBCDC.cpp.o
src/esphome/components/wmbus/units.h:129:53: note: in definition of macro 'X'
 #define X(cname,lcname,hrname,quantity,explanation) cname,
                                                     ^~~~~
src/esphome/components/wmbus/units.h:130:5: note: in expansion of macro 'LIST_OF_UNITS'
     LIST_OF_UNITS
     ^~~~~~~~~~~~~
src/esphome/components/wmbus/units.h:102:7: error: expected ')' before numeric constant
     X(HZ,hz,"Hz",Frequency,"hz")                                        \
       ^~
src/esphome/components/wmbus/units.h:129:53: note: in definition of macro 'X'
 #define X(cname,lcname,hrname,quantity,explanation) cname,
                                                     ^~~~~
src/esphome/components/wmbus/units.h:130:5: note: in expansion of macro 'LIST_OF_UNITS'
     LIST_OF_UNITS
     ^~~~~~~~~~~~~
src/esphome/components/wmbus/units.h:133:1: error: expected declaration before '}' token
 };
 ^
*** [.pioenvs\wasserzaehler\src\esphome\components\wmbus\wmbus.cpp.o] Error 1
In file included from src/esphome\components\wmbus\dvparser.h:23,
                 from src/esphome.h:90,
                 from src/main.cpp:3:
src/esphome\components\wmbus\units.h:102:7: error: expected identifier before '(' token
     X(HZ,hz,"Hz",Frequency,"hz")                                        \
       ^~
src/esphome\components\wmbus\units.h:129:53: note: in definition of macro 'X'
 #define X(cname,lcname,hrname,quantity,explanation) cname,
                                                     ^~~~~
src/esphome\components\wmbus\units.h:130:5: note: in expansion of macro 'LIST_OF_UNITS'
     LIST_OF_UNITS
     ^~~~~~~~~~~~~
src/esphome\components\wmbus\units.h:102:7: error: expected '}' before '(' token
     X(HZ,hz,"Hz",Frequency,"hz")                                        \
       ^~
src/esphome\components\wmbus\units.h:129:53: note: in definition of macro 'X'
 #define X(cname,lcname,hrname,quantity,explanation) cname,
                                                     ^~~~~
src/esphome\components\wmbus\units.h:130:5: note: in expansion of macro 'LIST_OF_UNITS'
     LIST_OF_UNITS
     ^~~~~~~~~~~~~
src/esphome\components\wmbus\units.h:128:1: note: to match this '{'
 {
 ^
src/esphome\components\wmbus\units.h:102:7: error: expected unqualified-id before numeric constant
     X(HZ,hz,"Hz",Frequency,"hz")                                        \
       ^~
src/esphome\components\wmbus\units.h:129:53: note: in definition of macro 'X'
 #define X(cname,lcname,hrname,quantity,explanation) cname,
                                                     ^~~~~
src/esphome\components\wmbus\units.h:130:5: note: in expansion of macro 'LIST_OF_UNITS'
     LIST_OF_UNITS
     ^~~~~~~~~~~~~
src/esphome\components\wmbus\units.h:102:7: error: expected ')' before numeric constant
     X(HZ,hz,"Hz",Frequency,"hz")                                        \
       ^~
src/esphome\components\wmbus\units.h:129:53: note: in definition of macro 'X'
 #define X(cname,lcname,hrname,quantity,explanation) cname,
                                                     ^~~~~
src/esphome\components\wmbus\units.h:130:5: note: in expansion of macro 'LIST_OF_UNITS'
     LIST_OF_UNITS
     ^~~~~~~~~~~~~
src/esphome\components\wmbus\units.h:133:1: error: expected declaration before '}' token
 };
 ^
*** [.pioenvs\wasserzaehler\src\main.cpp.o] Error 1

Edit: here is my complete config:

$ esphome config wasserzaehler-hydrus-2-0.yaml
INFO ESPHome 2024.9.0
INFO Reading configuration wasserzaehler-hydrus-2-0.yaml...
INFO Updating https://github.com/SzczepanLeon/esphome-components.git@main
WARNING GPIO8 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
substitutions:
  device_name: wasserzaehler
  device_friendly_name: Wasserzaehler
  device_area: Keller
  status_led_pin: GPIO2
  on_board_button_pin: GPIO9
  log_baudrate: '0'
esphome:
  platformio_options:
    board_build.flash_mode: dio
    board_build.mcu: esp32c3
  project:
    name: M5Stack.M5Stamp-C3U_plus_CC1101
    version: '0.0'
  name: wasserzaehler
  friendly_name: Wasserzaehler
  area: Keller
  build_path: build\wasserzaehler
  includes: []
  libraries: []
  name_add_mac_suffix: false
  min_version: 2024.9.0
esp32:
  board: esp32-c3-devkitm-1
  variant: ESP32C3
  framework:
    version: 2.0.5
    source: ~3.20005.0
    platform_version: platformio/espressif32@5.4.0
    type: arduino
  flash_size: 4MB
wifi:
  networks:
  - ssid: \033[5m!secret 'wifi_home1_ssid'\033[6m
    password: \033[5m!secret 'wifi_home1_pw'\033[6m
    priority: 0.0
  - ssid: \033[5m!secret 'wifi_home2_ssid'\033[6m
    password: \033[5m!secret 'wifi_home2_pw'\033[6m
    priority: 0.0
  - ssid: \033[5m!secret 'wifi_home3_ssid'\033[6m
    password: \033[5m!secret 'wifi_home3_pw'\033[6m
    priority: 0.0
  ap:
    ssid: \033[5mwasserzaehler\033[6m
    password: \033[5m!secret 'wifi_fallback_pw'\033[6m
    ap_timeout: 1min
  domain: .local
  reboot_timeout: 15min
  power_save_mode: LIGHT
  fast_connect: false
  passive_scan: false
  enable_on_boot: true
  use_address: wasserzaehler.local
sensor:
- platform: wifi_signal
  name: WiFi Signal RSSI
  id: wifi_signal_db
  update_interval: 60s
  device_class: signal_strength
  entity_category: diagnostic
  disabled_by_default: false
  force_update: false
  unit_of_measurement: dBm
  accuracy_decimals: 0
  state_class: measurement
- platform: copy
  source_id: wifi_signal_db
  name: WiFi Signal Strength
  filters:
  - lambda: !lambda |-
      return min(max(2 * (x + 100.0), 0.0), 100.0);
  unit_of_measurement: '%'
  device_class: ''
  entity_category: diagnostic
  disabled_by_default: false
  force_update: false
  accuracy_decimals: 0
  state_class: measurement
time:
- platform: sntp
  id: time_sntp
  timezone: CET-1CEST,M3.5.0,M10.5.0/3
  update_interval: 15min
  servers:
  - 0.pool.ntp.org
  - 1.pool.ntp.org
  - 2.pool.ntp.org
external_components:
- source:
    url: https://github.com/SzczepanLeon/esphome-components.git
    ref: main
    type: git
  refresh: 0d
  components:
  - wmbus
wmbus:
  gdo0_pin:
    number: 3
    mode:
      input: true
      output: false
      open_drain: false
      pullup: false
      pulldown: false
    inverted: false
    ignore_pin_validation_error: false
    ignore_strapping_warning: false
    drive_strength: 20.0
  cs_pin:
    number: 4
    mode:
      output: true
      input: false
      open_drain: false
      pullup: false
      pulldown: false
    inverted: false
    ignore_pin_validation_error: false
    ignore_strapping_warning: false
    drive_strength: 20.0
  clk_pin:
    number: 5
    mode:
      output: true
      input: false
      open_drain: false
      pullup: false
      pulldown: false
    inverted: false
    ignore_pin_validation_error: false
    ignore_strapping_warning: false
    drive_strength: 20.0
  mosi_pin:
    number: 6
    mode:
      output: true
      input: false
      open_drain: false
      pullup: false
      pulldown: false
    inverted: false
    ignore_pin_validation_error: false
    ignore_strapping_warning: false
    drive_strength: 20.0
  miso_pin:
    number: 7
    mode:
      input: true
      output: false
      open_drain: false
      pullup: false
      pulldown: false
    inverted: false
    ignore_pin_validation_error: false
    ignore_strapping_warning: false
    drive_strength: 20.0
  gdo2_pin:
    number: 8
    mode:
      input: true
      output: false
      open_drain: false
      pullup: false
      pulldown: false
    inverted: false
    ignore_pin_validation_error: false
    ignore_strapping_warning: false
    drive_strength: 20.0
  led_blink_time: 200ms
  log_all: false
  all_drivers: false
  frequency: 868.95
  sync_mode: false
SzczepanLeon commented 1 week ago

This error is visible also on clean build?

ThomDietrich commented 1 week ago

Hey @SzczepanLeon yes, more precisely, the following produces the error:

esphome clean wasserzaehler-hydrus-2-0.yaml
rm -rf .esphome/build/wasserzaehler
esphome run wasserzaehler-hydrus-2-0.yaml
machintrucbidule commented 6 days ago

Same issue here, since esphome 2024.9.1, also after a clean build

ThomDietrich commented 6 days ago

@machintrucbidule could you share your esphome: and esp32: section?

machintrucbidule commented 6 days ago

@machintrucbidule could you share your esphome: and esp32: section?

Sorry can't copy paste from home assistant mobile app, but: Screenshot_20240923-112434

SzczepanLeon commented 6 days ago

Can you remove framework section from YAML and rebuild?

machintrucbidule commented 6 days ago

It was already not there

ThomDietrich commented 6 days ago

Isn't arduino the default? I did remove it and the resulting esphome config and error did not change

ThomDietrich commented 6 days ago

Switched to esp-idf with this result:

$ esphome run wasserzaehler-hydrus-2-0.yaml
INFO ESPHome 2024.9.0
INFO Reading configuration wasserzaehler-hydrus-2-0.yaml...
INFO Cloning https://github.com/SzczepanLeon/esphome-components.git@main
INFO Fetching main
WARNING GPIO8 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 Core config, version or integrations changed, cleaning build files...
INFO Compiling app...
Processing wasserzaehler (board: esp32-c3-devkitm-1; framework: espidf; platform: platformio/espressif32@5.4.0)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Library Manager: Installing LSatan/SmartRC-CC1101-Driver-Lib @ 2.5.7
INFO Installing LSatan/SmartRC-CC1101-Driver-Lib @ 2.5.7
Unpacking  [####################################]  100%
Library Manager: SmartRC-CC1101-Driver-Lib@2.5.7 has been installed!
INFO SmartRC-CC1101-Driver-Lib@2.5.7 has been installed!
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32-c3-devkitm-1.html
PLATFORM: Espressif 32 (5.4.0) > Espressif ESP32-C3-DevKitM-1
HARDWARE: ESP32C3 160MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-builtin, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-espidf @ 3.40407.240606 (4.4.7)
 - tool-cmake @ 3.16.4
 - tool-esptoolpy @ 1.40400.0 (4.4.0)
 - tool-idf @ 1.0.1
 - tool-mconf @ 1.4060000.20190628 (406.0.0)
 - tool-ninja @ 1.9.0
 - toolchain-esp32ulp @ 2.35.0-20220830
 - toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
Warning: the 'src_filter' option cannot be used with ESP-IDF. Select source files to build in the project CMakeLists.txt file.

Reading CMake configuration...
Library Manager: Installing SPI
Warning! Could not find the package with 'SPI' requirements for your system 'windows_amd64'
Generating assembly for certificate bundle...
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ off, Compatibility ~ soft
Library Manager: Installing SPI
Warning! Could not find the package with 'SPI' requirements for your system 'windows_amd64'
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pioenvs\wasserzaehler\src\esphome\components\copy\sensor\copy_sensor.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\esp32\core.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\esp32\gpio.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\esp32\preferences.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\mdns\mdns_component.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\mdns\mdns_esp32.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\mdns\mdns_esp8266.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\mdns\mdns_host.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\mdns\mdns_libretiny.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\mdns\mdns_rp2040.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\network\util.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\sensor\automation.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\sensor\filter.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\sensor\sensor.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\sntp\sntp_component.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\time\automation.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\time\real_time_clock.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wifi\wifi_component.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wifi\wifi_component_esp32_arduino.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wifi\wifi_component_esp8266.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wifi\wifi_component_esp_idf.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wifi\wifi_component_libretiny.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wifi\wifi_component_pico_w.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wifi_signal\wifi_signal_sensor.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wmbus\Enums.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wmbus\Telegram.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wmbus\address.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wmbus\aes.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wmbus\crc.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wmbus\decode3of6.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wmbus\driver_abbb23.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wmbus\driver_aerius.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wmbus\driver_amiplus.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wmbus\driver_apator08.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wmbus\driver_apator162.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wmbus\driver_apator172.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wmbus\driver_apatoreitn.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wmbus\driver_apatorna1.o
src/esphome/components/wmbus/Telegram.cpp: In member function 'bool Telegram::parseELL(std::vector<unsigned char>::iterator&)':
src/esphome/components/wmbus/Telegram.cpp:1215:34: error: statement has no effect [-Werror=unused-value]
         ("ELL V not yet handled");
                                  ^
Compiling .pioenvs\wasserzaehler\src\esphome\components\wmbus\driver_auto.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wmbus\driver_aventieshca.o
Compiling .pioenvs\wasserzaehler\src\esphome\components\wmbus\driver_aventieswm.o
src/esphome/components/wmbus/driver_abbb23.cpp:37:5: warning: '{anonymous}::Driver::Driver(MeterInfo&, DriverInfo&)' defined but not used [-Wunused-function]
     Driver::Driver(MeterInfo &mi, DriverInfo &di) : MeterCommonImplementation(mi, di)
     ^~~~~~
src/esphome/components/wmbus/driver_aerius.cpp:37:5: warning: '{anonymous}::Driver::Driver(MeterInfo&, DriverInfo&)' defined but not used [-Wunused-function]
     Driver::Driver(MeterInfo &mi, DriverInfo &di) : MeterCommonImplementation(mi, di)
     ^~~~~~
src/esphome/components/wmbus/driver_amiplus.cpp:39:5: warning: '{anonymous}::Driver::Driver(MeterInfo&, DriverInfo&)' defined but not used [-Wunused-function]
     Driver::Driver(MeterInfo &mi, DriverInfo &di) : MeterCommonImplementation(mi, di)
     ^~~~~~
cc1plus.exe: some warnings being treated as errors
*** [.pioenvs\wasserzaehler\src\esphome\components\wmbus\Telegram.o] Error 1
src/esphome/components/wmbus/driver_apator08.cpp:43:5: warning: '{anonymous}::Driver::Driver(MeterInfo&, DriverInfo&)' defined but not used [-Wunused-function]
     Driver::Driver(MeterInfo &mi, DriverInfo &di) : MeterCommonImplementation(mi, di)
     ^~~~~~
src/esphome/components/wmbus/driver_apator162.cpp:45:5: warning: '{anonymous}::Driver::Driver(MeterInfo&, DriverInfo&)' defined but not used [-Wunused-function]
     Driver::Driver(MeterInfo &mi, DriverInfo &di) : MeterCommonImplementation(mi, di)
     ^~~~~~
src/esphome/components/wmbus/driver_apator172.cpp:41:5: warning: '{anonymous}::Driver::Driver(MeterInfo&, DriverInfo&)' defined but not used [-Wunused-function]
     Driver::Driver(MeterInfo &mi, DriverInfo &di) : MeterCommonImplementation(mi, di)
     ^~~~~~
src/esphome/components/wmbus/driver_apatoreitn.cpp:45:5: warning: '{anonymous}::Driver::Driver(MeterInfo&, DriverInfo&)' defined but not used [-Wunused-function]
     Driver::Driver(MeterInfo &mi, DriverInfo &di) : MeterCommonImplementation(mi, di)
     ^~~~~~
src/esphome/components/wmbus/driver_apatorna1.cpp:41:5: warning: '{anonymous}::Driver::Driver(MeterInfo&, DriverInfo&)' defined but not used [-Wunused-function]
     Driver::Driver(MeterInfo &mi, DriverInfo &di) : MeterCommonImplementation(mi, di)
     ^~~~~~
src/esphome/components/wmbus/driver_aventieshca.cpp:37:5: warning: '{anonymous}::Driver::Driver(MeterInfo&, DriverInfo&)' defined but not used [-Wunused-function]
     Driver::Driver(MeterInfo &mi, DriverInfo &di) : MeterCommonImplementation(mi, di)
     ^~~~~~
src/esphome/components/wmbus/driver_aventieswm.cpp:37:5: warning: '{anonymous}::Driver::Driver(MeterInfo&, DriverInfo&)' defined but not used [-Wunused-function]
     Driver::Driver(MeterInfo &mi, DriverInfo &di) :
     ^~~~~~
machintrucbidule commented 6 days ago

For the moment I came back to 3.2.3 by changing :

external_components:
  - source: github://SzczepanLeon/esphome-components@main
    components: [ wmbus ]

to

external_components:
  - source: github://SzczepanLeon/esphome-components@3.2.3
    components: [ wmbus ]

It compiles and works again

wonsky007 commented 6 days ago

Hi!

I've also got a problem with compiling fw after updating ESPHome to 2024.9.1 even on default conf:

INFO ESPHome 2024.9.1 INFO Reading configuration /config/esphome/wmbus-reader.yaml... INFO Updating https://github.com/SzczepanLeon/esphome-components.git@main INFO Unable to import component wmbus.text_sensor: No module named 'esphome.components.wmbus.text_sensor' Failed config

text_sensor.wmbus: [source /config/esphome/wmbus-reader.yaml:96]

Platform not found: 'text_sensor.wmbus'. platform: wmbus name: Text debug for Apator 16-2

Temporary workaround:


 external_components:
   - source: github://SzczepanLeon/esphome-components@3.2.3
     components: [ wmbus ]
SzczepanLeon commented 6 days ago

I've also got a problem with compiling fw after updating ESPHome to 2024.9.1 even on default conf:

This is another topic. This is not compilation problem. Please migrate YAML to new structure. And remove Apator text_sensor.

evilmumi commented 6 days ago

I've also got a problem with compiling fw after updating ESPHome to 2024.9.1 even on default conf:

This is another topic. This is not compilation problem. Please migrate YAML to new structure. And remove Apator text_sensor.

would you be so kind and share a link "how-to"?

SzczepanLeon commented 6 days ago

would you be so kind and share a link \"how-to\"?

Just read main page.

ThomDietrich commented 6 days ago

@SzczepanLeon anything you want me to try or investigate today? Asking as I will be traveling the rest of the week.

SzczepanLeon commented 6 days ago

Not really. I don't have time to open computer and check this issue. Maybe next week (or during cloudy weekend).

evilmumi commented 6 days ago

would you be so kind and share a link "how-to"?

Just read main page.

which main? would some one be so kind please

SzczepanLeon commented 5 days ago

which main? would some one be so kind please

https://github.com/SzczepanLeon/esphome-components

SzczepanLeon commented 5 days ago

Issue seems to be related to used toolchain - toolchain-riscv32-esp

ThomDietrich commented 5 days ago

I have some c/cpp experience from the past but the macro magic in question is far beyond my understanding. I find it odd that one line right in the middle of everything is supposed to be the problem!? X(HZ,hz,"Hz",Frequency,"hz") Did you make sense of that?