Notifications
Clear all

10/18/2023 Map Stopped Working?
Visit this post for the fix

Reboot

16 Posts
3 Users
0 Reactions
2,497 Views
Mark Harris
(@markyharris)
Member Admin Registered
Joined: 5 years ago
Posts: 557
 

Vance, the routine that goes out for the data is;

while True: #check internet availability and retry if necessary. If house power outage, map may boot quicker than router.
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("8.8.8.8", 80))
ipadd = s.getsockname()[0] #get IP Address
logger.info('RPI IP Address = ' + ipadd) #log IP address when ever FAA weather update is retreived.

try:
content = urllib.request.urlopen(url).read()
logger.info('Internet Available')
logger.info(url)
break
except:
logger.warning('FAA Data is Not Available')
logger.warning(url)
time.sleep(delay_time)
pass

The delay_time between rechecks is set to 10 seconds. I wonder if it should be set to 30 seconds? What do you think? - Mark


   
ReplyQuote
Page 2 / 2
Share: