aloys-c / wx2pfpx

A simple weather data provider script for the discontinued Professional Flight Plan X software.
GNU General Public License v3.0
20 stars 2 forks source link

wx2pfpx unable to download weather due to aviationweather.gov API changes #7

Closed PinkPony89 closed 5 months ago

PinkPony89 commented 8 months ago

Hello Aloys,

As of 16OCT23 aviationweather.gov implemented API changes. As a result wx2pfpx cannot download METAR/TAF data anymore. It gets gets stucks on "downloading last weather reports"

https://aviationweather.gov/help/#url

https://aviationweather.gov/data/api/

Would it be possible for you to update the application?

PFPX is also no longer downloading METAR/TAF. It is unclear at this time if they will update their application :(

aloys-c commented 8 months ago

Hi,

I don't have much time at the moment to take care of the issue, If you're motivated I would suggest finding someone that can fork the repo and continue maintaining it.

PinkPony89 commented 8 months ago

Hi Aloys, Thanks again for developing this fantastic tool

I did not have any prior python experience so I just had to quickly learn out how to install pyinstaller and implement the new NOAA API. Thank you for including the package.cmd, it made compiling the changes extremely easy.

P.S. I contacted you via PM on the PFPX forum as well, you can disregard my message there.

Here is the fix to implement the new NOAA API

  1. In main.py I updated the URL header:

from: https://aviationweather.gov/adds/dataserver_current/ to: https://aviationweather-cprk.ncep.noaa.gov/adds/dataserver_current/

  1. In utils/parse_station.py I updated the URL headers:

from: https://aviationweather.gov/adds/dataserver_current/ to: https://aviationweather.gov/adds/dataserver_current/

I compiled this as v2.6 and per your suggestion I created a fork of your repo: https://github.com/PinkPony89/wx2pfpx

This is my first time using GitHub and creating a Fork. Any feedback is welcome and appreciated.

aloys-c commented 8 months ago

Hi PinkPony,

I just quickly checked your version and the fix seems to work just fine !

That's a lot of luck the data format hasn't changed and it's only the URL, I was afraid this would lead to hours rewriting the code handling the data... Anyway congrats on your update !

If you don't mind, you can make a "Pull request" on my repo so that we merge our codes and you become a contributor on my repo too :)

aloys-c commented 8 months ago

Thanks to PinkPony89 for the fix, issue is now solved

PinkPony89 commented 8 months ago

Thanks to PinkPony89 for the fix, issue is now solved

Thank you for confirming @aloys-c

Its still unclear if the METAR/TAF observations/forecasts which are now hosted at https://aviationweather-cprk.ncep.noaa.gov/dataserver will remain available. According to the new https://aviationweather.gov/ website the Text Data Server has been replaced by the NOAA API (as of 16OCT23).

It is possible that the https://aviationweather-cprk.ncep.noaa.gov/adds/dataserver_current/ is only a temporary fallback to the old Text Data Server? I cannot find any information on the NOAA website to confirm or deny this.

In any case, as of of the time of this post the METAR/TAF observations/forecasts available under https://aviationweather-cprk.ncep.noaa.gov/adds/dataserver_current/ remain available and up to date.

I will continue to review the NOAA API with the goal of ultimately implementing the new permanent API URL's into the wx2pfpx code. This will eliminate any future risk of the METAR/TAF download failing, in the event that https://aviationweather-cprk.ncep.noaa.gov/adds/dataserver_current/ is disabled in the future (assuming it is only available at this time as temporary fallback to the Text Data Server).

twSimulations commented 5 months ago

Hello Aloy-C,

since a few days I've got problems with WX2PFPX. For some reason, it seems not to work (again). It doesn't do anything after clicking on the "Download data" button.

Could you take a look into the program please?

aloys-c commented 5 months ago

WX2PFPX seems not to work (again). It doesn't to anything when clicking on the "Download data" button

Hi,

As a reminder this is a project based on volunteer work, and this chat is not a customer helpline, at least saying « hello » would be appreciated !

I’ll have a look tomorrow, expect a possible fix in the coming days…

aloys-c commented 5 months ago

The API has been updated with the most recent version available. You can download the new version 2.6.3 in the main folder... Hopefully this lasts !