Author Topic: advisories still showing default CA cities  (Read 278 times)

0 Members and 1 Guest are viewing this topic.

Offline flaboye

  • Member
  • *
  • Posts: 29
    • Fort White Weather Station
advisories still showing default CA cities
« on: May 25, 2019, 05:46:14 AM »
I must be daft.  It's been a while but I grabbed the newest scripts, and installed the site.  I use meteobridge to update.  Everything is working fine, except the two areas that I would like advisories for still show santa clara valley, and santa cruz.  I edited the settings.php appropriately for the two areas that I wish to have advisories for.  Apparently there is something else that needs to be done in addition?  I also edited nws-alerts-config. I tried to search here to see if this question has come up prior and I didn't see anything, so apologies if this has been asked and answered.  The site is:  http://w1ape.com/ajax/wxadvisory.php I have a meteotemplate site at the main url, so this is under the subdirectory ajax.  My goal is to feed this with a davis vue while the pro 2 feeds the main site.  Anyway any suggestions on what I have obviously missed would be great.  The two cities I want are these, and this is the area that I edited:

In settings.php I have:

// NOAA warning zone
$SITE['noaazone']       = 'FLZ022'; // used for NOAA advisories and advforecast2.php zone forecasts
$SITE['hurlURL']      = "wxadvisory.php"; // page to launch for details on NOAA advisories

// Note: additional/optional nws-alerts configuration is in nws-alerts-config.php file
$SITE['NWSalertsCodes'] = array(
  "Columbia|FLZ022|FLC023",
  "Alachua|FLZ036|FLC00",
//  "San Francisco|CAZ006|CAC075"
);
$SITE['NWSalertsSidebar'] = true; // =true to insert in menubar, =false no insert to menubar
//

and although this script states settings.php will override entries here,

I have this in the nws-alerts-config:

$myZC = array(
// "Santa Clara Valley|CAZ513|CAC085",
//  "Santa Cruz Mtns|CAZ512|CAC081|CAC085|CAC087",
//  "Santa Cruz|CAZ529|CAC087",
  "Columbia|FLZ022|FLC023",
  "Alachua|FLZ036|FLC000",
//  "Monterey|CAZ530|CAC053",
//  "South/East Bay|CAZ508|CAC081",
//  "San Mateo Coast|CAZ509|CAC081",
//  "San Francisco|CAZ006|CAC075"
);

Thanks in advance! I know it's something simple my brain has missed.  I apologize for an elementary issue (more than likely).  :grin:

Offline sacreyweather

  • Echo Valley Weather
  • Forecaster
  • *****
  • Posts: 1784
    • Echo Valley Weather
Re: advisories still showing default CA cities
« Reply #1 on: May 25, 2019, 07:43:22 AM »
Hi,

I always delete the default entries in both the Settings.php and nws-alerts-config.php files, then put my own there, making sure they match. This should correct the issue. You may also need to check the cache directory for any forecast entries in there and delete them as well, but leave the following files:  nws-alertsBoxData.php, nws-alertsIconData.php, nws-alertsMainData.php and nws-notes files.

Hope this helps,


John
CWOP: D2073, GR2AE, GR3, Cumulus, PWSweather,  CoCoRaHS: AR-SL-23  

Saline Weather on Twitter
Blitzortung Station 1387

Offline flaboye

  • Member
  • *
  • Posts: 29
    • Fort White Weather Station
Re: advisories still showing default CA cities
« Reply #2 on: May 25, 2019, 10:07:33 AM »
Ok, checked cache dir, and there was a cache file with those two entries in it, thanks for taking time to suggest checking that directory.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 7500
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: advisories still showing default CA cities
« Reply #3 on: May 25, 2019, 03:51:52 PM »
The problem lies deeper than that.. looking at a view-source of the page shows
Quote
<!-- nws-alerts noCron=true .. running nws-alerts.php inline -->
<!-- nws-alerts.php - V1.43 - 14-May-2019 -->
<!-- 4 unique Zone entries found. Zones='FLZ022,FLC023,FLZ036,FLC000' -->
<!-- cache age 19274 seconds - fetch needed -->
<!-- Cron job not used -->
<!-- non XML source: https://alerts.weather.gov/cap/wwaatmget.php?x=FLZ022&y=1 -->
<!-- HTTP stats:  RC=200 dest=23.49.12.132 port=443 (from sce=204.122.16.6)
      Times: dns=0.022 conn=0.024 pxfer=0.031 get=0.004 total=0.035 secs -->
