Finding ESP8266 in a network I am connecting an ESP8266 to my home network (WiFi). After successful connection, an IP is assigned to it. I am sending commands to the ESP8266 from an Android app.

What can I do to find the ESP8266 on any network where my Android app is also connected? I ask this because whenever I change the network, a new IP is assigned to the ESP8266 and I have to manually change the IP in the Android app.

I just need to find the ESP8266 on the network, get its IP address and send commands to it.

Thanks in advance.
Some solutions that have worked for me:


Reserved IP - use the router's DHCP reservation to give the same ESP the same IP each time.
Static IP - Set the ESP to use the same IP each time, bypassing the DHCP feature altogether. This also boots the ESP slightly faster. WiFi.config(ip, gateway, subnet);
Dump the IP address to Serial on boot, so that you can at least see what's assigned: Serial.println(WiFi.localIP());
Give the STA a unique name that you can find in the router's DCHP clients page: WiFi.hostname("look_here");
use mDNS to assign a domain-like local URL to the device: MDNS.begin("esp8266");// default to "http://esp8266.local/"