So to gain access to a device inside your home network from the internet... You must know or find out your home routers Public IP address. One way to do that is to open a web browser and go to
www.whatismyip.com you then need to take advantage of "Port Forwarding" or "NAT" (network address translation) which is inside your home router.
change the setting on your ESP module to have it connect to your home network.
Then get into the settings page of your home router. Look for NAT or Port Forwarding.
you then need to direct an incoming port of your choosing (like 8010) for example and direct it to the IP address of your ESP
Then from outside your home network (or from your smart phones browser when using the cell network, not your home wifi) direct your browser to the publicIP:8010 ie
http://66.123.234.12:8010 and if you have the port forwarding set up correctly you should be connected to your ESP module inside your private home network.
depending on your ISP your public IP may change from time to time so if it stops working then your public IP may have changed.
there are app's that you can put on a PC at home and it will email you when your public IP changes.
Just google something like "public IP change send email" or something like that.
dwight