OpenSprinkler Forums Comments, Suggestions, Requests External Access without DynDNS Reply To: External Access without DynDNS

#39299

Wokkeltje
Participant

Here is the part of the script I mentioned earlier

# Setup where we will get our IP address
url = 'http://checkip.dyndns.org'
print ("IP address service: ", url)

# Open up the url, then read the contents, and take away the IP address
request = urlopen(url).read().decode('utf-8')
# We extract the IP address only
ourIP = re.findall("\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}", request)
ourIP = str(ourIP)
ourIP = ourIP[2:len(ourIP)-2]
print ("Current IP: ", ourIP)

Complete script see YouTube link above