[GH-ISSUE #1178] Show assigned local IP address #1006

Open
opened 2026-02-28 01:28:05 +03:00 by kerem · 9 comments
Owner

Originally created by @litamin on GitHub (Dec 17, 2020).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1178

This is one of those long going questions that I simply have not found a solid answer for. It has been mentioned in #159, #265 and #872.

--> How to show the assigned local IP after adding your WiFi credentials? There are many real-world "out in the field" cases where you do not have access to the serial monitor to read this. And you don't want to add an OLED display or whatever either. How do you guys do this?

I understand the underlying problem of not being able to show it on the /wifisave page when still in AP mode, since I guess the IP is only known when one tries to enter STA mode. But then again, I know it is possible somehow since libraries like Kentaylor's fork and IoTAppStory are in fact showing the assigned IP right there in the browser!

Unfortunately I am not skilled enough to dig into those libraries to extract the inner workings. Can somebody help here - how do go about solving this?

Originally created by @litamin on GitHub (Dec 17, 2020). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1178 This is one of those long going questions that I simply have not found a solid answer for. It has been mentioned in #159, #265 and #872. --> How to show the assigned local IP after adding your WiFi credentials? There are many real-world "out in the field" cases where you do not have access to the serial monitor to read this. And you don't want to add an OLED display or whatever either. How do you guys do this? I understand the underlying problem of not being able to show it on the /wifisave page when still in AP mode, since I guess the IP is only known when one tries to enter STA mode. But then again, I know it is possible *somehow* since libraries like [Kentaylor's fork](https://github.com/kentaylor/WiFiManager) and [IoTAppStory](https://youtu.be/_4NRqIa-cvo?t=290) are in fact showing the assigned IP right there in the browser! Unfortunately I am not skilled enough to dig into those libraries to extract the inner workings. Can somebody help here - how do go about solving this?
Author
Owner

@sebosfato commented on GitHub (Dec 21, 2020):

you can use mdns... but the new wifimanager lib show the ip if you conect to the config portal again... you can also send it to your email with webhooks for example

<!-- gh-comment-id:748738056 --> @sebosfato commented on GitHub (Dec 21, 2020): you can use mdns... but the new wifimanager lib show the ip if you conect to the config portal again... you can also send it to your email with webhooks for example
Author
Owner

@litamin commented on GitHub (Dec 22, 2020):

Thanks @sebosfato, do you have a link to some instructions on a working mdns implementation? I've heard it is one of those "sometimes it works, sometimes it doesn't" type of things..

And regarding Wifimanager showing the IP if you connect to the config portal again: how do you mean exactly? Where do I go to see this? I am running dev branch on a ESP32, and once I have entered the new Wifi network credentials I am disconnected from the AP and it goes directly to STA mode and starts running the webserver code I have.

<!-- gh-comment-id:749404985 --> @litamin commented on GitHub (Dec 22, 2020): Thanks @sebosfato, do you have a link to some instructions on a working mdns implementation? I've heard it is one of those "sometimes it works, sometimes it doesn't" type of things.. And regarding Wifimanager showing the IP if you connect to the config portal again: how do you mean exactly? Where do I go to see this? I am running dev branch on a ESP32, and once I have entered the new Wifi network credentials I am disconnected from the AP and it goes directly to STA mode and starts running the webserver code I have.
Author
Owner

@tablatronix commented on GitHub (Dec 22, 2020):

You would have to use ondemand via a button or something. MDNS usually works well assuming you are on the same subnet or ap. Some routers will block mdns across wifi to lan etc.

<!-- gh-comment-id:749571367 --> @tablatronix commented on GitHub (Dec 22, 2020): You would have to use ondemand via a button or something. MDNS usually works well assuming you are on the same subnet or ap. Some routers will block mdns across wifi to lan etc.
Author
Owner

@litamin commented on GitHub (Dec 23, 2020):

@tablatronix I'm afraid I'm not proficient enough in the workings of networking/routing stuff to understand what you mean.

I am looking for something that just works - in all cases and on any home wifi network. You enter your wifi credentials and get connected and then you just go to a custom http://HELLO.local or something to access my webserver.

Is that possible and can you guide me (or link to a guide) how to set that up?

<!-- gh-comment-id:749993134 --> @litamin commented on GitHub (Dec 23, 2020): @tablatronix I'm afraid I'm not proficient enough in the workings of networking/routing stuff to understand what you mean. I am looking for something that just works - in all cases and on any home wifi network. You enter your wifi credentials and get connected and then you just go to a custom http://HELLO.local or something to access my webserver. Is that possible and can you guide me (or link to a guide) how to set that up?
Author
Owner

@jmgk77 commented on GitHub (Jul 31, 2021):

Hi,

I had the same issue, and partially fixed it adding <script>setTimeout(function (){document.location.href = 'http://myapp.local';}, 30000);</script> to HTTP_SAVED[]

That way, after credentials are saved, a timer is started, and after 30 seconds, the page location is changed from 192.168.4.1 to myapp.local. These 30s are enough to esp8266 boot my code, set a mdns, computer loose connection due disappearing hotspot, connect to previous wifi, and then load my page.

The problem is that it only work if you access wifimanager throught browser. If you use android or linux "login helpers" the page is closed before the URL change happen.

Hope it helps.

<!-- gh-comment-id:890284213 --> @jmgk77 commented on GitHub (Jul 31, 2021): Hi, I had the same issue, and **partially** fixed it adding `<script>setTimeout(function (){document.location.href = 'http://myapp.local';}, 30000);</script>` to `HTTP_SAVED[]` That way, after credentials are saved, a timer is started, and after 30 seconds, the page location is changed from 192.168.4.1 to myapp.local. These 30s are enough to esp8266 boot my code, set a mdns, computer loose connection due disappearing hotspot, connect to previous wifi, and then load my page. The problem is that it only work if you access wifimanager throught browser. If you use android or linux "login helpers" the page is closed before the URL change happen. Hope it helps.
Author
Owner

@tablatronix commented on GitHub (Jul 31, 2021):

Yeah this remains 1 of 2 issues with keeping the client in the loop on connects. CP closes as soon as we try to change wifi modes to test the connect.

<!-- gh-comment-id:890362696 --> @tablatronix commented on GitHub (Jul 31, 2021): Yeah this remains 1 of 2 issues with keeping the client in the loop on connects. CP closes as soon as we try to change wifi modes to test the connect.
Author
Owner

@EzeKoren commented on GitHub (Dec 31, 2021):

As cool as it is to add a custom mDNS domain, it's not entirely adopted in the industry, for neither Windows nor Android devices support mDNS so it's important to be able to display the assigned IP

<!-- gh-comment-id:1003217805 --> @EzeKoren commented on GitHub (Dec 31, 2021): As cool as it is to add a custom mDNS domain, it's not entirely adopted in the industry, for neither Windows nor Android devices support mDNS so it's important to be able to display the assigned IP
Author
Owner

@dagi0627 commented on GitHub (May 21, 2024):

Show assigned local IP address on browser is still not possible?

<!-- gh-comment-id:2122447141 --> @dagi0627 commented on GitHub (May 21, 2024): Show assigned local IP address on browser is still not possible?
Author
Owner

@tablatronix commented on GitHub (May 22, 2024):

Tasmota handles this well, no idea how, maybe they keep the ap active, but what if the channel is not the same. I would have to see how they are doing this and keeping the cp alive

<!-- gh-comment-id:2123744529 --> @tablatronix commented on GitHub (May 22, 2024): Tasmota handles this well, no idea how, maybe they keep the ap active, but what if the channel is not the same. I would have to see how they are doing this and keeping the cp alive
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#1006
No description provided.