<!-- header type='text/html; charset=UTF-8' -->
<!-- First attempt in getting preliminary URL failed -->
<!-- non XML source: https://alerts.weather.gov/cap/wwaatmget.php?x=FLZ022&y=1 -->
<!-- HTTP stats:  RC=200 dest=23.49.12.132 port=443 (from sce=204.122.16.6)
      Times: dns=0.000 conn=0.002 pxfer=0.008 get=0.003 total=0.011 secs -->
<!-- header type='text/html; charset=UTF-8' -->
<!-- Second attempt failed & skipped -->

<!-- XML source: https://alerts.weather.gov/cap/wwaatmget.php?x=FLC023&y=1 -->
<!-- HTTP stats:  RC=200 dest=23.49.12.132 port=443 (from sce=204.122.16.6)
      Times: dns=0.000 conn=0.002 pxfer=0.011 get=0.004 total=0.015 secs -->
<!-- non XML source: https://alerts.weather.gov/cap/wwaatmget.php?x=FLZ036&y=1 -->
<!-- HTTP stats:  RC=200 dest=23.49.12.132 port=443 (from sce=204.122.16.6)
      Times: dns=0.000 conn=0.002 pxfer=0.011 get=0.005 total=0.016 secs -->
<!-- header type='text/html; charset=UTF-8' -->
<!-- First attempt in getting preliminary URL failed -->
<!-- non XML source: https://alerts.weather.gov/cap/wwaatmget.php?x=FLZ036&y=1 -->
<!-- HTTP stats:  RC=200 dest=23.49.12.132 port=443 (from sce=204.122.16.6)
      Times: dns=0.000 conn=0.002 pxfer=0.008 get=0.004 total=0.012 secs -->
<!-- header type='text/html; charset=UTF-8' -->
<!-- Second attempt failed & skipped -->

<!-- non XML source: https://alerts.weather.gov/cap/wwaatmget.php?x=FLC000&y=1 -->
<!-- HTTP stats:  RC=200 dest=23.49.12.132 port=443 (from sce=204.122.16.6)
      Times: dns=0.000 conn=0.002 pxfer=0.008 get=0.004 total=0.012 secs -->
<!-- header type='text/html; charset=UTF-8' -->
<!-- First attempt in getting preliminary URL failed -->
<!-- non XML source: https://alerts.weather.gov/cap/wwaatmget.php?x=FLC000&y=1 -->
<!-- HTTP stats:  RC=200 dest=23.49.12.132 port=443 (from sce=204.122.16.6)
      Times: dns=0.000 conn=0.002 pxfer=0.008 get=0.003 total=0.011 secs -->
<!-- header type='text/html; charset=UTF-8' -->
<!-- Second attempt failed & skipped -->

<!-- NO cache files updated -->

The issue is the zones you specified are incorrect and queries to them return
Quote
? invalid zone 'FLZ022'
and likewise for FLZ000, and FLC023.  The only one returning data is FLC023 for Columbia (FLC023) Florida.

So.. I'd suggest you use alerts.weather.gov to find the current zone ID for the Forecast and County zones to replace the three in error .. then the script should work correctly for you.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline flaboye

  • Member
  • *
  • Posts: 29
    • Fort White Weather Station
Re: advisories still showing default CA cities
« Reply #4 on: May 25, 2019, 11:33:51 PM »
Thank you for catching that.  It has been several years since I set up the Saratoga scripts and I had those zones written down in my notes, they surely changed them with the exception of the one, and I have the correct codes now.  It never dawned on me that they would have changed them, but there you go. I should have checked them.  Thank you for taking the time to see this and point it out to me.  I appreciate that very much!

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 7500
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: advisories still showing default CA cities
« Reply #5 on: May 26, 2019, 01:09:45 AM »
I've seen a few notices from the NWS about change in zones .. its a good thing to check (with the view-source of the page) from time to time to make sure all the specified zones are responding correctly.  Glad you're fixed now..
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline flaboye

  • Member
  • *
  • Posts: 29
    • Fort White Weather Station
Re: advisories still showing default CA cities
« Reply #6 on: May 26, 2019, 01:28:21 AM »
I am too,  [tup] thank you.  If not for these zones it would have been a flawless Base-USA install the first time, lol.  The only other glitch I ran into had to do with MB and the steelseries gauges which was also my fault.