mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 17:15:53 +03:00
[GH-ISSUE #662] Adding custom header on the main page? #551
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#551
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 @vaz83 on GitHub (Jul 16, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/662
Hardware
WiFimanager Branch/Release: Development
Esp8266/Esp32: ESP8266 (nodeMCU module)
Hardware: ESP-12e, esp01, esp25
Core Version: 2.4.0, staging
Description
Hi, on the WebPortal of the WiFiManager, under the buttons, there's a header which tells me if i am connected to an AP and what's the IP address. My question is if can I add a second header (and how) to inform the user about other stuff (MQTT status, etc) ?
@tablatronix commented on GitHub (Jul 16, 2018):
I guess I can add a footer for now.
You can add static html in the strings.h but sounds like you want more dynamic content.
@vaz83 commented on GitHub (Jul 16, 2018):
Yes, I wanted to have for example:
MQTT Status: Connected / Disconnected
Last Command Received: 0
@vaz83 commented on GitHub (Jul 17, 2018):
Will it be available in the future ?
@tablatronix commented on GitHub (Jul 17, 2018):
Yes I am still thinking about it
@vaz83 commented on GitHub (Jul 20, 2018):
I've changed the cpp, h, and strings file. Already working here :)
@vaz83 commented on GitHub (Jul 20, 2018):
Tablatronix I can help you guys with code as well, if you need of course
@tablatronix commented on GitHub (Jul 20, 2018):
I am trying to determine if I should add just an html_footer or a way to add stuff inside the callout ( thats the information box on the bottom )
@vaz83 commented on GitHub (Jul 20, 2018):
I’ve changed the code on the handle root, to display the information I need. Then made a void that receives the data I want and display on the main menu
@tablatronix commented on GitHub (Jul 20, 2018):
Where did you add it, what was a good location ? at the bottom ? before or after the status
You made a "function" (void) is the return value of that function
@vaz83 commented on GitHub (Jul 21, 2018):
I am sending you the print screen, i think it's the best option. I have also added changing colors from green to red when device is connected/disconected.
i added a void WiFiManager::setMQTTStatus(bool connected) and a void WiFiManager::showMQTTStatus(bool show) on the cpp file. When I set the showMQTTStatus to true, it reads the flag sent on the setMQTTStatus. To know which ip is the MQTT, i called the getParamOut and read only the parameters that I needed.
I have also made the following modifications:
=> added a back button on the configure wifi page, and the info page
=> Changed the code when I access the webportal, so that the title is the devicename and not the IP
@zen85 commented on GitHub (May 16, 2020):
hmm... very neat. is this somewhere implemented? i can't find it :(
@tablatronix commented on GitHub (May 16, 2020):
I think a callback for page header and footer is good
@vaz83 commented on GitHub (May 17, 2020):
I made it... i have added many many options meanwhile.. Also added parameters with combobox for multiple option, radio buttons, and others
@tablatronix commented on GitHub (May 17, 2020):
Did you use the param child class to add those features?
@stzoran1 commented on GitHub (Jan 28, 2023):
You can do it now using following method:
wifiManager.setTitle("YourTitle");