Giter Club home page Giter Club logo

khoih-prog / esp_wifimanager_lite Goto Github PK

View Code? Open in Web Editor NEW
48.0 3.0 14.0 1.02 MB

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.

License: MIT License

C++ 95.34% C 4.51% Shell 0.15%
config-portal esp-wifimanager-lite dynamic-parameters esp-wifi-mqtt wifi esp32 esp32-s2 esp8266 credentials doubleresetdetector

esp_wifimanager_lite's People

Contributors

hmueller01 avatar khoih-prog avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

esp_wifimanager_lite's Issues

Overriding the HTML

Is your feature request related to a problem? Please describe.

Well the problem im having is that i want to customize the HTML page without doing it in the lib header file itself.
I noticed that there is ESP_WiFiManager->setCustomsHeadElement(); and i could add my HTML there but the problem is that then it would display my HTML along with defaults in the lib header file:

  • ESP_WM_LITE_HTML_HEAD_START
  • ESP_WM_LITE_HTML_HEAD_END

and so on! the only thing i can set that overrides is the "style" ESP_WiFiManager->setCustomsStyle(NewCustomsStyle);

it is super cute that you added // DO NOT CHANGE THIS STRING EVER!!!! i saw this and laughed and started right away editing it to customize the webpage to my liking ๐Ÿ‘

Describe the solution you'd like

An easy way to override the current HTML set inside the lib header file!

Describe alternatives you've considered

NONE

Additional context

NONE

fatal error: vfs_api.h: No such file or directory

I believe I followed the steps to install, but when I go to build I get this error:

Compiling .pio/build/esp32-c3-devkitm-1/lib5f6/LittleFS_esp32/LITTLEFS.cpp.o
.pio/libdeps/esp32-c3-devkitm-1/LittleFS_esp32/src/LITTLEFS.cpp:17:10: fatal error: vfs_api.h: No such file or directory

My platform.ini:

[env:esp32-c3-devkitm-1]
platform = https://github.com/Jason2866/platform-espressif32.git
board = esp32-c3-devkitm-1
framework = arduino
platform_packages = framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git
monitor_speed = 115200
monitor_port = /dev/cu.usbserial-1420
upload_port = /dev/cu.usbserial-1420
build_flags = -D c3_devkitm_01=1
lib_deps = 
	HTTPUpdate @ ^1.3
	khoih-prog/ESP_WiFiManager_Lite@^1.8.2

WifiManager_Lite mode that ignores unsuccessful connection attempts

Is your feature request related to a problem? Please describe.

I want to use the WiFiManager_Lite with unstable WiFi connections. If there is no WiFi connection, the WiFiManager_Lite starts the ConfigPortal even when valid configuration data is avalailable.

Describe the solution you'd like

A mode for the WiFiManager_Lite that does not start the ConfigPortal if no WiFi connection can be made, provided that valid config data is available. This could be done by adding a #define that when set lets the begin() method return without starting the config portal.

Additional context

If you have remote EPS installation for which the WiFi connectivity is established only from time to time the ESP should sleep for some time, then test the WiFi, if not accessible, sleep again, until a connection can be established. I cannot implement this if the ESP goes into the Config Portal mode as soon as no connection can be established in the begin() method.

Custom AP settings

Cannot change esp8266 decice ap name and password

I can really find an function to call to change this

LED Status

Is your feature request related to a problem? Please describe.

I have so far been unable to change the LED status in the library.

Describe the solution you'd like

The LED status in this lib is a bit booring and kinda "confusing" so what i wanted todo was

  • LED Off (nothing is going on / not connected to Wifi)
  • LED Slow Blinking (Trying to connect to wifi)
  • LED Fast Blinking (In configuration_mode)
  • LED On (connected to wifi)

This would make it much better to understand what is going on when Serial Monitor debugging is not possible! :)

Describe alternatives you've considered

NONE

Additional context

On my PCB i have a red PWR LED and a blue WIFI LED that i use to indicate the status of the WIFI as described above! but after i switched to this lib i was unable to integrate the LED status above... using Delay() would make the lib go "crazy" spamming the serial monitor with resets and stuff! and using millis would do the same and or sometimes not work at all!

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

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

Using the UM ProS3 I rarely can connect to WiFi config portal.

Describe the bug

Using the UM ProS3 I rarely can connect to WiFi config portal.

Steps to Reproduce

  1. Use basic example code.
  2. Run
  3. You will sometime see SSID on wireless device. When you do if you try to connect it will say "Unable to join the network" most of the times. Every once in a while you can actually connect.

(Ran test client on iPhone, iMac and Windows 10 all produced the same results)

Expected behavior

Wifi config portal connection succeeds and allows you to bring up config web page.

Actual behavior

Either the SSID does not show up on device OR if it does and you try to connect you get a connection error. On rare occasion it does work.

Information

Platform IO: 6.1.6
OS: MacOs Ventura

Build Information that contains all version info:

Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/um_pros3.html
PLATFORM: Espressif 32 (6.0.0) > Unexpected Maker PROS3
HARDWARE: ESP32S3 240MHz, 320KB RAM, 16MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-builtin, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-arduinoespressif32 @ 3.20006.221224 (2.0.6) 
 - tool-esptoolpy @ 1.40400.0 (4.4.0) 
 - tool-mkfatfs @ 2.0.1 
 - tool-mklittlefs @ 1.203.210628 (2.3) 
 - tool-mkspiffs @ 2.230.0 (2.30) 
 - toolchain-riscv32-esp @ 8.4.0+2021r2-patch5 
 - toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 36 compatible libraries
