Heads-up: USA NWS Alerts changing -- script updates are required

The NWS has said:

NWS Common Alerting Protocol (CAP) Users,

This is a friendly reminder that NWS CAP v1.1 is being terminated. NWS supports and continues production of CAP v1.2. Please see the following two links for the latest announcements. I’ve also provided a brief summary below each link.

NWS Alerts Atomic Syndication Format (ATOM) Data Changes: Effective on or about January 31, 2024
Describes NWS transition of the NWS Alerts ATOM feed on or about January 31, 2024 to utilizing CAP 1.2 data provided by the NWS API at api.weather.gov. Users that pull data from alerts.weather.gov via tools such as curl or wget may need to make changes to ensure continuity of service.

alerts.weather.gov Version 2.3.0 Upgrade: Effective on or about February 14, 2024
Describes NWS implementation of a new version of alerts.weather.gov on or about February 14, 2024, at which time, the dissemination by NWS of products formatted with CAP v1.1 will be terminated. As a result, the user interface at alerts.weather.gov will be updated and will begin using the CAP 1.2 formatted data provided by the NWS Application Programming Interface (API) at api.weather.gov.

This requires changes to nws-alerts.php, atom-advisory.php (and deprecation of atom-top-warning.php) scripts to use the revised formats. It is NOT just a simple URL change in the existing scripts as the format of the alert messages has changed (expecially for a ‘no alerts’ condition).

I’ll have updates for nws-alerts.php and atom-advisory.php posted on my site Jan 31, 2024 and on the template update tool.
The nws-alerts.php github distribution will also be updated then.

So… if you wonder why your NWS alerts aren’t working… do check for updates to the scripts first :slight_smile:

Best regards,
Ken

1 Like

Ok, the update is ready on the update tool for Saratoga templates and also in the standalone GitHub distribution.

In the Base-USA distribution, I’ve removed atom-advisory.php and atom-top-warning.php as those scripts are now deprecated in favor of the nws-alerts.php V2.00 script set. That required changes to wxindex.php and wxadvisory.php.
Two less things for me to try and maintain.

check-fetch-times.php V1.55 was updated to indicate the two script’s deprecation, and a small check on a php setting needed to enable language switching in Canada and World distributions.

1 Like

I see the alert URL’s are now being redirected to the API version so, you all need to change to Ken’s updated scripts now.

If you are using index.php, you’ll need to copy changes from the updated wxindex.php to your index.php before you delete atom-advisory.php (otherwise, fatal error of missing include).

I’m using CaRP to display the alerts. I just had to make some changes to the script to still display the alerts on the top of the page and instead of clicking on the alert link, you just need to hover over it to display the description. That seemed to be the best and easiest way to get it to work.

Thank you Ken for staying on top of all the NWS changes and your updates. Much appreciated!

Jeff

Thanks Ken! :+1:

MikeyM

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.