How to advise customer of WiFi.localIP address after connection to WiFi

@graham-payne

If I understand right your most preferred solution is:

customer switches on the water-level-device
the water-level-device is able to connect to the customers computer / smartphone / tablet
immidiately showing the info.

This is not possible. How should the water-level-device decide which WLAN-network it shall connect to in an environment with multiple SSIDs (all around the neighbourhood)

So the minimum is: the customer has to tell the water-level-device which network it shall connect to
this could be done:

  • through a wire (but still requires some IP-settings in the customers computer / tablet / smartphone

  • through a manual that tells the customer connect to WiFi with SSID "WATER-LEVEL" (or whatever)
    then setting up connection details to the customers WiFi

You are using this tzapu-WiFi-manager.
If the tzapu-WiFi-manager does not offer showing the later used IP-adress of the water-level-device indeed you would have to dig into the tzapu-WiFi-manager source-code to add this option.

Me personal I would prefer writing my own WiFi-manager based on the ESPUI-library and preferences library

Another option might be to add code that sends UDP-messages. UDP-messages can be broadcasted to all devices connected to the same local LAN/WLAN and then use any kind of UDP-listener to read the IP-adress in the UDP-message.

At some point there is additional work required. Either by you or by the customer.

A wireless lan and a cable lan have the same issues with setting up the address .

Hi @graham-payne could you solve the problem? I have the same doubt. I checked other libraries based on tzapu Wifi manager but couldn't implement them. At the moment the only solution my sketch uses with the Wifi manager is to use another library to send the IP address via email. It's not the solution I expected but I'm still investigating how to show the IP address in the configuration portal after connecting successfully.

there is another way, you create a page on the Internet, on which each device sold will transmit its data received via DHCP and its MAC address, you tell the buyer this data, but there will be a lot of calls if DHCP issues addresses for a short time