OK, Today's Project,
I am in an RV park and my Arduino (ESP8266) is connected to the Internet using the park's Public AP. I have no issues with my scripts that are outgoing to my website, but I want to take it to the next level and SOMEHOW be able to access the Arduino remotely (Via an APP). At home, I set it up on its own IP:PORT, Port Forwarding and have no problem accessing it remotely. Now the RV is at a Camp Ground (will be leaving over the winter) and would like to access it to do a few things remotely (equalize my batteries (SOLAR), turn on/off a camera. The IP address never changes for my access, and if it did I will be running a script that checks the IP address and updates my web sight with the new IP address.
I have thought about a VPN setup, but not sure that is the route I want to take.
Any thoughts or suggestions?
Don
Mustang65:
At home, I set it up on its own IP:PORT and have no problem accessing it remotely.
Have you tried that? It's a little more complicated than that: the IP address of the ESP (probably 192.168.1.x at home, and 10.42.x.y on a larger network) is local, and can only be used to find the ESP on that network, you can't access from outside of the network (i.e. from the Internet). That's because the router that connects the network to the Internet uses Network Address Translation (NAT). The router has a public IP address, that's accessible from the Internet. To send packets to the ESP (behind the NAT), you have to send the packet to the router first, and the router has to forward it to the ESP. This is called port forwarding.
To be able to access the ESP when it's connected to the park's WiFi, you would need to have access to the router or NAT gateway settings of their local network.
One way to solve this problem is to reverse the client-server roles: the ESP8266 acts as a client to a public server, and posts data to it. The app is a client to the same server, and polls for new data from the ESP.
Pieter