Flashing Sonoff TH Elite THR320D via UART resulted in a bootloop that appeared to be power supply and radio related.
I tried:
- Minimal configuration
- Configuration that was known working from another identical device
- Multiple devices new from the box after testing with stock firmware and Tasmota firmware
- Multiple different power 3.3v supplies (checked with multimeter)
- Battery power
- Mains power
What happened:
Any configuration that included WiFi or BLE would trigger a bootloop.
Posting this for two reasons:
- I would like to know why flashing ESPHome resulted in a bootloop without this workaround, in hopes of contributing a fix if there is one possible.
- So that others experiencing this issue can find a potential workaround.
I only have a Sonoff TH Elite model THR320D, but I suspect this could apply to these similar Sonoff devices:
- TH Origin - THR316, THR320
- POW Origin - POWR316
- POW Elite - POWR316D, POWR320D
- TH Elite - TH316D, TH320D (this device)
- Smart Switch - TH10, TH16
- High Power Smart Switch - POWR3
Workaround:
- Flash the device with Tasmota via UART.
- Connect the device to mains power.
- Provide WiFi details via Tasmota captive portal.
- Connect to the Tasmota web UI and flash a minimal
esphome
(legacy format) configuration with board set toesp32dev
(notnodemcu-32s
). - Power cycle the device on mains power, wait a few minutes.
- Disconnect mains power.
- Flash the device with
esphome
(modern format) and board set tonodemcu-32s
including the WiFi module and SSID / password via UART. - Connect to mains power.
- Power cycle the device.
- Flash via OTA wirelessly going forward.
I have no idea what causes this problem or why this workaround works. I was able to reproduce the problem with four different units new out of the box and using these steps got me up and running with ESPHome on all of the devices with OTA updates working perfectly.
I must admit, this really does seem to be a power issue but I tried multiple power supplies, multiple outlets, 3.3v battery power, and 3.3v power provided by an ESP32-dev board. In all situations I ended up with a bootloop whenever wireless (WiFi or BLE) tried to start.
Iād love some help figuring out why this is happening.