Author Topic: Heads-up USA alerts.weather.gov is changing.. script updates are required.  (Read 417 times)

saratogaWX

  • Strong Breeze
  • ***
  • Posts: 156
  • Weather website programming enthusiast
    • Saratoga-Weather.org
  • Station Details: Davis VP1 +, iMAC 21, OSX 10.6.8
The NWS has said:
Quote
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 :)

Best regards,
Ken
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub, WeatherSnoop, WeatherCat
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

saratogaWX

  • Strong Breeze
  • ***
  • Posts: 156
  • Weather website programming enthusiast
    • Saratoga-Weather.org
  • Station Details: Davis VP1 +, iMAC 21, OSX 10.6.8
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.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub, WeatherSnoop, WeatherCat
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP