-->
Page 1 of 1

Wemos D1 Mini infinite loop

PostPosted: Thu Dec 31, 2020 6:11 pm
by vazquezjm
Hi All.

I uploaded a piece of code to a Wemos D1 mini from Home Assistant (OTA) which is causing the device to do an infinite loop (restart), thus, I cannot upload new code OTA or through the COM port (which never becomes available).

Any idea before I donate it to a museum?

TIA and Happy 2021!

Re: Wemos D1 Mini infinite loop

PostPosted: Thu Dec 31, 2020 7:55 pm
by AcmeUK
Any idea before I donate it to a museum?

YES!
In ESPHome compile your code (three dots top right corner)
Then download and save the binary.
Download the appropriat version of ESPHome Flasher from here:- https://github.com/esphome/esphome-flasher/releases
Then flash the chip.
Job done. It worked for me!

Re: Wemos D1 Mini infinite loop [SOLVED]

PostPosted: Fri Jan 01, 2021 8:22 am
by vazquezjm
Thanks for the reply @AcmeUK

I solved it in a different way

- Unplugged everything
- Connected the Wemos to a USB-to-Serial adapter (TX, RX, GND, Pwr pins)
- Flashed WiFi Scan example with Arduino IDE
- Now the USB (COM port) connection is available again on the Wemos
- Flashed a previous (working) version of my YAML code with ESPHome Flasher

Now everything is back to normal. Phew!