khoih-prog / ESP_WiFiManager_Lite

Light-Weight MultiWiFi/Credentials Manager for ESP32 (including ESP32-S2 and ESP32-C3) and ESP8266 boards boards. Powerful-yet-simple-to-use feature to enable adding dynamic custom parameters. paragraph=Library to configure MultiWiFi/Credentials at runtime for ESP32/ESP8266 boards. You can also specify DHCP HostName, static AP and STA IP. Use much less memory compared to full-fledge WiFiManager. Config Portal will be auto-adjusted to match the number of dynamic custom parameters. Optional default Credentials to be autoloaded into Config Portal to use or change instead of manually input. Credentials are saved in LittleFS, SPIFFS or EEPROM. New powerful-yet-simple-to-use feature to enable adding dynamic custom parameters from sketch and input using the same Config Portal. Double or MultiDetectDetector as well as Virtual Switches feature permits entering Config Portal as requested.
MIT License
49 stars 15 forks source link

Question: Is it possible to use dynamic parameters with esp-12e (esp8266) #7

Closed rmallah closed 2 years ago

rmallah commented 2 years ago

I am trying to use ESP8266 (nodemcu) with ESP_WiFiManager_lite. I particularly need the dynamic parameters to store certain user input paramters.

when i click on the save button it says settings upload. How ever after a simple reset , the data is not read from the persisten storage and printed.

when the code executes for the first time it says:

01:55:07.037 -> Starting ESP_WiFi using EEPROM on ESP8266_NODEMCU_ESP12E

is there any way to store dynamic variables in this board/platform consistently.

regds mallah

khoih-prog commented 2 years ago

I've just tested and there is no issue with storing and retrieving dynamic params in ether EEPROM or SPIFFS/LittleFS.

Check your code. I also suggest that you move to LittleFS for ESP8266 by modifying defines.h, e.g. from

https://github.com/khoih-prog/ESP_WiFiManager_Lite/blob/d7442d880aca916a791a03456f48ab94352ab219/examples/ESP_WiFi/defines.h#L57-L65

to

// LittleFS has higher priority than SPIFFS
#if ( defined(ESP_ARDUINO_VERSION_MAJOR) && (ESP_ARDUINO_VERSION_MAJOR >= 2) )
  #define USE_LITTLEFS    true
  #define USE_SPIFFS      false
#elif defined(ARDUINO_ESP32C3_DEV)
  // For core v1.0.6-, ESP32-C3 only supporting SPIFFS and EEPROM. To use v2.0.0+ for LittleFS
  #define USE_LITTLEFS          false
  #define USE_SPIFFS            true
#else
  // For ESP8266, and other boards
  #define USE_LITTLEFS    true
  #define USE_SPIFFS      false  
#endif

Next time, also post the Minimal, Reproducible Example or your vague and time-wasting post will be ignored and deleted.

Good Luck,

rmallah commented 2 years ago

Extremely thankful for your kind response. And also for creating these beautiful libraries. I will be more careful about reporting next time.