Scanning dependencies...
Dependency Graph
|-- ESP_WiFiManager_Lite @ 1.10.3
|   |-- ESP_DoubleResetDetector @ 1.3.2
|   |   |-- SPIFFS @ 2.0.0
|   |   |   |-- FS @ 2.0.0
|   |   |-- EEPROM @ 2.0.0
|   |   |-- FS @ 2.0.0
|   |   |-- LittleFS @ 2.0.0
|   |   |   |-- FS @ 2.0.0
|   |-- ESP_MultiResetDetector @ 1.3.2
|   |   |-- SPIFFS @ 2.0.0
|   |   |   |-- FS @ 2.0.0
|   |   |-- EEPROM @ 2.0.0
|   |   |-- FS @ 2.0.0
|   |   |-- LittleFS @ 2.0.0
|   |   |   |-- FS @ 2.0.0
|   |-- FS @ 2.0.0
|   |-- DNSServer @ 2.0.0
|   |   |-- WiFi @ 2.0.0
|   |-- EEPROM @ 2.0.0
|   |-- LittleFS @ 2.0.0
|   |   |-- FS @ 2.0.0
|   |-- SPIFFS @ 2.0.0
|   |   |-- FS @ 2.0.0
|   |-- WebServer @ 2.0.0
|   |   |-- WiFi @ 2.0.0
|   |   |-- FS @ 2.0.0
|   |-- WiFi @ 2.0.0

Notes

I added WIFI events to see if I can gather more info and I noticed a few interesting events showing WPS is being used?
Below is the full log. I do not normally run with Wifi event handler. This was to try to gather more info.

Starting ESP_WiFi using LittleFS on Unexpected Maker PROS3
ESP_WiFiManager_Lite v1.10.3
ESP_MultiResetDetector v1.3.2
LittleFS Flag read = 0xFFFD0002
multiResetDetectorFlag = 0xFFFD0002
lowerBytes = 0x0002, upperBytes = 0x0002
No multiResetDetected, number of times = 2
LittleFS Flag read = 0xFFFD0002
Saving config file...
Saving config file OK
[WiFi-event] event: 0
WiFi interface ready
[WiFi-event] event: 2
WiFi client started
[  1811][E][vfs_api.cpp:105] open(): /littlefs/wm_config.dat does not exist, no permits for creation
[  1814][E][vfs_api.cpp:105] open(): /littlefs/wm_config.bak does not exist, no permits for creation
[WiFi-event] event: 1
Completed scan for access points
[WML] WiFi networks found:
[WML] 1: STEVE-JOBS-IOT, -59dB
[WML] 3: SQUIRREL, -61dB
[WML] 7: WallyWiFi, -71dB
[WML] 8: JCR, -72dB
[WML] 9: ZyXEL_EE91, -74dB
[WML] 10: 24B MV, -75dB
[WML] 11: HotspotWjN2, -75dB
[WML] 12: FiWi, -75dB
[WML] 13: NETGEAR66, -79dB
[WiFi-event] event: 3
WiFi clients stopped
[WiFi-event] event: 10
WiFi Protected Setup (WPS): succeeded in enrollee mode
[WML] 
stConf:SSID=WIFIMANAGERLITE,PW=******
[WML] IP=192.168.4.1[WiFi-event] event: 11
WiFi Protected Setup (WPS): failed in enrollee mode
,ch=8
[WiFi-event] event: 10
WiFi Protected Setup (WPS): succeeded in enrollee mode
C
Your stored Credentials :
Blynk Server1 = account.duckdns.org
Token1 = token1
Blynk Server2 = account.ddns.net
Token2 = token2
Port = 8080
MQTT Server = mqtt.duckdns.org
Stop multiResetDetecting
Saving config file...
Saving config file OK
CCCCCCCCC CCCC---

With some runs I see this:

Saving config file OK
CC[WiFi-event] event: 12
WiFi Protected Setup (WPS): timeout in enrollee mode
C[WiFi-event] event: 13
WiFi Protected Setup (WPS): pin code in enrollee mode
[WiFi-event] event: 12
WiFi Protected Setup (WPS): timeout in enrollee mode
[WiFi-event] event: 13
WiFi Protected Setup (WPS): pin code in enrollee mode

Not sure this has anything to do with anything, but it is interesting.


I will continue to debug to see if I can figure out a solution to this.


platformio.ini

[env:um_pros3]
platform = espressif32
board = um_pros3
framework = arduino
monitor_speed = 115200
lib_deps = 
    khoih-prog/ESP_WiFiManager_Lite

build_flags = 
    -D ARDUINO_USB_MODE=1
    -DARDUINO_ESP32S3_DEV

board_build.mcu = esp32s3
board_build.partitions = huge_app.csv
board_build.variant = esp32s3
board_build.f_cpu = 240000000L
board_build.f_flash = 80000000L
board_build.flash_mode = qio
board_build.arduino.ldscript = esp32s3_out.ld
build_unflags =
        -DARDUINO_ESP32_DEV
        -DARDUINO_VARIANT="esp32"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.