[GH-ISSUE #699] Adding extra parameters is not wotking in the WiFiManager-development part #583

Closed
opened 2026-02-28 01:25:58 +03:00 by kerem · 30 comments
Owner

Originally created by @pvdw0310 on GitHub (Aug 15, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/699

Hi,
I'm new to the WiFiManager project and I was testing it for a while, now I like to use the examples of the WiFiManager-development lib. But adding some extra parameters is not working? At least I don't find them on the config site at 192.168.4.1 . Using a esp8266f and arduino ide 1.8.5
Thanks

Originally created by @pvdw0310 on GitHub (Aug 15, 2018). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/699 Hi, I'm new to the WiFiManager project and I was testing it for a while, now I like to use the examples of the WiFiManager-development lib. But adding some extra parameters is not working? At least I don't find them on the config site at 192.168.4.1 . Using a esp8266f and arduino ide 1.8.5 Thanks
kerem closed this issue 2026-02-28 01:25:58 +03:00
Author
Owner

@liebman commented on GitHub (Aug 15, 2018):

Its probably this https://github.com/tzapu/WiFiManager/pull/681

<!-- gh-comment-id:413324992 --> @liebman commented on GitHub (Aug 15, 2018): Its probably this https://github.com/tzapu/WiFiManager/pull/681
Author
Owner

@tablatronix commented on GitHub (Aug 15, 2018):

Which example, they are a bit of a mess right now. The fsparameters ones should work though

<!-- gh-comment-id:413327254 --> @tablatronix commented on GitHub (Aug 15, 2018): Which example, they are a bit of a mess right now. The fsparameters ones should work though
Author
Owner

@pvdw0310 commented on GitHub (Aug 16, 2018):

I'm using the example advanced.ino that comes with the lib.

<!-- gh-comment-id:413434829 --> @pvdw0310 commented on GitHub (Aug 16, 2018): I'm using the example advanced.ino that comes with the lib.
Author
Owner

@tablatronix commented on GitHub (Aug 16, 2018):

That is probably broken

<!-- gh-comment-id:413538944 --> @tablatronix commented on GitHub (Aug 16, 2018): That is probably broken
Author
Owner

@pvdw0310 commented on GitHub (Aug 18, 2018):

is there a way to fix it ?

<!-- gh-comment-id:414035414 --> @pvdw0310 commented on GitHub (Aug 18, 2018): is there a way to fix it ?
Author
Owner

@tablatronix commented on GitHub (Aug 18, 2018):

dont use that example until I test it maybe

<!-- gh-comment-id:414062564 --> @tablatronix commented on GitHub (Aug 18, 2018): dont use that example until I test it maybe
Author
Owner

@tablatronix commented on GitHub (Aug 18, 2018):

oh that example doesn't actually save anything it just implements custom params, you have to handle the saving, the autoconnectwithfsparameters examples should work and actually save to spiffs

<!-- gh-comment-id:414062765 --> @tablatronix commented on GitHub (Aug 18, 2018): oh that example doesn't actually save anything it just implements custom params, you have to handle the saving, the autoconnectwithfsparameters examples should work and actually save to spiffs
Author
Owner

@pvdw0310 commented on GitHub (Aug 18, 2018):

Thanks for the reaction, but I understand that I have to handle the saving to spiffs. But, before that I need a way to enter the params. And that's the problem. I can't enter the params. If you declare the params in the program they don't show up on the website during the setup.

<!-- gh-comment-id:414084512 --> @pvdw0310 commented on GitHub (Aug 18, 2018): Thanks for the reaction, but I understand that I have to handle the saving to spiffs. But, before that I need a way to enter the params. And that's the problem. I can't enter the params. If you declare the params in the program they don't show up on the website during the setup.
Author
Owner

@tablatronix commented on GitHub (Aug 18, 2018):

Works for me

AutoConnectWithFSParameters

screen shot 2018-08-18 at 4 51 05 pm

<!-- gh-comment-id:414088453 --> @tablatronix commented on GitHub (Aug 18, 2018): Works for me AutoConnectWithFSParameters ![screen shot 2018-08-18 at 4 51 05 pm](https://user-images.githubusercontent.com/807787/44303451-faf08c80-a306-11e8-9994-867e2ae861b5.png)
Author
Owner

@pvdw0310 commented on GitHub (Aug 19, 2018):

Sorry, AutoConnectWithFSParameters.ino is working. I was using the development library and the advance.ino that use the param section. In for the advance.ino is the param section not working.

Many thanks

<!-- gh-comment-id:414105346 --> @pvdw0310 commented on GitHub (Aug 19, 2018): Sorry, AutoConnectWithFSParameters.ino is working. I was using the development library and the advance.ino that use the param section. In for the advance.ino is the param section not working. Many thanks
Author
Owner

@tablatronix commented on GitHub (Aug 19, 2018):

works fine, params under setup menu

screen shot 2018-08-19 at 8 42 22 am

<!-- gh-comment-id:414128735 --> @tablatronix commented on GitHub (Aug 19, 2018): works fine, params under setup menu ![screen shot 2018-08-19 at 8 42 22 am](https://user-images.githubusercontent.com/807787/44309415-d38fd300-a38b-11e8-98e3-8701ecdd31cf.png)
Author
Owner

@alesrebec commented on GitHub (Aug 23, 2018):

I cannot get it to work.

Is it because I'm using startConfigPortal() in my setup()?
I only get the four blue buttons all the time.

Here's the code that doesn't display custom html:


    WiFiManager wifiManager;

    WiFiManagerParameter custom_text("<p>CUSTOM: This is just a text paragraph</p>");

    wifiManager.addParameter(&custom_text);

    wifiManager.startConfigPortal("NAME");
<!-- gh-comment-id:415431313 --> @alesrebec commented on GitHub (Aug 23, 2018): I cannot get it to work. Is it because I'm using startConfigPortal() in my setup()? I only get the four blue buttons all the time. Here's the code that doesn't display custom html: ``` WiFiManager wifiManager; WiFiManagerParameter custom_text("<p>CUSTOM: This is just a text paragraph</p>"); wifiManager.addParameter(&custom_text); wifiManager.startConfigPortal("NAME"); ```
Author
Owner

@tablatronix commented on GitHub (Aug 23, 2018):

works for me
screen shot 2018-08-23 at 9 59 28 am 2

<!-- gh-comment-id:415449874 --> @tablatronix commented on GitHub (Aug 23, 2018): works for me ![screen shot 2018-08-23 at 9 59 28 am 2](https://user-images.githubusercontent.com/807787/44533510-4adea300-a6bb-11e8-8117-1a715c9bb8a6.png)
Author
Owner

@diegoalbaga commented on GitHub (Oct 11, 2018):

now im having this same problem, when i use the master branch the parameters declared in the code show but when i use the development branch they dont, i think the onl way to use them is is editing in the strings file in the param form but i dont know if they will actually save in fs using the code functions

<!-- gh-comment-id:428782597 --> @diegoalbaga commented on GitHub (Oct 11, 2018): now im having this same problem, when i use the master branch the parameters declared in the code show but when i use the development branch they dont, i think the onl way to use them is is editing in the strings file in the param form but i dont know if they will actually save in fs using the code functions
Author
Owner

@tablatronix commented on GitHub (Oct 11, 2018):

Are you using an example?

<!-- gh-comment-id:428786108 --> @tablatronix commented on GitHub (Oct 11, 2018): Are you using an example?
Author
Owner

@martinberlin commented on GitHub (Oct 11, 2018):

Works for me too in development branch.
What does not work is the setSaveConfigCallback() for me so I didn't find a way to store this extra parameters in the EEPROM. There was an issue but is closed: https://github.com/tzapu/WiFiManager/issues/714

Can you please indicate me how to do it ? ( I tried all examples I found, but I never get the Serial comment that is on the Callback function after pressing SAVE )

<!-- gh-comment-id:428872669 --> @martinberlin commented on GitHub (Oct 11, 2018): Works for me too in development branch. What does not work is the setSaveConfigCallback() for me so I didn't find a way to store this extra parameters in the EEPROM. There was an issue but is closed: https://github.com/tzapu/WiFiManager/issues/714 Can you please indicate me how to do it ? ( I tried all examples I found, but I never get the Serial comment that is on the Callback function after pressing SAVE )
Author
Owner

@tablatronix commented on GitHub (Oct 11, 2018):

I will test again but make sure you have updated

<!-- gh-comment-id:428919284 --> @tablatronix commented on GitHub (Oct 11, 2018): I will test again but make sure you have updated
Author
Owner

@martinberlin commented on GitHub (Oct 11, 2018):

Maybe it's my fault ? I've tested yesterday making a git pull from your development branch.
Just as a reference this is my sketch: https://github.com/martinberlin/esp/blob/master/FasarekCam-WiFi-Settings/FasarekCam-WiFi-Settings.ino
I'm just doing:

wm.setAPCallback(configModeCallback);  -> This is called perfectly
wm.setSaveConfigCallback(saveConfigCallback);  --> this one is not

All the rest works perfectly I'm very happy with WifiManager, seriously I'm putting it in everything I make!

<!-- gh-comment-id:428939079 --> @martinberlin commented on GitHub (Oct 11, 2018): Maybe it's my fault ? I've tested yesterday making a git pull from your development branch. Just as a reference this is my sketch: https://github.com/martinberlin/esp/blob/master/FasarekCam-WiFi-Settings/FasarekCam-WiFi-Settings.ino I'm just doing: wm.setAPCallback(configModeCallback); -> This is called perfectly wm.setSaveConfigCallback(saveConfigCallback); --> this one is not All the rest works perfectly I'm very happy with WifiManager, seriously I'm putting it in everything I make!
Author
Owner

@diegoalbaga commented on GitHub (Oct 11, 2018):

UPDATE: i was puttting a space were it shouldnt, thanks for your quick reply and support.

<!-- gh-comment-id:428953127 --> @diegoalbaga commented on GitHub (Oct 11, 2018): UPDATE: i was puttting a space were it shouldnt, thanks for your quick reply and support.
Author
Owner

@tablatronix commented on GitHub (Oct 11, 2018):

Did you get the callback working?

<!-- gh-comment-id:428960549 --> @tablatronix commented on GitHub (Oct 11, 2018): Did you get the callback working?
Author
Owner

@martinberlin commented on GitHub (Oct 11, 2018):

No. I checked and made a git pull on the development branch. But I couldn't get it to work.

Happy that for Diego works the other stuff. I'm growing white hair ;)

<!-- gh-comment-id:429002840 --> @martinberlin commented on GitHub (Oct 11, 2018): No. I checked and made a git pull on the development branch. But I couldn't get it to work. Happy that for Diego works the other stuff. I'm growing white hair ;)
Author
Owner

@tablatronix commented on GitHub (Oct 11, 2018):

gonna test now, gimme a few

<!-- gh-comment-id:429007891 --> @tablatronix commented on GitHub (Oct 11, 2018): gonna test now, gimme a few
Author
Owner

@tablatronix commented on GitHub (Oct 11, 2018):

ok yeah it looks like if you are not submitting an ssid and setBreakAfterConfig is false then it does not get called.

if you setBreakAfterConfig(true) is should work, I will see how this should properly work.

I think I have to just go ahead and add a paramsave callback, its on the list

<!-- gh-comment-id:429013615 --> @tablatronix commented on GitHub (Oct 11, 2018): ok yeah it looks like if you are not submitting an ssid and setBreakAfterConfig is false then it does not get called. if you setBreakAfterConfig(true) is should work, I will see how this should properly work. I think I have to just go ahead and add a paramsave callback, its on the list
Author
Owner

@tablatronix commented on GitHub (Oct 11, 2018):

the problem is the docs have always said this
//called when settings have been changed and connection was successful

So when not changing wifi , its not successful so I don't want to break peoples code that assumes wifi was saved in that callback, So I think I will leave it as is and add a new callback.

<!-- gh-comment-id:429044032 --> @tablatronix commented on GitHub (Oct 11, 2018): the problem is the docs have always said this ` //called when settings have been changed and connection was successful` So when not changing wifi , its not successful so I don't want to break peoples code that assumes wifi was saved in that callback, So I think I will leave it as is and add a new callback.
Author
Owner

@martinberlin commented on GitHub (Oct 12, 2018):

Ah now I understand. Sorry I completely overseen that.
Maybe it will be great if there is also a small example of this with setBreakAfterConfig(true) in your examples section.
Great, I'm very thankful! I will try tonight and let you know- UPDATE : Could not wait! I see it getting called now! GREAT!

<!-- gh-comment-id:429364407 --> @martinberlin commented on GitHub (Oct 12, 2018): Ah now I understand. Sorry I completely overseen that. Maybe it will be great if there is also a small example of this with setBreakAfterConfig(true) in your examples section. Great, I'm very thankful! I will try tonight and let you know- UPDATE : Could not wait! I see it getting called now! GREAT!
Author
Owner

@tablatronix commented on GitHub (Oct 12, 2018):

yeah i also added a setSaveParamsCallback which should always get called if there are params

<!-- gh-comment-id:429389726 --> @tablatronix commented on GitHub (Oct 12, 2018): yeah i also added a `setSaveParamsCallback` which should always get called if there are params
Author
Owner

@Behzad-6-1 commented on GitHub (Jul 17, 2020):

Hi I am new on this and tried to use wifiManager.addParameter
it seems if I add the 4th parameter it breaks the code and it goes in to endless loop and print table of hex code

<!-- gh-comment-id:659766164 --> @Behzad-6-1 commented on GitHub (Jul 17, 2020): Hi I am new on this and tried to use wifiManager.addParameter it seems if I add the 4th parameter it breaks the code and it goes in to endless loop and print table of hex code
Author
Owner

@Behzad-6-1 commented on GitHub (Jul 17, 2020):

can the limit be set in .h file
#ifndef WIFI_MANAGER_MAX_PARAMS #define WIFI_MANAGER_MAX_PARAMS 6 // params will autoincrement and realloc by this amount when max is reached #endif

<!-- gh-comment-id:659767701 --> @Behzad-6-1 commented on GitHub (Jul 17, 2020): can the limit be set in .h file ` #ifndef WIFI_MANAGER_MAX_PARAMS #define WIFI_MANAGER_MAX_PARAMS 6 // params will autoincrement and realloc by this amount when max is reached #endif`
Author
Owner

@tablatronix commented on GitHub (Jul 17, 2020):

@Behzad-6-1 create a new issue , do not post on old ones

<!-- gh-comment-id:659769185 --> @tablatronix commented on GitHub (Jul 17, 2020): @Behzad-6-1 create a new issue , do not post on old ones
Author
Owner

@Behzad-6-1 commented on GitHub (Jul 17, 2020):

this was open so I thought I it is ok sorry
I have now created new one wifiManager.addParameter not working or 6 parameter

would you be able to have a look at it please

<!-- gh-comment-id:659789871 --> @Behzad-6-1 commented on GitHub (Jul 17, 2020): this was open so I thought I it is ok sorry I have now created new one wifiManager.addParameter not working or 6 parameter would you be able to have a look at it please
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#583
No description provided.