Author Topic: CAP Links  (Read 463 times)

0 Members and 1 Guest are viewing this topic.

Offline daybreak

  • Senior Member
  • **
  • Posts: 96
    • Alma Weather
CAP Links
« on: March 17, 2024, 08:51:05 AM »
I'm sure I haven't been paying attention but I assume something changed in the NWS CAP feeds?  I use a program called Feedwind to make a script for each area county. https://www.daybreakimagery.com/weather/warningtext.htm    This is one of the links I used to retrieve the feed from NWS  https://alerts.weather.gov/cap/wwaatmget.php?x=ILC051&y=0   I also tried this but as you see from my page the old text doesn't go away.  https://api.weather.gov/alerts/active.atom?zone=ILC121

Where do I find the correct links? 

Thanks,
Richard

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: CAP Links
« Reply #1 on: March 17, 2024, 11:07:17 AM »
On Jan 30, 2024, the NWS deprecated the alerts.weather.gov/cap/wwaatmget.php URL for getting ATOM/CAP advisories.
The new url uses https://api.weather.gov/alerts/active.atom?zone=ILC121 but.. be aware that if no alert is active, that alert no longer includes an
Quote
<entry>
  <id>'.$id.'</id>
  <updated>'.$updated.'</updated>
  <author>
    <name>'.$author.'</name>
  </author>
  <title>There are no active watches, warnings or advisories</title>
  <link href="'.$link.'"/>
  <noalert>1</noalert>
</entry>
so the absence of an <entry></entry> means no alert.  That change may break your usage of Feedwind.. it would have to be adapted to accommodate that change in the returned alert.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline daybreak

  • Senior Member
  • **
  • Posts: 96
    • Alma Weather
Re: CAP Links
« Reply #2 on: March 17, 2024, 01:12:16 PM »
Thanks Ken, so you're saying I need to do away with feedwind correct?  And are there scripts that I can do to setup the neighboring counties like I had before.  I appreciate your help!

Richard

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9288
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: CAP Links
« Reply #3 on: March 17, 2024, 03:50:07 PM »
The nws-alerts package can do that.  https://github.com/ktrue/nws-alerts for the non-Saratoga template version.  The nws-alerts package is already in the Saratoga Base-USA package.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline daybreak

  • Senior Member
  • **
  • Posts: 96
    • Alma Weather
Re: CAP Links
« Reply #4 on: March 17, 2024, 03:57:32 PM »
Thanks Ken!  I'll be working on it.

Richard