Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FORCE_DEFAULT_CFG to force reset of configuration. #290

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions sonoff/sonoff.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2739,8 +2739,12 @@ void setup()
#ifdef USE_SPIFFS
initSpiffs();
#endif
#ifdef FORCE_DEFAULT_CFG
CFG_Default();
#else
CFG_Load();
CFG_Delta();
#endif

if (!sysCfg.model) {
sysCfg.model = SONOFF;
Expand Down
1 change: 1 addition & 0 deletions sonoff/user_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#define CFG_HOLDER 0x20161209 // [Reset 1] Change this value to load following default configuration parameters
#define SAVE_DATA 1 // [SaveData] Save changed parameters to Flash (0 = disable, 1 - 3600 seconds)
#define SAVE_STATE 1 // [SaveState] Save changed power state to Flash (0 = disable, 1 = enable)
//#define FORCE_DEFAULT_CFG // [ForceDefaultCfg] Ignore previous configuration and initialize to defaults

// -- Wifi -----------------------------------
#define STA_SSID1 "indebuurt1" // [Ssid1] Wifi SSID
Expand Down