Setup page config functions not functional in 1.0.3/4 that worked in 1.02
Opened this issue · 7 comments
Hi,
Several /setup page options that were working in 1.0.2 now do nothing in 1.03 or 1.04.
-Custom logo not working
-Custom /setup page title not working
-Custom firmware version not working
See attached screen captures.
Here is the code:
// Web Server library
#include <AsyncFsWebServer.h>
// WebServer
AsyncFsWebServer asyncServer(WSPort,FILESYSTEM);
// Add a new config box
asyncServer.addOptionBox("Things");
asyncServer.addOption("Build Date (MMDDYY)", buildDate);
// Add custom page title to /setup
char pageTitle[30];
sprintf(pageTitle,"Setup %s",macID);
asyncServer.setSetupPageTitle(pageTitle);
// Add custom logo to /setup page with custom size:w
asyncServer.setLogoBase64(base64_logo, "128", "128", /overwite file/ true);
asyncServer.setFirmwareVersion(BUILD_VER);
// Start webServer
asyncServer.init();
- I noticed that the Options tab that was auto generating under 1.0.2 has vanished. Attempts at creating the tab have failed.
Sorry for all of the issues.
-michael
I found that if I manually add the param-box# to the config.json, it will show up.
{
"param-box1": "Options",
"IPaddr": "",
"GW": "",
"Mask": "",
"DNS": "",
"NWConfig": 0,
"sensorType": 33,
"BuildDate": "123123",
"Backlight": true,
"BacklightOffTime": 0,
"BacklightOffDelay": 600000,
"Feature": 0,
"Category": 33,
"WSPort": 80,
"Units": 0,
"TempOffset": 0,
"TempMin": 0,
"TempMax": 0,
"HumidOffset": 0,
"HumidMin": 0,
"HumidMax": 0,
"TempDev": 0,
"WatchDog": true,
"Hostname": "bite_me",
"Server": "192.168.0.94:8090",
"name-logo": "Setup 27FC6C123123",
"img-logo": "/config/img-logo-128_128.txt",
"param-box2": "Bite me!"
So it looks like the function call to set the value (asyncServer.addOptionBox) is not connecting....
I would also like a handler to intercept the config save. When I do a pull down box, it is saving all of the options, not just the one I selected. This creates a very large json file when the pulldown box is for timezones.
I will continue testing.
-michael
Hi Michael.
To introduce the latest features (manual wifi configuration) I had to slightly modify the structure of the config.json file.
I tried to make the change backwards compatible, but I would say it didn't work. I'm sorry for the inconvenience.
To fix it, the advice is to delete or rename the current config.json
file and restart the ESP so that a new one will be created.
I will test this weekend. What about a method of only showing the config elements I want to show on the Config page in /setup?
Sorry, I do not understand what you mean.
To fix it, the advice is to delete or rename the current config.json file and restart the ESP so that a new one will be created.
Tried it. Still no joy.
On another note: If I change the web server port from 80 to anything else on the 1.0.2 branch, the Options tab also disappears. Could this be the same cause as issue #23?
I think I found the problem. I am using config.json for the application data and your library is also using it. If I move my config to another named json file, the web page functions start working. I also found that if I do not enable the edit page, I can provide my own handler for the POST of the /edit command. Sadly, this does not work if the edit pages are enabled.
I would like to request that a option to provide an additional function to be called when the "Save Config" button is pressed.
A second feature request would be to be able to completely disable the logo.