khoih-prog / Blynk_Async_WM

Simple WiFiManager for Blynk and ESP8266/ESP32 (including ESP32-S2, ESP32-C3) with or without SSL, configuration data saved in either LittleFS, SPIFFS or EEPROM. This library, using AsyncWebServer instead of (ESP8266)WebServer, for configuring/auto(re)connecting ESP8266/ESP32 modules to best or available MultiWiFi APs and MultiBlynk servers at runtime. Enable adding dynamic custom parameters from sketch and input using the same Config Portal. Config Portal will be auto-adjusted to match the number of dynamic parameters. Optional default Credentials to be autoloaded into Config Portal to use or change instead of manually input. Static STA IP and DHCP Hostname as well as Config Portal AP channel, IP, SSID, Password can be configured. Multi or Double DetectDetector feature permits entering Config Portal as requested.
MIT License
20 stars 8 forks source link

Force portal mode from application #2

Closed balucio closed 3 years ago

balucio commented 3 years ago

Hi, how I can force entering in portal mode from application?

Thank you.

khoih-prog commented 3 years ago

Currently, the library doesn't provide a direct way to force entering the Config Portal (CP) from application, as this is over-complicated and not necessary for all use cases. I just prefer the simpler approach, yet the users can add / merge more features with other libraries.

But definitely, I'll consider add the optional feature if there are more enhancement requests for this, just not sure about the time frame.

In the mean time, you can use one of these temporary solutions

  1. Create a Blynk virtual button, then use it to trigger the CP by reading the flag in the loop(). Check these examples for a way to do

  2. Create a Blynk virtual button, then use it to trigger DoubleReset or MultiReset within predetermined time.

Good Luck,

khoih-prog commented 3 years ago

Update

The requested feature has been available from v1.2.1


Releases v1.2.1

  1. Add functions to control Config Portal from software or Virtual Switches. Check How to trigger a Config Portal from code #25
  2. Add examples to demo the new Virtual ConfigPortal SW feature
  3. Optimize code