Skip to content

Flashing and Recovery

Juan A. edited this page Oct 15, 2026 · 1 revision

Flashing and Recovery

Status: nothing has been flashed to hardware yet. This page covers getting back to the factory firmware before anyone tries ESPHome on a real unit.

Take a full backup first

Before flashing anything, dump the whole 4MB flash and keep two copies (the dump contains the unit's own configuration and identifiers, so don't publish it):

esptool --chip esp32s2 --port <PORT> read-flash 0x0 0x400000 backup.bin

Restore the factory firmware

The full image starts at flash offset 0 (esptool 5.x syntax):

esptool --chip esp32s2 --port <PORT> write-flash 0x0 backup.bin

What ESPHome changes

ESPHome writes its own bootloader, partition table and app image, replacing the factory layout. Restoring the full dump brings everything back, including the unit's own configuration.

Open items

  • Wired access: the PCB has a JP1 header (module side) with VDD, GND, TXD, RXD pads (3.3 V UART) and a two-pad BOOT jumper; see Board and Connectors. The ESP32-S2 can also be reached over native USB (GPIO19/20), but those pins are also the hardware-variant straps (see Hardware GPIO Map), so UART is the simpler route.
  • The factory update page only accepts vendor firmware, so the first ESPHome flash will probably need wired access.
  • Before powering a real valve with ESPHome, confirm the strap pins read all low (simple valve). The config refuses to open the valve otherwise. See ESPHome Replication Plan.

Clone this wiki locally