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.

Router IP Address Log (9513 records)
Source Date Time IP Address
PIR#1 17 Dec 2018 3:13 PM 82.46.191.91
PIR#2 17 Dec 2018 2:30 PM 82.46.191.91
PIR/uwave#1 17 Dec 2018 1:57 PM 82.46.191.91
PIR#1 17 Dec 2018 1:13 PM 82.46.191.91
PIR#2 17 Dec 2018 12:31 PM 82.46.191.91
PIR/uwave#1 17 Dec 2018 11:55 AM 82.46.191.91
PIR#1 17 Dec 2018 11:13 AM 82.46.191.91
PIR#2 17 Dec 2018 10:31 AM 82.46.191.91
PIR/uwave#1 17 Dec 2018 9:53 AM 82.46.191.91
PIR#1 17 Dec 2018 9:13 AM 82.46.191.91
PIR#2 17 Dec 2018 8:31 AM 82.46.191.91
PIR#1 17 Dec 2018 7:13 AM 82.46.191.91
PIR#2 17 Dec 2018 6:31 AM 82.46.191.91
PIR#1 17 Dec 2018 5:13 AM 82.46.191.91
PIR#2 17 Dec 2018 4:31 AM 82.46.191.91
PIR/uwave#1 17 Dec 2018 3:45 AM 82.46.191.91
PIR#1 17 Dec 2018 3:13 AM 82.46.191.91
PIR#2 17 Dec 2018 2:31 AM 82.46.191.91
PIR/uwave#1 17 Dec 2018 1:43 AM 82.46.191.91
PIR#1 17 Dec 2018 1:13 AM 82.46.191.91

 

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.