Remote devices operating behind a router are usually given 'Virtual IP' addresses. Only the router will have an IP address which is contactable on the WWW. ISP providers will offer their clients a choice of a fixed IP address (at extra cost) or a dynamic IP address (standard package). This makes sending a control message to a device with a virtual ip address behind a router allocated with a dynamic ip address very problematic. Use of third party Dynamic DNS providers are available as a partial solution e.g. remote WEB cams, but for the ESP8266 devices, Dynamic dns is very difficult to implement due to the Dynamic dns service providers not publicising their connection methodology.
|PIR#2||20 Oct 2018||2:33 AM||126.96.36.199|
|PIR#1||20 Oct 2018||1:54 AM||188.8.131.52|
|PIR/uwave#1||20 Oct 2018||1:34 AM||184.108.40.206|
|Microwave||20 Oct 2018||1:31 AM||220.127.116.11|
|PIR#2||20 Oct 2018||12:33 AM||18.104.22.168|
|PIR#1||19 Oct 2018||11:53 PM||22.214.171.124|
|PIR/uwave#1||19 Oct 2018||11:34 PM||126.96.36.199|
|Microwave||19 Oct 2018||11:31 PM||188.8.131.52|
|PIR#2||19 Oct 2018||10:33 PM||184.108.40.206|
|PIR#1||19 Oct 2018||9:53 PM||220.127.116.11|
|PIR/uwave#1||19 Oct 2018||9:34 PM||18.104.22.168|
|Microwave||19 Oct 2018||9:31 PM||22.214.171.124|
|PIR#2||19 Oct 2018||8:33 PM||126.96.36.199|
|PIR#1||19 Oct 2018||7:53 PM||188.8.131.52|
|PIR/uwave#1||19 Oct 2018||7:34 PM||184.108.40.206|
|Microwave||19 Oct 2018||7:31 PM||220.127.116.11|
|PIR#2||19 Oct 2018||6:33 PM||18.104.22.168|
|PIR#1||19 Oct 2018||5:52 PM||22.214.171.124|
|PIR/uwave#1||19 Oct 2018||5:34 PM||126.96.36.199|
|Microwave||19 Oct 2018||5:30 PM||188.8.131.52|
The solution is briefly explained below:
- Program the ESP8266 to send a GET request to a 'find your ip address' site.
- Parse the returned html text and filter out the returned ip address of your router.
- Program the ESP8266 to POST the ip address to a page on a host WEB server.
- Create a database structure on the the host web server.
- On the host WEB server create a WEB page to interactively insert a posted string into the database.
- Create a WEB page on the server which will allow the results in the database to be shown.