Fixing the AWC URL on older MetarMaps

Update 16 February 2024: New Aviation Weather URL below. As “promised” by NOAA, the legacy aviation weather URL is now dead. I compared the legacy URL with the new API from aviationweather.gov and came up with this URL which is now showing proper conditions on my flight school’s MetarMap.

ORIGINAL (defunct): https://www.aviationweather.gov/adds/dataserver_current/httpparam?dataSource=metars&requestType=retrieve&format=xml&hoursBeforeNow=1.5&stationString=

LEGACY (defunct as of Feb 2024): https://aviationweather-cprk.ncep.noaa.gov/adds/dataserver_current/httpparam?dataSource=metars&requestType=retrieve&format=xml&hoursBeforeNow=1.5&stationString=

NEW: https://aviationweather.gov/api/data/dataserver?dataSource=metars&requestType=retrieve&format=xml&hoursBeforeNow=1.5&stationString=

My CFI asked me if I could get the school’s METARmaps display board working again as it stopped working once the Aviation Weather site migrated to the new platform. There were many threads on the topic including an official post from METARmaps offering a paid upgrade to fix the problem without any instructions on how to fix it yourself. This is probably a good option for many, but I’ll throw a flag on the play for those of us that can navigate a Unix OS.

I’m (usually) not one to turn away from a digital challenge so I poked around and fixed the issue in just a few minutes. Granted the URL that I’m using is the legacy URL and it may go away in the future.

  1. If you are running the MetarMaps PI, connect the MicroSD to your computer and browse the SD card to find the METARmaps owner’s manual in PDF format. Inside this owner’s manual is the SSH instructions for your Raspberry Pi. Make note.
  2. Put the MicroSD back in your METARmaps PI and power it back on. Once powered up, open an SSH session to your PI.
  3. Once you are logged in to your PI, run sudo -i to open an elevated interactive session.
  4. Navigate to the root directory then change directories to “/METARmaps”.
  5. Make a copy of “metar.py” then nano the “metar.py” file.
  6. Inside the “metar.py” file, find the line that starts with “url = ” and replace the old URL with the new URL
    1. Old URL: https://www.aviationweather.gov/adds/dataserver_current/httpparam?dataSource=metars&requestType=retrieve&format=xml&hoursBeforeNow=1.5&stationString=
    2. New URL: https://aviationweather.gov/api/data/dataserver?dataSource=metars&requestType=retrieve&format=xml&hoursBeforeNow=1.5&stationString=
    3. Write out your changes then either reboot your PI or run ./startup.sh from the METARmaps directory. If you choose the latter, your PI should go into test mode (rainbow colors) for about 20-30 seconds then it should display accurate airport colors.

Lagniappe – while you have the SSH session fresh in your mind, launch something like WinSCP and make a copy of the files under the METARmaps directory. Nice to have them in the future for reference.

Enjoy!

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.