Closed ThomDietrich closed 1 month ago
This error is visible also on clean build?
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
Same issue here, since esphome 2024.9.1, also after a clean build
@machintrucbidule could you share your esphome:
and esp32:
section?
@machintrucbidule could you share your
esphome:
andesp32:
section?
Sorry can't copy paste from home assistant mobile app, but:
Can you remove framework section from YAML and rebuild?
It was already not there
Isn't arduino
the default?
I did remove it and the resulting esphome config
and error did not change
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) :
^~~~~~
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
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 ]
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.
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"?
would you be so kind and share a link \"how-to\"?
Just read main page.
@SzczepanLeon anything you want me to try or investigate today? Asking as I will be traveling the rest of the week.
Not really. I don't have time to open computer and check this issue. Maybe next week (or during cloudy weekend).
would you be so kind and share a link "how-to"?
Just read main page.
which main? would some one be so kind please
which main? would some one be so kind please
Issue seems to be related to used toolchain - toolchain-riscv32-esp
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?
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.
I've tried that, unfortunately it got too big for my esp32
no such issue with 3.2.3 and old config.
@spitfire Please share YAML. Probably You compiled with all drivers - do You need all of them?
substitutions:
name: "stalowe-przedpokoj-esp32"
friendly_name: przedpokój-esp32
esphome:
name: ${name}
friendly_name: ${friendly_name}
esp32:
board: az-delivery-devkit-v4
external_components:
- source: github://SzczepanLeon/esphome-components@main
# - source: github://SzczepanLeon/esphome-components@3.2.3
components: [ wmbus ]
logger:
# level: WARN
# level: VERBOSE
# level: VERY_VERBOSE
# logs:
# api.connection: INFO
# api.service: ERROR
# api.socket: ERROR
# json: ERROR
# scheduler: ERROR
# wmbus: VERY_VERBOSE
<<: !include templates/spitfire/common/api.yaml
<<: !include templates/spitfire/common/ota.yaml
<<: !include templates/spitfire/common/wifi.yaml
<<: !include templates/spitfire/common/webserver.yaml
<<: !include templates/spitfire/common/time.yaml
bluetooth_proxy:
active: true
esp32_ble_tracker:
wmbus:
all_drivers: False
log_all: False
mosi_pin: GPIO13
clk_pin: GPIO14
miso_pin: GPIO12
gdo2_pin: GPIO4
gdo0_pin: GPIO5
cs_pin: GPIO15
binary_sensor:
- !include templates/spitfire/common/status.yaml
button:
- !include templates/spitfire/common/restart.yaml
sensor:
- !include templates/spitfire/common/esp32-internal_temperature.yaml
- !include templates/spitfire/common/wifi_signal_db.yaml
- !include templates/spitfire/common/wifi_signal_percent.yaml
- !include templates/spitfire/common/uptime.yaml
- platform: wmbus
meter_id: 0x18226019
type: bmeters
key: "00000000000000000000000000000000"
##start wMBus 4.x config
sensors:
- name: "Wodomierz ciepła woda RSSI"
field: "rssi"
accuracy_decimals: 0
unit_of_measurement: "dBm"
device_class: "signal_strength"
state_class: "measurement"
entity_category: "diagnostic"
- name: "Ciepła woda"
id: "ciepla_woda"
field: "total"
accuracy_decimals: 3
unit_of_measurement: "m³"
device_class: "water"
state_class: "total_increasing"
icon: "mdi:water"
##end wMBus 4.x config
##start wMBus 3.x config
# lqi:
# name: "Wodomierz ciepła woda lqi"
# rssi:
# name: "Wodomierz ciepła woda RSSI"
# total_water_m3:
# name: "Ciepła woda"
# id: "ciepla_woda"
##start wMBus 3.x config
- platform: wmbus
meter_id: 0x18147130 #0x18247718
type: bmeters
key: "00000000000000000000000000000000"
##start wMBus 4.x config
sensors:
- name: "Wodomierz zimna woda RSSI"
field: "rssi"
accuracy_decimals: 0
unit_of_measurement: "dBm"
device_class: "signal_strength"
state_class: "measurement"
entity_category: "diagnostic"
- name: "Zimna woda"
id: "zimna_woda"
field: "total"
accuracy_decimals: 3
unit_of_measurement: "m³"
device_class: "water"
state_class: "total_increasing"
icon: "mdi:water"
##end wMBus 4.x config
##start wMBus 3.x config
# lqi:
# name: "Wodomierz zimna woda lqi"
# rssi:
# name: "Wodomierz zimna woda RSSI"
# total_water_m3:
# name: "Zimna woda"
# id: "zimna_woda"
##start wMBus 3.x config
# - platform: wmbus
# meter_id: 0x00B8DE97
# type: bmeters
# key: "00000000000000000000000000000000"
# lqi:
# name: "Nieznany lqi"
# rssi:
# name: "Nieznany RSSI"
# total_water_m3:
# name: "Nieznany woda"
# id: "nieznany_0x00B8DE97"
light:
- platform: status_led
name: "Switch state"
pin: GPIO2
Error: The program size (1904393 bytes) is greater than maximum allowed (1835008 bytes)
Using 3.2.3 with the config that's commented out above it is 1771265 bytes.
Is it necessary to spam this thread with unrelated issues? I don't want to be the party pooper but this could have been its own ticket 😇
Btw looking at your code I wonder if you want to rethink your multi-file design with packages. See an example here.
Is it necessary to spam this thread with unrelated issues? I don't want to be the party pooper but this could have been its own ticket 😇
@SzczepanLeon I can create another issue for it if you think it's necessary
Btw looking at your code I wonder if you want to rethink your multi-file design with packages. See an example here.
No thanks, I'm good
My current concern is that pretty much the same configuration works with 3.x and doesn't with 4.x
I can create another issue for it if you think it's necessary
No - because this is not an issue.
No - because this is not an issue.
It does not fit (while the previous version did) on a device that's designed to run on with not much else going on on it. Am I "holding it wrong"?
This is software on COTS HW, so it is up to you how to fit it. You can remove BLE and try again, or change HW or change partitions layout. But all solutions are not related to my component.
This is software on COTS HW, so it is up to you how to fit it.
Well it used to, and now it doesn't, based solely on changes in your component. It is the only thing that changed here. With no apparent benefit to my use case.
You can remove BLE and try again, or change HW or change partitions layout. But all solutions are not related to my component.
For BLE I don't want to - why would I want to remove functionality (which is helpful to me) my device currently can provide, and for no apparent benefit?
As for partitioning (apart from it being a big hassle - again for no apparent reason/benefit) unfortunately I can't - the device is far from me and I can't access it physically.
You can slice this issue however you want, and obviously it's up to you what you want to do with your software, how (and if) do you want to support it. I'm just saying it got much bigger than it used to be, which breaks my (and not sure how many other peoples') use case.
You can always stay on v3.x
Back to the issue.
I tried to update the toolchain beyond toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
but that just brings other issues with it. Do you have a hunch what the compiler error stands for? I might play around with the source code some time later...
I don't have time to check it. But first thing I will do is to add lots of brackets "()" to those DEFINEs.
Back to the issue.
I tried to update the toolchain beyond
toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
but that just brings other issues with it. Do you have a hunch what the compiler error stands for? I might play around with the source code some time later...
have you tried cleaning up your build files? It helped me with weird build issues like that.
@ThomDietrich please try version 4.0.7
Hey! I can confirm that the code is compiling now. Thank you!!
Fyi
RAM: [= ] 12.1% (used 39668 bytes from 327680 bytes)
Flash: [====== ] 62.6% (used 1148608 bytes from 1835008 bytes)
@spitfire we are only one step further sadly. My ESP32C3 goes into a boot loop. I will try with another ESP32 I have lying around. Could you please share which board/model you used when testing the v4.0? Thanks
@spitfire we are only one step further sadly. My ESP32C3 goes into a boot loop. I will try with another ESP32 I have lying around. Could you please share which board/model you used when testing the v4.0? Thanks
I was testing it with an ESP8266 and this ESP32 board: https://www.amazon.pl/AZDelivery-ESP32-Development-następca-kompatybilny/dp/B074RGW2VQ
Please be precise. Include serial logs and create new issue ...
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:
You get:
Edit: here is my complete config: