config-nvs

Persist ESP32 pool-controller settings in NVS via ConfigManager API.

25|7|Updated Mar 4, 2019
One-click install
npx skills add https://github.com/smart-swimmingpool/pool-controller --skill config-nvs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: config-nvs
Source: https://github.com/smart-swimmingpool/pool-controller/tree/main/.opencode/skills/config-nvs
Command: npx skills add https://github.com/smart-swimmingpool/pool-controller --skill config-nvs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

NVS-based configuration storage for the pool-controller lets the ESP32 retain settings across reboots and firmware updates, avoiding data loss and manual reconfiguration.

Core Features & Use Cases

  • Central ConfigManager handles WiFi, MQTT, NTP, and controller settings with a single source of truth.
  • OTA-safe persistence and migration from LittleFS JSON; supports factory reset and version tracking across OTA updates.
  • Factory reset workflow and OTA-transition tracking to detect configuration changes and ensure safe recovery.

Quick Start

Initialize the ConfigManager, load all settings from NVS on boot, modify configuration values as needed, and call save() to persist changes.

Frequently Asked Questions about config-nvs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I persist ESP32 WiFi and MQTT settings across OTA firmware updates?

OTA-safe NVS storage retains WiFi, MQTT, and NTP settings across ESP32 firmware updates by using version tracking to detect OTA transitions, preventing data loss and avoiding manual reconfiguration after reboot.

How do I migrate pool-controller configuration from LittleFS JSON to NVS?

Migrating pool-controller configuration from LittleFS JSON to NVS involves using the ConfigManager API to load existing JSON settings and persist them into ESP32 non-volatile storage, ensuring a single source of truth for WiFi, MQTT, and NTP parameters.

What is the best way to implement a factory reset for ESP32 NVS configuration?

Implementing a factory reset for ESP32 NVS configuration involves invoking the ConfigManager reset workflow, which clears all WiFi, MQTT, NTP, and operational parameters from non-volatile storage and restores default settings safely.

How does the ConfigManager begin, load, save, and reset lifecycle work on ESP32?

The ConfigManager lifecycle works by calling begin to initialize NVS, load to read WiFi and MQTT settings into memory, save to persist modified values, and reset to clear storage, ensuring resilient configuration management across reboots.

Why do my ESP32 pool-controller settings disappear after a reboot or OTA update?

ESP32 pool-controller settings disappear after a reboot or OTA update when not stored in OTA-safe NVS storage; using ConfigManager with explicit key mappings and version tracking ensures configuration persistence and prevents data loss.

Do I need separate storage for WiFi and operational parameters on the ESP32 pool-controller?

You do not need separate storage for WiFi and operational parameters; the central ConfigManager API handles WiFi, MQTT, NTP, and controller settings with a single source of truth in NVS, simplifying configuration management.