[GH-ISSUE #1384] Question setting hostname whilst defining + entering ssid in web portal etc #1187

Open
opened 2026-02-28 01:28:55 +03:00 by kerem · 1 comment
Owner

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.

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.
Author
Owner

@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

<!-- gh-comment-id:1083761512 --> @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
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#1187
No description provided.