Add factory reset functionality and update README instructions

This commit is contained in:
2026-06-23 23:53:23 +02:00
parent a08cc5e779
commit c57c0c93fd
2 changed files with 120 additions and 2 deletions
+14 -1
View File
@@ -77,6 +77,19 @@ After connecting, the device is reachable at:
- `http://m1730.local` (mDNS, works on most local networks)
- `http://<IP address>` (shown in the serial monitor on boot)
### Factory reset (forgot password)
If you lose the web UI password, hold the **BOOT button** (GPIO0) for 3 seconds during startup. The firmware resets all settings to factory defaults **except** meter pin assignments and calibration (maxDuty), which are preserved. On acknowledgement, all connected meters sweep 0→100→0.
Serial output confirms the reset:
```
[BOOT] BOOT button held, hold 3s for factory reset...
[BOOT] factory reset triggered!
...
[BOOT] factory reset complete, restarting...
```
---
## Web UI
@@ -223,4 +236,4 @@ Config is stored as JSON in LittleFS at `/config.json`.
}
```
The file is written by the web UI and should not need manual editing. To reset to factory defaults, delete the file or erase flash with `pio run --target erase`.
The file is written by the web UI and should not need manual editing. To reset to factory defaults (keeping pin/calibration), hold the BOOT button for 3 seconds at startup. To erase everything including flash, use `pio run --target erase`.