esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
288 stars 34 forks source link

http request cause wdt reset if server is unavailable #5822

Open drakesoft opened 1 week ago

drakesoft commented 1 week ago

The problem

Hi, I tried to figure out if another network device is available. Unfortunately there is no ping function in esphome so I decide to detect the webinterface of the network device. This seem to work but cause a wdt restart if the target device is unavailable.

Which version of ESPHome has the issue?

2024.5.0

What type of installation are you using?

pip

Which version of Home Assistant has the issue?

No response

What platform are you using?

ESP32

Board

No response

Component causing the issue

No response

Example YAML snippet

esphome:
  name: contest                        

esp32:
  board: lolin32_lite
  framework:
    type: arduino

# Enable logging
logger:
    level: DEBUG
    #level: INFO

wifi:
  ssid: xxx
  password: xxx
  use_address: 192.168.0.155

http_request:
  useragent: esphome/device
  timeout: 5s

interval:
  - interval: 10s
    then:
    - http_request.get:
        url: http://192.168.0.70
        on_response:
            then:
                - lambda: !lambda |-
                    ESP_LOGD("custom", "70: %i", status_code);                      

  - interval: 1s                    
    then:
        - lambda: !lambda |-
            ESP_LOGD("custom", "ALIVE");

Anything in the logs that might be useful for us?

[21:58:12]E (24246) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
[21:58:12]E (24246) task_wdt:  - loopTask (CPU 1)
[21:58:12]E (24246) task_wdt: Tasks currently running:
[21:58:12]E (24246) task_wdt: CPU 0: IDLE
[21:58:12]E (24246) task_wdt: CPU 1: IDLE
[21:58:12]E (24246) task_wdt: Aborting.
[21:58:12]
[21:58:12]abort() was called at PC 0x400e7935 on core 0
[21:58:12]
[21:58:12]
[21:58:12]Backtrace:0x40083791:0x3ffbe9bc |<-CORRUPTED
WARNING Found stack trace! Trying to decode it
WARNING Decoded 0x40083791: panic_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/panic.c:402

Additional information

No response