10/18/2023 Map Stopped Working?
Visit this post for the fix
Hi,
For 2 days or so, the map stopped working. I can't access the :5000 page.
The device is connected to the internet, I can SSH to it, but the map won't start.
I also downloaded the image again here and flashed a new card but same issue.
Any ideas?
Thanks!
Marty
Following, same here. I have built two maps and both are currently not displaying.
We just found out that the FAA decommissioned the data source we were using to pull the weather information.
This will take some reworking of our code and an update for you all to implement.
Thanks,
Bill
It seems that FAA changed their API\'s today and the formerly beta is now the only option. All directs to https://www.aviationweather.gov/dataserver are failing. All calls to the API seem to fail and need pointed to the new url. The new API information can all be found here: https://aviationweather.gov/data/api/#/Dataserver/dataserverMetars I am going to see what I can do to modify all the scripts on my own but wanted to raise this up so you were aware
I checked the new API and the data server there uses the same layout just with a different URL. I changed it in those files:
wipes-v4.py
webapp.py
metar-v4.py
metar-display-v4.py
from removed link
to removed link
Now the backend at :5000 is back up but the LEDs are off. When you go to the airports editor the Metars are all there.
Anything I missed?
Here are the changed files: https://www.dropbox.com/scl/fi/9v57mf3awgx899lxirwct/changed_files.zip?rlkey=m2j9ruczswllked3mal9j3cgh&dl=0
I checked the new API and the data server there uses the same layout just with a different URL. I changed it in those files:
wipes-v4.py
webapp.py
metar-v4.py
metar-display-v4.py
Now the backend at :5000 is back up but the LEDs are off. When you go to the airports editor the Metars are all there.
Anything I missed?
Here are the changed files: https://www.dropbox.com/scl/fi/9v57mf3awgx899lxirwct/changed_files.zip?rlkey=m2j9ruczswllked3mal9j3cgh&dl=0
(My last post didn't came through, please delete if double posted)
@liveadmin It’s not just the URL that changed. Visibility can now be reported as a string vs integer (e.g. 10+ vs 10). Don’t know what other changes there may have been that would affect your software. I haven’t found any definitive list.
Hi all,
Here's a post that will go through manually fixing this issue; https://www.livesectional.com/community/postid/1377/
If you prefer to reinstall using an image, we'll be uploading a new one shortly. Just be sure to save the config, airports, and hmdata files using the Utilities menu before making the change otherwise you will need to remap all the airports which as you know is a pain.
We will be working on a fix that utilizes the new API, but it may take some time. So for now use this fix and an announcement will be made when the new API has been incorporated. - Mark
Hi mark, the link you posted with a manual fix does not appear to be attached to anything. Looking forward to a fix. Great product by the way, thanks for your help
Hey Mark, thanks for your help in tackling this switch. The board has been amazing to look at every time I walk by it in my hallway. The URL posted above seems to go to a 404 - is there a workaround option to edit the files? https://www.livesectional.com/community/postid/1377/
Blue skies and green lights!
David
Here's the text from the post that some have had issues accessing. This is a duplicate of that post.
Also, the updated Image can now be downloaded at https://www.livesectional.com/downloads/ . Hope it helps.
-------------------------------------------------------------------------------------
The FAA in their infinite wisdom decommissioned their API used to provide the METAR data for LiveSectional maps. This also affected many other's METAR map software as well. The FAA has introduced a new API that will require that much of the software be re-written.
However, thanks to information and testing from users Eric and Tedder, a fix has been developed. However, the fix should be considered temporary since its based on another FAA legacy site that they say will also be decommissioned at some point without any definitive date given. So below is the fix. It can be put into a bash file if desired, but its just as quick to affect from the command line.
If, as the user, you are not comfortable with using the command line on the RPi, a new Image will be posted to www.livesectional.com/downloads in short order. Be sure to download the Version 4.4xx to insure the fix has been applied.
Instructions to affect the fix;
Log in into the RPi, either locally or through SSH session. Once at the command line type the following;
cd /NeoSectional sudo sed -i 's/www.aviationweather.gov/aviationweather-cprk.ncep.noaa.gov/g' wipes-v4.py sudo sed -i 's/www.aviationweather.gov/aviationweather-cprk.ncep.noaa.gov/g' metar-v4.py sudo sed -i 's/www.aviationweather.gov/aviationweather-cprk.ncep.noaa.gov/g' metar-display-v4.py sudo sed -i 's/www.aviationweather.gov/aviationweather-cprk.ncep.noaa.gov/g' webapp.py sudo reboot now
After it reboots the map will be functional again.
What this is doing is updating the files;
- wipes-v4.py
- metar-v4.py
- metar-display-v4.py
- webapp.py
and changing the API's URL address from 'www.aviationweather.gov' which was decommissioned to 'aviationweather-cprk.ncep.noaa.gov' which is an alternate API.
It is suggested that the 'admin.py' file be updated with a new version number, but this is optional. This can be done by entering the following at the command line prompt;
sudo nano admin.py
Change the version number to 4.400 then to save the change enter;
ctrl-x y
Again, this is to be considered a temporary fix while we learn about the FAA's new API which can be found here; https://aviationweather.gov/data/api/#/Dataserver/dataserverMetars if you are curious. Once the new API has been folded into the LiveSectional software, another announcement will be made and a new Image will be posted to www.livesectional.com/downloads. - Mark and Bill
@markyharris Thanks Mark.
I compared the two XML outputs from:
aviationweather-cprk.ncep.noaa. gov
and the new aviationweather. gov/cgi-bin/data/dataserver.php
And they look almost identical. The only change is that some values have different decimal points like long/lat, temperature, and the visibility is 10+ instead of 10.0. Any idea why it's not working if you replace the old URL:
www.aviationweather. gov/adds/dataserver_current/httpparam?
with the new: aviationweather. gov/cgi-bin/data/dataserver.php?
Thanks!
I just starting working on it and there is an error with urllib that is causing the error. I'm not sure why yet. More to come, hopefully. - Mark
What error do you get? I also tried to find the issue. At first, I thought it was maybe the new 10+ value in the visibility tag, and I added the code below to the metar-v4.py line 1154 and 1277, but that also didn't help.
if visibility_statute_mi == "10+": visibility_statute_mi = 10.0 else: visibility_statute_mi = float(visibility_statute_mi)
I also saved the raw XML from both APIs but they also look great. I added this code to save the XML data. (Line 618 and 656)
try:
result = urllib.request.urlopen(url).read()
logger.info('Internet Available')
logger.info(url)
r = result.decode('UTF-8').splitlines()
#write raw xml for test
with open(' removed link ', 'wb') as file:
file.write(result)
xmlStr = r[8:len(r)-2]
content.extend(xmlStr)
c = ['<x>']
c.extend(content)
root = ET.fromstringlist(c + ['</x>'])
break