-->
Page 1 of 1

ESP collects public IP and send it to external server

PostPosted: Sat Sep 05, 2020 5:50 am
by atefth
Hello All,

I am trying to use ESP8266 devices to control some relays so far I have succeeded to create a local network (Android App <==> Rooter <==> ESP8622 <==> Relay).
However if I want to connect to the ESP8266 from outside I would need to configure the port forwarding in the rooter which is not an issue and work perfectly, but once the rooter reboots it will get a different public IP address.
I know how to collect the public IP using an ESP8266:

https://www.esp8266.com/viewtopic.php?f=6&t=12782

In my setup if the rooter reboots all the ESPs within the network will reboot as well and keep rebooting till the rooter is available again.

Once the rooter is available ESPs will collect the public IP then send it to a server to be used later by my android APP from outside.

I know that even if the rooter is up internet may not be available yet, I can handle that later.

If anyone can point an example or share a strategy it will be helpful for me.

Thank you.