Introduction: ESP8266 FROM ANYWHERE
In this Instructable i will explain how you can to access your ESP8266 (WEB SERVER MODE) from anywhere in the world.
Step 1: Problem
Normally, when you use the ESP8266 as web server, tests are done using the LAN network. When you want to test from the WAN, you normally have to config your router (NAT/FIREWALL) to accept outside access. If you are familiar with your router, this is not a problem, but imagine dozens of other routers models where you need to know each one or need to know the NET access rights? Maybe it will be headache for you.
Step 2: What Do I Need ?
Well, i need a solution where i can add dozens of ESP8266 in my enviroment (LAN) and give access to all of them (web server) in anywhere of world without have to know anything about router config (NAT/FIREWALL) .
I want too that dozens of ESP8266 can be accessed from WEB, IOS or ANDROID, from WAN and i can share it for anyone.
Step 3: The Solution
To solve these need, here some steps:
create a INTERNET CLOUD account on WEAVED;
purchase one low cost AP running openwrt;
enable the AP to access the Internet;
install a special software to enable GL-INET to register on WEAVED;
make your ESP8266 connect to GL-INET;
make your ESP8266 a web server;
setup the GL-INET proxy to access the ESP8266 ip/port;
access the ESP8266 webpage from developer.weaved.com
access the ESP8266 webpage from IOS appShare your ESP8266
Step 4: Create a INTERNET CLOUD Account on Weaved
Enter in developer.weaved.com, register and enter you login and password. Stay connected to developer.weaved.com
Step 5: Purchase One Low Cost AP Running Openwrt
For my tests, i purchased the AP modem GL-INET, where the tests were successfull. You could find herehttp://www.gl-inet.com/w/?page_id=285 and buy it.
Questions about GL-INET, contact alzhao@gl-inet.com
Step 6: Enable the GL-INET to Access the Internet
The GL-INET is very easy to use, there is a friendly user interface. Config it to access the INTERNET, i suggest to config your router as repeater.The GL-INET ip is 192.168.8.1
Step 7: Install a Special Software on GL-INET to Enable GL-INET to Register on WEAVED (stay Connected to Developer.weaved.com)
Connect your PC to the GL-INET and use the Putty utility, open a terminal to access the GL-INET (SSH), port 192.168.8.1
type your root login/password (root/goodlife) (factory password)
wget http://home.mycal.net/gl-inet.tgzcopy it to /root (you are in the root)
tar -xvzf gl-inet.tgz cd gl-weaved
./install (be shure that you are connected to developer.weaved.com now (logged) and that you are in the same NET of GL-INET)
now reset the GL-INET or type reboot should be able to register it now
In developer.weaved.com webpage you will be adviced that there is a new device waiting to register in your account, enable it (confirm the register) and you will see it the current list of devices.
Click on it and weaved will connect to port 80 of your GL-INET and show the webpage.
But now, you want to connect to ESP8266's 8080 port ( web server), then please, follow the steps.
Step 8: Make Your ESP8266 Connect to GL-INET
Config your ESP8266 to connect to GL-INET and make it static ip, for example, 192.168.8.100.
Config your ESP8266 to be a web server in some port, for example 8080.
I have used the following ESP8266 web server example, that sounds very cool. https://github.com/marcoskirsch/nodemcu-httpserve...
See the instructions to install it and change the settings to 8080 and static ip to 192.168.8.100. wifi.sta.setip({ip="ip",netmask="255.255.255.0",gateway="gateway"})
Setup the GL-INET proxy to access the ESP8266 ip/port
In the folder /etc/weaved you will find a file called web.linux.conf.
Please, edit it, adding the following lines at end of file
proxy_dest_port 8080 (ESP8266 web server port) proxy_dest_ip 192.168.8.100 (ESP8266 static ip)
Save it and then reboot your GL-INET
If you wants to unregister your ESP8266, remove the following line
# password - erase this line to unregister the device
#password XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Step 9: Accessing the ESP8266 Webpage From Developer.weaved.com
Enter in the developer.weaved.com, insert you login and password and select the device ES8266.
You can change the device name, for example, to door, windows, gate.
You can share the esp8266 webpages for other, in the Settings.
After this, Weaved will show the ESP8266 web server for you.
Step 10: Accessing the ESP8266 Webpage From IOS App
You should download the weaved on app store or use the web browser.
https://itunes.apple.com/us/app/weaved/id937372469?mt=8
Step 11: Share My ESP8266
If you didn´t get the GL-INET and ESP8266, but want to make a test, please, register now in the developer.weaved.com and send us you weaved ID that i will share my ESP8266 for you to do tests.
my e-mail is tcpipchip@hotmail.com