Open gwilford opened 1 year ago
Further testing gives same result with non-TLS MQTT config:
mqtt:
broker: !secret mqtt_host
port: 1883
username: !secret mqtt_user
password: !secret mqtt_password
Forcing an esp_restart() in esphome -> on_shutdown doesn't help as the hang appears to occur within esp_restart().
After some research, I wonder if this may be related to a wifi shutdown_handler hanging in the esp-idf framework. In turn, it could be waiting on some MQTT connections/threads which remain at shutdown.
Hi,
I can confirme the problem above. With mqtt: enabled in my config, every OTA update requires a power cycle.
ESP32-IDF . tested on several m5stack-atom.
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
Using esp-idf framework on ESP32 to support MQTT TLS connection. ESP32 hangs on shutdown after OTA update due to WDT timeout when MQTT client is included in running config. Requires power cycle to recover device:
E (83800) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time: E (83800) task_wdt: - loopTask (CPU 1) E (83800) task_wdt: Tasks currently running: E (83800) task_wdt: CPU 0: IDLE E (83800) task_wdt: CPU 1: IDLE E (83800) task_wdt: Print CPU 0 (current core) backtrace
Same result with two different ESP32 board configurations.
Which version of ESPHome has the issue?
2022.12.0
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2022.12.5
What platform are you using?
ESP32-IDF
Board
generic 30pin devkit v1
Component causing the issue
mqtt
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response