Open fornellas opened 5 months ago
When attempting to OTA, the watchdog kicks in and OTA fails.
2023.12.5
Docker
N/A
ESP32
ESP32-C3-MINI-1
ota
esphome: name: "presence" friendly_name: "Presence" name_add_mac_suffix: true on_boot: - priority: 600.0 then: - lambda: |- // Default: Connecting id(wifi_led_pwm).set_level(0.5); id(wifi_led_pwm).set_period(1000); id(wifi_led_pwm).turn_on(); - script.execute: fast_reboot_factory_reset - switch.turn_off: ld2410_bluetooth - button.press: ld2410_query_params on_loop: then: - lambda: |- // Captive portal if(id(wifi_component).has_ap() && !id(wifi_component).has_sta()) { id(wifi_led_pwm).set_level(0.5); id(wifi_led_pwm).set_period(200); } else { id(wifi_led_pwm).set_period(1000); // Connected if(id(wifi_component).is_connected()) id(wifi_led_pwm).set_level(1); // Connecting else id(wifi_led_pwm).set_level(0.5); } esp32: board: esp32-c3-devkitm-1 globals: - id: fast_reboot type: int restore_value: yes initial_value: '0' - id: factory_reset_reboot_counter type: int initial_value: '2' logger: baud_rate: 115200 level: debug script: - id: fast_reboot_factory_reset then: - if: condition: lambda: return ( id(fast_reboot) >= id(factory_reset_reboot_counter) ); then: - lambda: |- ESP_LOGI("Fast Boot Factory Reset", "Performing factotry reset"); id(fast_reboot) = 0; fast_reboot->loop(); global_preferences->sync(); - button.press: factory_reset_button - lambda: |- if(id(fast_reboot) > 0) ESP_LOGI("Fast Boot Factory Reset", "Quick reboot %d/%d, do it %d more times to factory reset", id(fast_reboot), id(factory_reset_reboot_counter), id(factory_reset_reboot_counter) - id(fast_reboot)); id(fast_reboot) += 1; fast_reboot->loop(); global_preferences->sync(); - delay: 10s - lambda: |- id(fast_reboot) = 0; fast_reboot->loop(); global_preferences->sync(); wifi: id: wifi_component ap: ap_timeout: 0s reboot_timeout: 0s captive_portal: web_server: api: reboot_timeout: 0s ota: safe_mode: false prometheus: debug: update_interval: 5s uart: baud_rate: 256000 tx_pin: 2 rx_pin: 1 parity: NONE stop_bits: 1 i2c: sda: 7 scl: 6 scan: false ld2410: id: ld2410_sensor binary_sensor: - platform: ld2410 has_target: name: 'Hi-Link HLK-LD2410: Presence (UART)' icon: 'mdi:motion-sensor' has_moving_target: name: 'Hi-Link HLK-LD2410: Presence moving' icon: 'mdi:motion-sensor' has_still_target: name: 'Hi-Link HLK-LD2410: Presence still' icon: 'mdi:motion-sensor' out_pin_presence_status: name: 'Hi-Link HLK-LD2410: Presence GPIO indicates' icon: 'mdi:motion-sensor' entity_category: "diagnostic" - platform: gpio pin: 3 name: 'Hi-Link HLK-LD2410: Presence (GPIO)' id: presence_gpio device_class: presence icon: 'mdi:motion-sensor' on_press: then: - output.turn_on: presence_led on_release: then: - output.turn_off: presence_led - platform: status name: "Status" sensor: - platform: uptime name: "Uptime" update_interval: 1s - platform: wifi_signal name: "WiFi Signal" unit_of_measurement: "dB" icon: 'mdi:signal' update_interval: 5s - platform: debug free: name: "Debug: Heap Free" block: name: "Debug: Heap Largest Contiguous Free Block" loop_time: name: "Debug: Loop Time" - platform: ld2410 # Engineering Mode light: name: 'Hi-Link HLK-LD2410: Light' icon: 'mdi:brightness-5' moving_distance: name: 'Hi-Link HLK-LD2410: Presence moving distance' unit_of_measurement: "cm" icon: 'mdi:motion-sensor' still_distance: name: 'Hi-Link HLK-LD2410: Presence still distance' unit_of_measurement: "cm" icon: 'mdi:motion-sensor' moving_energy: name: 'Hi-Link HLK-LD2410: Presence moving energy' unit_of_measurement: "%" icon: 'mdi:motion-sensor' still_energy: name: 'Hi-Link HLK-LD2410: Presence still energy' unit_of_measurement: "%" icon: 'mdi:motion-sensor' detection_distance: name: 'Hi-Link HLK-LD2410: Presence distance' unit_of_measurement: "cm" icon: 'mdi:ruler' g0: # Engineering Mode move_energy: name: 'Hi-Link HLK-LD2410: Presence moving gate 0 energy' icon: 'mdi:percent' # Engineering Mode still_energy: name: 'Hi-Link HLK-LD2410: Presence still gate 0 energy' icon: 'mdi:percent' g1: # Engineering Mode move_energy: name: 'Hi-Link HLK-LD2410: Presence moving gate 1 energy' icon: 'mdi:percent' # Engineering Mode still_energy: name: 'Hi-Link HLK-LD2410: Presence still gate 1 energy' icon: 'mdi:percent' g2: # Engineering Mode move_energy: name: 'Hi-Link HLK-LD2410: Presence moving gate 2 energy' icon: 'mdi:percent' # Engineering Mode still_energy: name: 'Hi-Link HLK-LD2410: Presence still gate 2 energy' icon: 'mdi:percent' g3: # Engineering Mode move_energy: name: 'Hi-Link HLK-LD2410: Presence moving gate 3 energy' icon: 'mdi:percent' # Engineering Mode still_energy: name: 'Hi-Link HLK-LD2410: Presence still gate 3 energy' icon: 'mdi:percent' g4: # Engineering Mode move_energy: name: 'Hi-Link HLK-LD2410: Presence moving gate 4 energy' icon: 'mdi:percent' # Engineering Mode still_energy: name: 'Hi-Link HLK-LD2410: Presence still gate 4 energy' icon: 'mdi:percent' g5: # Engineering Mode move_energy: name: 'Hi-Link HLK-LD2410: Presence moving gate 5 energy' icon: 'mdi:percent' # Engineering Mode still_energy: name: 'Hi-Link HLK-LD2410: Presence still gate 5 energy' icon: 'mdi:percent' g6: # Engineering Mode move_energy: name: 'Hi-Link HLK-LD2410: Presence moving gate 6 energy' icon: 'mdi:percent' # Engineering Mode still_energy: name: 'Hi-Link HLK-LD2410: Presence still gate 6 energy' icon: 'mdi:percent' g7: # Engineering Mode move_energy: name: 'Hi-Link HLK-LD2410: Presence moving gate 7 energy' icon: 'mdi:percent' # Engineering Mode still_energy: name: 'Hi-Link HLK-LD2410: Presence still gate 7 energy' icon: 'mdi:percent' g8: # Engineering Mode move_energy: name: 'Hi-Link HLK-LD2410: Presence moving gate 8 energy' icon: 'mdi:percent' # Engineering Mode still_energy: name: 'Hi-Link HLK-LD2410: Presence still gate 8 energy' icon: 'mdi:percent' - platform: bh1750 name: "Rohms BH1750" address: 0x23 update_interval: 1s unit_of_measurement: "lx" icon: 'mdi:brightness-5' output: - platform: slow_pwm id: wifi_led_pwm period: 1s pin: 5 - platform: gpio pin: 4 id: presence_led switch: - platform: ld2410 engineering_mode: name: "Hi-Link HLK-LD2410: Engineering mode" id: ld2410_engineering_mode icon: 'mdi:chip' # internal: true # on_turn_off: # - switch.turn_on: ld2410_engineering_mode bluetooth: id: ld2410_bluetooth name: "Hi-Link HLK-LD2410: Bluetooth" icon: 'mdi:bluetooth' number: - platform: ld2410 timeout: name: 'Hi-Link HLK-LD2410: Presence timeout' unit_of_measurement: "s" icon: 'mdi:timer-outline' light_threshold: name: 'Hi-Link HLK-LD2410: Light threshold' icon: 'mdi:brightness-5' max_move_distance_gate: name: 'Hi-Link HLK-LD2410: Presence moving max distance gate' icon: 'mdi:ruler' max_still_distance_gate: name: 'Hi-Link HLK-LD2410: Presence still max distance gate' icon: 'mdi:ruler' g0: move_threshold: name: 'Hi-Link HLK-LD2410: Presence moving gate 0 threshold' unit_of_measurement: "%" icon: 'mdi:percent' still_threshold: name: 'Hi-Link HLK-LD2410: Presence still gate 0 threshold' unit_of_measurement: "%" icon: 'mdi:percent' g1: move_threshold: name: 'Hi-Link HLK-LD2410: Presence moving gate 1 threshold' unit_of_measurement: "%" icon: 'mdi:percent' still_threshold: name: 'Hi-Link HLK-LD2410: Presence still gate 1 threshold' unit_of_measurement: "%" icon: 'mdi:percent' g2: move_threshold: name: 'Hi-Link HLK-LD2410: Presence moving gate 2 threshold' unit_of_measurement: "%" icon: 'mdi:percent' still_threshold: name: 'Hi-Link HLK-LD2410: Presence still gate 2 threshold' unit_of_measurement: "%" icon: 'mdi:percent' g3: move_threshold: name: 'Hi-Link HLK-LD2410: Presence moving gate 3 threshold' unit_of_measurement: "%" icon: 'mdi:percent' still_threshold: name: 'Hi-Link HLK-LD2410: Presence still gate 3 threshold' unit_of_measurement: "%" icon: 'mdi:percent' g4: move_threshold: name: 'Hi-Link HLK-LD2410: Presence moving gate 4 threshold' unit_of_measurement: "%" icon: 'mdi:percent' still_threshold: name: 'Hi-Link HLK-LD2410: Presence still gate 4 threshold' unit_of_measurement: "%" icon: 'mdi:percent' g5: move_threshold: name: 'Hi-Link HLK-LD2410: Presence moving gate 5 threshold' unit_of_measurement: "%" icon: 'mdi:percent' still_threshold: name: 'Hi-Link HLK-LD2410: Presence still gate 5 threshold' unit_of_measurement: "%" icon: 'mdi:percent' g6: move_threshold: name: 'Hi-Link HLK-LD2410: Presence moving gate 6 threshold' unit_of_measurement: "%" icon: 'mdi:percent' still_threshold: name: 'Hi-Link HLK-LD2410: Presence still gate 6 threshold' unit_of_measurement: "%" icon: 'mdi:percent' g7: move_threshold: name: 'Hi-Link HLK-LD2410: Presence moving gate 7 threshold' unit_of_measurement: "%" icon: 'mdi:percent' still_threshold: name: 'Hi-Link HLK-LD2410: Presence still gate 7 threshold' unit_of_measurement: "%" icon: 'mdi:percent' g8: move_threshold: name: 'Hi-Link HLK-LD2410: Presence moving gate 8 threshold' unit_of_measurement: "%" icon: 'mdi:percent' still_threshold: name: 'Hi-Link HLK-LD2410: Presence still gate 8 threshold' unit_of_measurement: "%" icon: 'mdi:percent' button: - platform: ld2410 factory_reset: name: "Hi-Link HLK-LD2410: Factory reset" icon: 'mdi:restart' restart: name: "Hi-Link HLK-LD2410: Restart" id: ld2410_restart icon: 'mdi:restart' query_params: name: 'Hi-Link HLK-LD2410: Query params' id: ld2410_query_params - platform: restart name: "Restart" - platform: safe_mode name: "Safe Mode" - platform: factory_reset id: factory_reset_button name: "Factory Reset" text_sensor: - platform: wifi_info ip_address: name: "Wifi Info: IP Address" ssid: name: "Wifi Info: SSID" bssid: name: "Wifi Info: BSSID" mac_address: name: "Wifi Info: MAC Address" dns_address: name: "Wifi Info: DNS Address" - platform: debug device: name: "Debug: Device Info" reset_reason: name: "Debug: Reset Reason" - platform: ld2410 version: name: "Hi-Link HLK-LD2410: Firmware version" icon: 'mdi:chip' mac_address: name: "Hi-Link HLK-LD2410: Bluetooth MAC address" icon: 'mdi:bluetooth' select: - platform: ld2410 distance_resolution: name: "Hi-Link HLK-LD2410: Presence distance resolution" icon: 'mdi:ruler' baud_rate: name: "Hi-Link HLK-LD2410: Baud rate" icon: '' light_function: name: 'Hi-Link HLK-LD2410: Light function' icon: 'mdi:brightness-5' out_pin_level: name: 'Hi-Link HLK-LD2410: Presence GPIO pin level' icon: 'mdi:motion-sensor' text: - platform: template name: "Hi-Link HLK-LD2410: Bluetooth password" optimistic: true min_length: 6 max_length: 6 mode: text on_value: then: - bluetooth_password.set: id: ld2410_sensor password: !lambda 'return x;'
D][sensor:094]: 'Debug: Heap Free': Sending state 158544.00000 B with 0 decimals of accuracy [D][sensor:094]: 'Debug: Heap Largest Contiguous Free Block': Sending state 124916.00000 B with 0 decimals of accuracy [D][sensor:094]: 'Debug: Loop Time': Sending state 58.00000 ms with 0 decimals of accuracy [I][web_server_base:046]: OTA Update Start: presence.bin [D][web_server_base:079]: OTA in progress: 0.1% [D][sensor:094]: 'WiFi Signal': Sending state -48.00000 dB with 0 decimals of accuracy [W][component:214]: Component wifi_signal.sensor took a long time for an operation (0.53 s). [W][component:215]: Components should block for at most 20-30ms. [D][sensor:094]: 'Hi-Link HLK-LD2410: Presence moving distance': Sending state 116.00000 cm with 0 decimals of accuracy [D][sensor:094]: 'Hi-Link HLK-LD2410: Presence moving energy': Sending state 33.00000 % with 0 decimals of accuracy [D][web_server_base:079]: OTA in progress: 22.6% [D][sensor:094]: 'Hi-Link HLK-LD2410: Presence still distance': Sending state 75.00000 cm with 0 decimals of accuracy [D][sensor:094]: 'Hi-Link HLK-LD2410: Presence distance': Sending state 59.00000 cm with 0 decimals of accuracy [D][web_server_base:079]: OTA in progress: 33.8% [D][sensor:094]: 'Hi-Link HLK-LD2410: Presence moving distance': Sending state 80.00000 cm with 0 decimals of accuracy [D][sensor:094]: 'Hi-Link HLK-LD2410: Presence moving energy': Sending state 100.00000 % with 0 decimals of accuracy [D][sensor:094]: 'Hi-Link HLK-LD2410: Presence still distance': Sending state 116.00000 cm with 0 decimals of accuracy [D][web_server_base:079]: OTA in progress: 59.3% [D][sensor:094]: 'Hi-Link HLK-LD2410: Presence distance': Sending state 60.00000 cm with 0 decimals of accuracy [D][web_server_base:079]: OTA in progress: 72.5% (30569) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:mals of accuracy E (30569) task_wdt: - loopTask (CPU 0) E (30569) task_wdt: Tasks currently running: E (30569) task_wdt: CPU 0: async_tcp E (30569) task_wdt: Aborting. abort() was called at PC 0x42041e73 on core 0 Core 0 register dump: MEPC : 0x4038296a RA : 0x40387c5c SP : 0x3fc940f0 GP : 0x3fc8f400 TP : 0x3fc99210 T0 : 0x37363534 T1 : 0x7271706f T2 : 0x33323130 S0/FP : 0x3fc9411c S1 : 0x3fc9411c A0 : 0x3fc94128 A1 : 0x3fc9410a A2 : 0x00000000 A3 : 0x3fc94155 A4 : 0x00000001 A5 : 0x3fc98000 A6 : 0x7a797877 A7 : 0x76757473 S2 : 0x3fc97bc4 S3 : 0x7fffffff S4 : 0x3fc907b4 S5 : 0x3fc907a4 S6 : 0x3fc907ac S7 : 0x3fc907a4 S8 : 0x3c0eb000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000 T3 : 0x6e6d6c6b T4 : 0x6a696867 T5 : 0x66656463 T6 : 0x62613938 MSTATUS : 0x00001801 MTVEC : 0x40380001 MCAUSE : 0x00000007 MTVAL : 0x00000000 MHARTID : 0x00000000 Stack memory: 3fc940f0: 0x00000000 0x00000000 0x3fc94108 0x4038d636 0x3fc907ac 0x3fc907a4 0x3fc90030 0x3fc91438 3fc94110: 0x3fc9411c 0x3fc91454 0x3fc94108 0x34303234 0x33376531 0x00000000 0x726f6261 0x20292874 3fc94130: 0x20736177 0x6c6c6163 0x61206465 0x43502074 0x34783020 0x31343032 0x20333765 0x63206e6f 3fc94150: 0x2065726f 0x00000030 0x3c0d0000 0xce27fdd3 0x600c2000 0x3c0df000 0x3fc98000 0x42041e76 3fc94170: 0x00009000 0x00000001 0x0000888e 0x00007769 0x3fce0000 0x3fce0000 0x3fcab2ec 0x0000000a 3fc94190: 0x00000001 0x3fc98000 0x0000059b 0x00000001 0x00001881 0x80000007 0x3fcb985c 0x403801ee 3fc941b0: 0x00000001 0x3fc941b8 0xffffffff 0x3fca0c90 0x3fca0c90 0x00000000 0x3fc941cc 0xffffffff 3fc941d0: 0x3fc941cc 0x3fc941cc 0x00000000 0x3fc941e0 0xffffffff 0x3fc941e0 0x3fc941e0 0x00000001 3fc941f0: 0x3fc941f4 0xffffffff 0x3fcb68cc 0x3fcb68cc 0x00000000 0x3fc94208 0xffffffff 0x3fc94208 3fc94210: 0x3fc94208 0x00000000 0x3fc9421c 0xffffffff 0x3fc9421c 0x3fc9421c 0x00000000 0x3fc94230 3fc94230: 0xffffffff 0x3fc94230 0x3fc94230 0x00000000 0x3fc94244 0xffffffff 0x3fc94244 0x3fc94244 3fc94250: 0x00000000 0x3fc94258 0xffffffff 0x3fc94258 0x3fc94258 0x00000000 0x3fc9426c 0xffffffff 3fc94270: 0x3fc9426c 0x3fc9426c 0x00000000 0x3fc94280 0xffffffff 0x3fc94280 0x3fc94280 0x00000000 3fc94290: 0x3fc94294 0xffffffff 0x3fc94294 0x3fc94294 0x00000000 0x3fc942a8 0xffffffff 0x3fc942a8 3fc942b0: 0x3fc942a8 0x00000000 0x3fc942bc 0xffffffff 0x3fc942bc 0x3fc942bc 0x00000000 0x3fc942d0 3fc942d0: 0xffffffff 0x3fc942d0 0x3fc942d0 0x00000000 0x3fc942e4 0xffffffff 0x3fc942e4 0x3fc942e4 3fc942f0: 0x00000000 0x3fc942f8 0xffffffff 0x3fc942f8 0x3fc942f8 0x00000000 0x3fc9430c 0xffffffff 3fc94310: 0x3fc9430c 0x3fc9430c 0x00000000 0x3fc94320 0xffffffff 0x3fc94320 0x3fc94320 0x00000000 3fc94330: 0x3fc94334 0xffffffff 0x3fc94334 0x3fc94334 0x00000000 0x3fc94348 0xffffffff 0x3fc94348 3fc94350: 0x3fc94348 0x00000000 0x3fc9435c 0xffffffff 0x3fc9435c 0x3fc9435c 0x00000000 0x3fc94370 3fc94370: 0xffffffff 0x3fc94370 0x3fc94370 0x00000000 0x3fc94384 0xffffffff 0x3fc94384 0x3fc94384 3fc94390: 0x00000000 0x3fc94398 0xffffffff 0x3fc94398 0x3fc94398 0x00000001 0x3fc943ac 0xffffffff 3fc943b0: 0x3fc9ff3c 0x3fc9ff3c 0x00000000 0x3fc943c0 0xffffffff 0x3fc943c0 0x3fc943c0 0x00000000 3fc943d0: 0x3fc943d4 0xffffffff 0x3fc943d4 0x3fc943d4 0x00000006 0x3fc943e8 0xffffffff 0x3fca91f0 3fc943f0: 0x3fcad3e4 0x00000000 0x3fc943fc 0xffffffff 0x3fc943fc 0x3fc943fc 0x00000000 0x3fc94408 3fc94410: 0x00000000 0x00000000 0x00000000 0x3fc94420 0xffffffff 0x3fc94420 0x3fc94420 0x00000000 3fc94430: 0x3fc94434 0xffffffff 0x3fc94434 0x3fc94434 0x00000001 0x00000001 0x00000000 0x0001ffff 3fc94450: 0x00000000 0xb33fffff 0x00000000 0x00000000 0x3fc9445c 0x00000000 0x00000000 0x00000000 3fc94470: 0x3fc94474 0xffffffff 0x3fc94474 0x3fc94474 0x00000000 0x3fc94488 0xffffffff 0x3fc94488 3fc94490: 0x3fc94488 0x00000001 0x00000001 0x00000000 0x0001ffff 0x00000000 0xb33fffff 0x00000000 3fc944b0: 0x00000000 0x3fc99024 0x3fc9908c 0x3fc990f4 0x00000000 0x00000000 0x00000001 0x00000000 3fc944d0: 0x00000000 0x00000000 0x420b168e 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 ELF file SHA256: 0000000000000000 Rebooting... ESP-ROM:esp32c3-api1-20210207 Build:Feb 7 2021 rst:0x3 (RTC_SW_SYS_RST),boot:0xc (SPI_FAST_FLASH_BOOT) Saved PC:0x4038252a SPIWP:0xee mode:DIO, clock div:1 load:0x3fcd6100,len:0x438 load:0x403ce000,len:0x918 load:0x403d0000,len:0x24e4 entry 0x403ce000 [I][logger:355]: Log initialized
If I phisically disconnect both sensors (LD2410 and BH1750), while both of them are failing, upload seems to work.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
The problem
When attempting to OTA, the watchdog kicks in and OTA fails.
Which version of ESPHome has the issue?
2023.12.5
What type of installation are you using?
Docker
Which version of Home Assistant has the issue?
N/A
What platform are you using?
ESP32
Board
ESP32-C3-MINI-1
Component causing the issue
ota
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
If I phisically disconnect both sensors (LD2410 and BH1750), while both of them are failing, upload seems to work.