Open stintel opened 3 years ago
Still an issue on 2021.11.1.
Also an issue with the API component on esp-idf:
INFO Reading configuration /config/esphome/home-power-monitor.yaml... INFO Generating C++ source... INFO Compiling app... Processing home-power-monitor (board: esp-wrover-kit; framework: espidf; platform: platformio/espressif32 @ 3.3.2) -------------------------------------------------------------------------------- HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash - framework-espidf 3.40300.0 (4.3.0) - tool-cmake 3.16.4 - tool-ninja 1.7.1 Installing ESP-IDF's Python dependencies Collecting future>=0.15.2 Downloading future-0.18.2.tar.gz (829 kB) Collecting pyparsing<2.4.0,>=2.0.3 Downloading pyparsing-2.3.1-py2.py3-none-any.whl (61 kB) Building wheels for collected packages: future Building wheel for future (setup.py): started Building wheel for future (setup.py): finished with status 'done' Created wheel for future: filename=future-0.18.2-py3-none-any.whl size=491059 sha256=a8e3057a7138927528463afe1eb8156cf226189443aae5dc18eee28fab2e21a1 Stored in directory: /root/.cache/pip/wheels/2f/a0/d3/4030d9f80e6b3be787f19fc911b8e7aa462986a40ab1e4bb94 Successfully built future Installing collected packages: pyparsing, future Successfully installed future-0.18.2 pyparsing-2.3.1 Reading CMake configuration... No dependencies Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/emporia_vue/emporia_vue.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/esp32/core.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/esp32/preferences.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/i2c/i2c.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/logger/logger.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/md5/md5.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/mdns/mdns_component.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/network/util.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/ota/ota_backend_arduino_esp32.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/ota/ota_backend_arduino_esp8266.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/ota/ota_backend_esp_idf.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/ota/ota_component.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/sensor/automation.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/sensor/filter.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/sensor/sensor.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/socket/bsd_sockets_impl.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/socket/lwip_raw_tcp_impl.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/wifi/wifi_component.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/wifi/wifi_component_esp32_arduino.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/wifi/wifi_component_esp8266.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/wifi/wifi_component_esp_idf.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/core/application.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/core/color.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/core/component.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/core/controller.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/core/entity_base.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/core/helpers.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/core/log.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/core/scheduler.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/core/util.o Compiling /data/home-power-monitor/.pioenvs/home-power-monitor/src/main.o Linking /data/home-power-monitor/.pioenvs/home-power-monitor/firmware.elf /data/cache/platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/mdns/mdns_component.o:(.literal._ZN7esphome4mdns13MDNSComponent16compile_records_Ev+0x4): undefined reference to `esphome::api::global_api_server' /data/cache/platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/mdns/mdns_component.o:(.literal._ZN7esphome4mdns13MDNSComponent16compile_records_Ev+0x30): undefined reference to `esphome::api::APIServer::get_port() const' /data/cache/platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/home-power-monitor/.pioenvs/home-power-monitor/src/esphome/components/mdns/mdns_component.o: in function `esphome::mdns::MDNSComponent::compile_records_()': /config/esphome/.esphome/build/home-power-monitor/src/esphome/components/mdns/mdns_component.cpp:31: undefined reference to `esphome::api::APIServer::get_port() const' /data/cache/platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/home-power-monitor/.pioenvs/home-power-monitor/src/main.o:(.literal._Z5setupv+0xcc): undefined reference to `esphome::api::APIServer::APIServer()' /data/cache/platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/home-power-monitor/.pioenvs/home-power-monitor/src/main.o:(.literal._Z5setupv+0xd0): undefined reference to `esphome::api::APIServer::set_port(unsigned short)' /data/cache/platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/home-power-monitor/.pioenvs/home-power-monitor/src/main.o:(.literal._Z5setupv+0xd4): undefined reference to `esphome::api::APIServer::set_password(std::__cxx11::basic_string, std::allocator > const&)' /data/cache/platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/home-power-monitor/.pioenvs/home-power-monitor/src/main.o:(.literal._Z5setupv+0xd8): undefined reference to `esphome::api::APIServer::set_reboot_timeout(unsigned int)' /data/cache/platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/home-power-monitor/.pioenvs/home-power-monitor/src/main.o: in function `setup()': /config/esphome/.esphome/build/home-power-monitor/src/main.cpp:79: undefined reference to `esphome::api::APIServer::APIServer()' /data/cache/platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /config/esphome/.esphome/build/home-power-monitor/src/main.cpp:80: undefined reference to `esphome::api::APIServer::set_port(unsigned short)' /data/cache/platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /config/esphome/.esphome/build/home-power-monitor/src/main.cpp:83: undefined reference to `esphome::api::APIServer::set_password(std::__cxx11::basic_string , std::allocator > const&)' /data/cache/platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /data/home-power-monitor/.pioenvs/home-power-monitor/src/main.o: in function `setup()': /data/cache/platformio/packages/toolchain-xtensa32/xtensa-esp32-elf/include/c++/8.4.0/bits/basic_string.h:657: undefined reference to `esphome::api::APIServer::set_reboot_timeout(unsigned int)' collect2: error: ld returned 1 exit status *** [/data/home-power-monitor/.pioenvs/home-power-monitor/firmware.elf] Error 1 ========================= [FAILED] Took 157.93 seconds =========================
substitutions: device_name: home-power-monitor friendly_name: Home Power Monitor assigned_ip_address: "192.168.86.223" esphome: name: ${device_name} esp32: board: esp-wrover-kit framework: type: esp-idf wifi: ssid: !secret wifi_ssid password: !secret wifi_password use_address: ${assigned_ip_address} ota: logger: level: VERY_VERBOSE api: i2c: sensor: - platform: emporia_vue update_interval: 1s phases: - id: phase_a input: BLACK power: - name: "A" phase_id: phase_a input: "A" external_components: - source: github://krconv/esphome@add-emporia-vue components: [emporia_vue] refresh: 1min
Also an issue with the API component on esp-idf:
Please report a separate issue for this. It's a different bug. Undefined reference, yes, but in a completely different component.
Actually, I fixed it by deleting my build directory and re-building
Actually, I fixed it by deleting my build directory and re-building
was this in relation to the api component or the ble tracker? i'm still seeing the same ble tracking error.
I also have the exact same issue with the ble tracker.
Running into this issue as well. Any fixes? Deleted build directory and did a full clean. I have exact same board as well.
I came up with this but was unable to test so far as esphome/esphome@272ceadbb00d5980aa00c0ad5043878a330d275f seems to break with podman.
diff --git a/esphome/components/esp32_ble/__init__.py b/esphome/components/esp32_ble/__init__.py
index 4b5c741a..2a0c9fa8 100644
--- a/esphome/components/esp32_ble/__init__.py
+++ b/esphome/components/esp32_ble/__init__.py
@@ -2,7 +2,7 @@ import esphome.codegen as cg
import esphome.config_validation as cv
from esphome.const import CONF_ID
from esphome.core import CORE
-from esphome.components.esp32 import add_idf_sdkconfig_option
+from esphome.components.esp32 import add_idf_sdkconfig_option, is_esp32c3
DEPENDENCIES = ["esp32"]
CODEOWNERS = ["@jesserockz"]
@@ -25,3 +25,6 @@ async def to_code(config):
if CORE.using_esp_idf:
add_idf_sdkconfig_option("CONFIG_BT_ENABLED", True)
+
+ if is_esp32c3:
+ cg.add_build_flag("-DBLE_42_FEATURE_SUPPORT")
Fixed by adding sdkconfig_options: CONFIG_BT_BLE_42_FEATURES_SUPPORTED: y
to config file under esp32 section
For other noobs (like me) sdkconfig_options goes under framework, under esp32; might save you a few minutes.
esp32:
board: esp32-c3-devkitm-1
framework:
type: esp-idf
sdkconfig_options:
CONFIG_BT_BLE_42_FEATURES_SUPPORTED: y
Possibly dumb question - will esp32_ble_tracker support bluetooth 5 on the c3, or do we need a NIMBLE port? Also - thanks for the fix - will give it a try.
sdkconfig_options: CONFIG_BT_BLE_42_FEATURES_SUPPORTED: y
I'm seeing some side effects of this, intermittently not connecting to wifi with [D][esp-idf:000]: Error! Should use default active scan time parameter for WiFi scan when Bluetooth is enabled!!!!!!
and OTA breaking if I enable esp32_ble_tracker
.
OTA fails like so:
INFO Reading configuration c3.yaml...
..
INFO Uploading .esphome/build/c3/.pioenvs/c3/firmware.bin (1344256 bytes)
ERROR Error receiving acknowledge binary size: timed out
log show
[15:06:55][D][ota:136]: Starting OTA Update from 10.10.0.119...
[15:06:55][V][ota:167]: OTA features is 0x01
[15:06:55][V][ota:250]: OTA size is 1344256 bytes
[15:07:00]E (23241) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
[15:07:00]E (23241) task_wdt: - loopTask (CPU 0)
[15:07:00]E (23241) task_wdt: Tasks currently running:
[15:07:00]E (23241) task_wdt: CPU 0: loopTask
[15:07:00]E (23241) task_wdt: Aborting.
followed by
OTA fails like so:
INFO Reading configuration c3.yaml... .. INFO Uploading .esphome/build/c3/.pioenvs/c3/firmware.bin (1344256 bytes) ERROR Error receiving acknowledge binary size: timed out
Same here. Adding CONFIG_ESP_TASK_WDT: n
seems to solve that.
Same here. Adding
CONFIG_ESP_TASK_WDT: n
seems to solve that.
Perfect! Thanks, seems to work here as well.
Same here. Adding
CONFIG_ESP_TASK_WDT: n
seems to solve that.
Looks like keeping the task watchdog timer enabled and increasing the timeout from default 5 to 10 also solves the problem. This is probably better than completely disabling it.
CONFIG_ESP_TASK_WDT: y
CONFIG_ESP_TASK_WDT_TIMEOUT_S: "10"
The suggestion in #2968 fixed my problem:
Fixed by adding
sdkconfig_options: CONFIG_BT_BLE_42_FEATURES_SUPPORTED: y
to config file.
The problem
Enabling esp32_ble_tracker on ESP32-IDF causes link failure.
Which version of ESPHome has the issue?
2021.10.2
What type of installation are you using?
Docker
Which version of Home Assistant has the issue?
NA
What platform are you using?
ESP32-IDF
Board
esp32-c3-devkitm-1
Component causing the issue
esp32_ble_tracker
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response