Return to Pattern Library
Storage
Persist configuration across reboot
Requires the Temboo extension.
Platform

ESP32

Open in VS Code
Store a small configuration value in non-volatile storage and restore the latest value after reboot.
Applies when
Use when introducing device preferences, calibration values, counters, credentials metadata, or any ESP32 state that must survive a reset or power cycle.
Show pattern details
Hide pattern details
Intent
Inspect the project's persistence approach, store a simple test configuration value using the appropriate existing or SDK-native non-volatile mechanism, reboot the device, restore the value, then update it and repeat the reboot/readback check.
Expectation
The value written before reboot is restored unchanged afterwards, and after updating the value the new value becomes the one restored on the next boot.
Success criteria
The initial value survives the first reboot exactly, the updated value survives the second reboot exactly, and no storage/partition errors or unrelated configuration corruption are observed.
How it is verified
Capture logs for the initial write, first reboot/readback, update, and second reboot/readback. Where the platform exposes storage errors or commit status, include them. The test should avoid relying only on an in-RAM variable that happens to survive a soft code path.