mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 17:15:53 +03:00
[GH-ISSUE #1384] Question setting hostname whilst defining + entering ssid in web portal etc #1187
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#1187
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 @aitchpea on GitHub (Mar 30, 2022).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1384
I started to code up adding a WiFiManagerParameter to allow user entry of a hostname whilst setting up ssid (as I had wished to give each ESP32 a meaningful name - e.g. I had envisaged calling WiFi.setHostname).
I reasoned I could call WiFiManager::setHostname and then also WiFiManager::setupHostname but I then would need to call wm.autoConnect to display the portal for entering the value - so by the time this method finished it would have already connected to the new SSID and ALSO set a hostname itself. So this feels (to me) far too late to then try and re-change the hostname.
If I suddenly won the lottery and was able to magically choose - I would wonder whether this was something that was available by default (similar to setting ssid) as it is pretty fundamental. So I thought I would check whether it is already possible (and I had missed the example showing it) or whether it was considered a good / bad or stupid question.
@tablatronix commented on GitHub (Mar 30, 2022):
No hostname is not a stored value you will have to save it somewhere and read it on setup