mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1559] A more complete example-file of "AutoConnectNonBlocking" - possible? #1330
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#1330
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Jagakatt on GitHub (Feb 1, 2023).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1559
Basic Infos
Hi!
If it would be possible for someone with knowledge (which I do not have) to create a better AutoConnectNonBlocking-example-file ?
It wold be really appreciated and helpful with an example where some code is executed during the "Portal Mode" and also shown how to know when exiting the portal.
I know there are some info here:
https://github.com/tzapu/WiFiManager#save-settings
But I do not manage to get it working. Example files are the best!
Would be really nice to reach the goal to urge someone to connect to WiFi: x with Password: y with a simple message on a display. And Finally a message "Device connected!" or something similar..

Searched the web for hours, and all I can find is others who not succeed either. So no code to "borrow" from someone. :-(
And the "NonBlocking" is needed to be able to toggle between messages if I got it right.
I supply my sketchy sketch which almost gets me there. And no, I do not consider me as a programmer. Haha!.
It must be a smarter way?
Hardware
WiFimanager Branch/Release: Master
Esp8266/Esp32:
Hardware: ESP-12e, esp01, esp25
Core Version: 2.4.0, staging
Description
Problem description
Settings in IDE
Module: NodeMcu, Wemos D1
Additional libraries:
Sketch
Debug Messages
@tablatronix commented on GitHub (Feb 1, 2023):
Can you layout an overview of how you want it to flow? We might need to add additional callouts, there are some open issues etc about similar
@Jagakatt commented on GitHub (Feb 1, 2023):
Thanks for asking! Do almost get a little Christmas feeling when I can which for something! :-)
It would be nice for normal non nerdy people to complete the "ConfigPortal" which I have realized watching normal people in action can be a bit confusing.
So be able get some trigger to react upon when:
To be able to get some trigger of the above listed situation would at least enable me to create some nice assistance for the enduser. And I assume the NonLocking mode is the way be able to run code to toggle between messages on small displays when in portal-mode.
Thanks!
@tablatronix commented on GitHub (Feb 1, 2023):
I assume you know about the existingones already ?
@tablatronix commented on GitHub (Feb 2, 2023):
heres a crappy demo, it works, but do not use this code permanantly, just an example. I just added some callbacks into your example.
in reality you should be setting states in these callbacks and NOT actually doing stuff.
Then do stuff based on those states in loop etc, for example DO NOT actually delay or print inside callbacks but keep them fast as possible. But this is quick and dirty for concept. I will work on a proper example to add to the lib ro lcd and oled maybe
@tablatronix commented on GitHub (Feb 2, 2023):
@Jagakatt commented on GitHub (Feb 2, 2023):
Sorry, I did not know of the existing ones. And even less how to put them in action. It's just a lot of magic lines of code that unfortunately makes no sense to me.
Played around earlier with what's found under "Callbacks" on the WiFiManager main page here, but without success.
I have only programmed for a few months so I am still at the level where I get totally chocked every time the compilation goes through without a few pages of red text...
But I definitely think I will manage to progress further thanks to the pieces of code you added to my sketch!!
I will upload a cleaner version here in a few days.
THANK YOU SO MUCH!!!
@Jagakatt commented on GitHub (Feb 22, 2023):
This was obviously written on a monochrome monitor...
@tablatronix commented on GitHub (Feb 23, 2023):
Is this a working update?
@Jagakatt commented on GitHub (Feb 23, 2023):
Yes, it does work. But keep in mind that I'm new to coding.
@tzapu commented on GitHub (Feb 23, 2023):
maybe it helps, here s a sketch i ve used long ago that uses a tiny oled and displays connection prompt/statuses, ota statuses and so on. it illustrates callback usage. credits to all the people that made the original