Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Syed Niamath
#56736 Hi,

Currently I am able to connect my ESP8266 which is set to 192.168.4.1 (wifimanager.autoconnect) which works perfectly from my webbrowser.

This works fine locally (within my wifi network), but I want to connect it remotely.

Earlier I have connected remotely through a webserver by hardcoding domin name "const char* host = "myserver.com"; "

What should I do so that it works both locally and remotely.

Please suggest.
User avatar
By carl
#56738 Correct me if I am wrong. So you want to connect your ESP8266 thru internet where you can control its pins anywhere you are?

If that is the case then this might help.

1. When you are using ESPlorer when programming your ESP8266
[url]http://thinkingparts.blogspot.com/2015/08/home-automation-uploading-code-into_23.html[/url]
2. When you are using Arduino IDE when Programming your ESP8266
[url]http://thinkingparts.blogspot.com/2015/08/home-automation-diy-version-internet_13.html[/url]
3. When you are using Lua Loader when programming your ESP8266
[url]http://thinkingparts.blogspot.com/2015/08/programming-esp8266-using-lua-loader.html[/url]


Let the Interent of Things Begin!!!
User avatar
By eduperez
#56749
Syed Niamath wrote:Hi,

Currently I am able to connect my ESP8266 which is set to 192.168.4.1 (wifimanager.autoconnect) which works perfectly from my webbrowser.

This works fine locally (within my wifi network), but I want to connect it remotely.

Earlier I have connected remotely through a webserver by hardcoding domin name "const char* host = "myserver.com"; "

What should I do so that it works both locally and remotely.

Please suggest.


Can you configure your local router? In that case, there are two options that I have used before:
  • Configure your local DNS so "myserver.com" points to "192.168.4.1".
  • Configure your router to redirect traffic to "myserver.com" IP address to "192.168.4.1".
User avatar
By Syed Niamath
#56750 Thanks Carl for those links, I'm using Arduino IDE.

Yes you are right! want to control the ESP8266 pins from anywhere.

Also In my recent experience when its connected locally (192.168.4.1) the response is very good whereas from server(domain name) it takes almost 4 to 5 secs. Is this maybe due to latency issue?