Author Topic: New Weather Alert Program  (Read 39803 times)

0 Members and 1 Guest are viewing this topic.

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: New Weather Alert Program
« Reply #125 on: April 05, 2013, 01:59:27 PM »
Nevermind I figured it out. I had to change $sortbyEvent from a  0 to a 3 on the code below.


Code: [Select]
$sortbyEvent   = 3;                         // sort titles by severity in alert box & then by number listed below
//                                             0 = location - duplicate events will be displayed
//                                             1 = location - duplicate events removed
//                                             2 = event - duplicate events will be displayed
//                                             3 = event - duplicate events removed




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Amcrest HD IP Camera

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: New Weather Alert Program
« Reply #126 on: April 06, 2013, 11:21:26 PM »
There is a setting in NWSALERTBOX-config that you change no cron to false or true and the message will disappear




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Amcrest HD IP Camera

Offline jonnyj771

  • Senior Contributor
  • ****
  • Posts: 220
    • Lightning Weather
Re: New Weather Alert Program
« Reply #127 on: April 06, 2013, 11:23:34 PM »
There is a setting in NWSALERTBOX-config that you change no cron to false or true and the message will disappear

I just removed the message after finding out that the config said true when I thought I had updated it to false. ](*,)
thanks for the reply though.
Facebook:
Lightning Weather
   www.facebook.com/lightningweather
                             /groups/lightningweather
Lightning Weather Quad Cities
                             /lightningwxqc
                             /groups/lightningWXQC
Weather Station Hardware: Davis Vantage Pro2 6152
Weather Station Software: WD - 10.37S Build XXX (Beta)
Page Template: MeteoTemplate v1x. (Current Active)

Offline CNYWeather

  • Forecaster
  • *****
  • Posts: 2297
    • CNYWeather
Re: New Weather Alert Program
« Reply #128 on: April 20, 2013, 11:47:42 AM »
Curly, wondering if there's a fix for this.

There are a couple River Flood Warnings here right now. Looking at the warnings, seems it may be for a river flood gauge and not an entire area?

This has been going on this spring here. Looks like it is for the river Gauge HIKN6 maybe. Weather Underground sends an alert for this.
Wonder if the alert program can show this also.

http://forecast.weather.gov/showsigwx.php?warnzone=NYZ037&warncounty=NYC065&firewxzone=NYZ037&local_place1=&product1=Flood+Warning

FLOOD STATEMENT
NATIONAL WEATHER SERVICE ALBANY NY
1138 AM EDT SAT APR 20 2013

NYC043-065-210338-
/O.EXT.KALY.FL.W.0006.130420T1537Z-130421T2100Z/
/HIKN6.1.ER.130420T1320Z.130420T1445Z.130421T1500Z.NO/
1138 AM EDT SAT APR 20 2013

THE FLOOD WARNING CONTINUES FOR
  THE WEST CANADA CREEK AT HINCKLEY.
* UNTIL SUNDAY AFTERNOON.
* AT 10 AM SATURDAY THE STAGE WAS 1227.2 FEET.
* FLOOD STAGE IS 1227 FEET.
* MINOR FLOODING IS OCCURRING AND MINOR FLOODING IS FORECAST.


It shows in the county code as a warning but the script isnt showing it.
http://alerts.weather.gov/cap/wwaatmget.php?x=NYC065

Thanks!
Tony

« Last Edit: April 20, 2013, 11:50:44 AM by CNYWeather »
Tony




Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: New Weather Alert Program
« Reply #129 on: April 20, 2013, 02:08:28 PM »
The NWS is not issuing a Flood Statement in their ATOM feed. Just the Flood Warning.
I have no fix for this.

Offline CNYWeather

  • Forecaster
  • *****
  • Posts: 2297
    • CNYWeather
Re: New Weather Alert Program
« Reply #130 on: April 20, 2013, 05:23:15 PM »
It shows on the SWSP Alert Script. That uses a different feed?
Tony




Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: New Weather Alert Program
« Reply #131 on: April 21, 2013, 07:41:24 AM »
The SWSP scrapes web pages while the nws-alerts uses the XML/CAP v1.1 and ATOM Formats.

Offline jonnyj771

  • Senior Contributor
  • ****
  • Posts: 220
    • Lightning Weather
Re: Re: Re: New Weather Alert Program
« Reply #132 on: June 05, 2013, 12:30:01 AM »
Curly, wondering if there's a fix for this.

There are a couple River Flood Warnings here right now. Looking at the warnings, seems it may be for a river flood gauge and not an entire area?

This has been going on this spring here. Looks like it is for the river Gauge HIKN6 maybe. Weather Underground sends an alert for this.
Wonder if the alert program can show this also.

http://forecast.weather.gov/showsigwx.php?warnzone=NYZ037&warncounty=NYC065&firewxzone=NYZ037&local_place1=&product1=Flood+Warning

FLOOD STATEMENT
NATIONAL WEATHER SERVICE ALBANY NY
1138 AM EDT SAT APR 20 2013

NYC043-065-210338-
/O.EXT.KALY.FL.W.0006.130420T1537Z-130421T2100Z/
/HIKN6.1.ER.130420T1320Z.130420T1445Z.130421T1500Z.NO/
1138 AM EDT SAT APR 20 2013

THE FLOOD WARNING CONTINUES FOR
  THE WEST CANADA CREEK AT HINCKLEY.
* UNTIL SUNDAY AFTERNOON.
* AT 10 AM SATURDAY THE STAGE WAS 1227.2 FEET.
* FLOOD STAGE IS 1227 FEET.
* MINOR FLOODING IS OCCURRING AND MINOR FLOODING IS FORECAST.


It shows in the county code as a warning but the script isnt showing it.
http://alerts.weather.gov/cap/wwaatmget.php?x=NYC065

Thanks!
Tony

Tony,
I noticed the zone code on the statement is not just your code. Apparently the statement is under this code:
 NYC043-065-210338-
/O.EXT.KALY.FL.W.0006.130420T1537Z-130421T2100Z/
Try checking the Atom feed under NYC043.
I do see the 065 in there, but I'm thinking the 043 is primary for this statement.
I apologize for not getting to this sooner. The flood warning has probably long since expired. Monitor the codes and see what changes.
Facebook:
Lightning Weather
   www.facebook.com/lightningweather
                             /groups/lightningweather
Lightning Weather Quad Cities
                             /lightningwxqc
                             /groups/lightningWXQC
Weather Station Hardware: Davis Vantage Pro2 6152
Weather Station Software: WD - 10.37S Build XXX (Beta)
Page Template: MeteoTemplate v1x. (Current Active)

Offline Andy G

  • Forecaster
  • *****
  • Posts: 306
    • SunPrairieWeather.com
Re: New Weather Alert Program
« Reply #133 on: July 17, 2013, 08:49:00 AM »
Trying to get my wxnws-alerts-log.php working

trying to get this page http://www.sunprairieweather.com/wxnws-alerts-log.php it is showing the alerts that were in the cache file from the zip file. So I think im most of the way there but my alerts are not writing to the cache file. Any ideas?

Thanks Andy
Once you can accept the universe as being something expanding into an infinite nothing which is something, wearing stripes with plaid is easy.
~Einstein


SunPrairieWeather.com
Davis VP2 24 FARS

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: New Weather Alert Program
« Reply #134 on: July 17, 2013, 05:44:27 PM »
Trying to get my wxnws-alerts-log.php working

trying to get this page http://www.sunprairieweather.com/wxnws-alerts-log.php it is showing the alerts that were in the cache file from the zip file. So I think im most of the way there but my alerts are not writing to the cache file. Any ideas?

Thanks Andy

The config file is up to date but the main file, nws-alerts.php, is the old version without the logging option.
If you have downloaded the latest package here, you may already have this file to upload, or you can download just the main file here.

Once the old version is replaced, the log file won't write until the next time nws-alerts.php is ran.
« Last Edit: July 21, 2013, 07:58:37 AM by Curly »

Offline Andy G

  • Forecaster
  • *****
  • Posts: 306
    • SunPrairieWeather.com
Re: New Weather Alert Program
« Reply #135 on: July 18, 2013, 12:56:23 AM »
Thanks Curly its working. I don't know how I missed that but missed it I did. Thanks for the script and the support. 

Andy
Once you can accept the universe as being something expanding into an infinite nothing which is something, wearing stripes with plaid is easy.
~Einstein


SunPrairieWeather.com
Davis VP2 24 FARS

Offline CNYWeather

  • Forecaster
  • *****
  • Posts: 2297
    • CNYWeather
Re: New Weather Alert Program
« Reply #136 on: July 18, 2013, 09:02:48 AM »
Hey Curly.

I put the newer version of nws-alerts.php in and my config file says to log alerts.
Will I need to wait for some alerts before the alert-log file gets written to?

Also, is there a page nws-alerts-log.php template to call the alerts in a page correctly?

Thanks Rick!

EDIT I got this warning now also. I turned to logging off for now.
Code: [Select]
Warning: fopen(/NWSalertLog20130718.txt) [function.fopen]: failed to open stream: Permission denied in /home/content/62/3715862/html/nws-alerts.php on line 647
« Last Edit: July 18, 2013, 01:57:22 PM by CNYWeather »
Tony




Offline Andy G

  • Forecaster
  • *****
  • Posts: 306
    • SunPrairieWeather.com
Re: New Weather Alert Program
« Reply #137 on: July 18, 2013, 03:08:27 PM »
Hey Curly.

I put the newer version of nws-alerts.php in and my config file says to log alerts.
Will I need to wait for some alerts before the alert-log file gets written to?

Also, is there a page nws-alerts-log.php template to call the alerts in a page correctly?

Thanks Rick!



Hi Rick there is this page wxnws-alerts-log.php for Ver 3 Templates. Is that what you are looking for?
Once you can accept the universe as being something expanding into an infinite nothing which is something, wearing stripes with plaid is easy.
~Einstein


SunPrairieWeather.com
Davis VP2 24 FARS

Offline CNYWeather

  • Forecaster
  • *****
  • Posts: 2297
    • CNYWeather
Re: New Weather Alert Program
« Reply #138 on: July 18, 2013, 03:24:34 PM »
Yep, that was what I was looking for Andy. I found it when I re-downloaded the script from Curly.
Thanks!!!

I'm getting the error again. I assume something isnt writable?

Warning: fopen(/NWSalertLog20130719.txt) [function.fopen]: failed to open stream: Permission denied in /home/content/62/3715862/html/nws-alerts.php on line 647

It's Tony not Rick too.   :grin:
« Last Edit: July 19, 2013, 09:08:12 AM by CNYWeather »
Tony




Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: New Weather Alert Program
« Reply #139 on: July 21, 2013, 07:49:43 AM »
I had the links turned around that are listed a few messages back. (now fixed)
The alert log files are in the nws-alerts.zip file HERE


Quote
failed to open stream: Permission denied

That is the key phrase meaning that the script doesn't have permission to write files to the alertlog folder.
You will have to adjust the permission level (chmod) for the alertlog folder.

« Last Edit: July 21, 2013, 08:08:25 AM by Curly »

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: New Weather Alert Program
« Reply #140 on: July 31, 2013, 02:35:36 PM »




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Amcrest HD IP Camera

Offline CNYWeather

  • Forecaster
  • *****
  • Posts: 2297
    • CNYWeather
Re: New Weather Alert Program
« Reply #141 on: July 31, 2013, 02:47:56 PM »
Did you download and upload the entire script Ryan?
Curly made a few changes to support this.

I had the same issue till I updated the entire script.
Tony




Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: New Weather Alert Program
« Reply #142 on: July 31, 2013, 03:05:26 PM »
Had to add the code below to the config file. Now I'm trying to change the colors because I can't read anything.  :lol: How do I get it to read my area its currently reading Santa Clara,CA?
I've got the permissions on the alert log folder high BTW.



Code: [Select]
// ALERT LOGGING
$logAlerts     = true;                      // true=log alerts    false=don't log alerts
$log_folder    = './alertlog';              // folder that contains the log files. No slash on end


« Last Edit: July 31, 2013, 03:09:22 PM by hayskswx »




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Amcrest HD IP Camera

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: New Weather Alert Program
« Reply #143 on: July 31, 2013, 03:08:53 PM »
The class is ajaxDashboard that has white text and it's in a white background.
I'll look into a fix for you this evening.

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: New Weather Alert Program
« Reply #144 on: July 31, 2013, 03:13:08 PM »
I can see the text on my iPhone but not on PC?




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Amcrest HD IP Camera

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: New Weather Alert Program
« Reply #145 on: July 31, 2013, 03:24:43 PM »
I've got the permissions on the alert log folder high BTW.

FWIW, my /alertlog/ and /cache/ are both 775 (which actually might be a bit high), and all files within /alertlog/ are 644. Works fine.
John
W7JKG

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: New Weather Alert Program
« Reply #146 on: July 31, 2013, 03:30:53 PM »
I've got the permissions on the alert log folder high BTW.

FWIW, my /alertlog/ and /cache/ are both 775 (which actually might be a bit high), and all files within /alertlog/ are 644. Works fine.

Identical to mine but I'm still getting Santa Clara? :roll:
« Last Edit: July 31, 2013, 03:32:31 PM by hayskswx »




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Amcrest HD IP Camera

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: New Weather Alert Program
« Reply #147 on: July 31, 2013, 03:47:00 PM »
There are some tags missing in the nws-alerts-config.php file.
Open that file and add the following and then upload it:

Code: [Select]
$floodType     = true;                      // true=add prefix 'Areal' or 'River' to Flood alert title   false=no prefix to Flood alert
$noAlertText   = 'No Warnings, Watches, or Advisories';  // Text to display for no alerts.

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: New Weather Alert Program
« Reply #148 on: July 31, 2013, 03:53:46 PM »
There are some tags missing in the nws-alerts-config.php file.
Open that file and add the following and then upload it:

Code: [Select]
$floodType     = true;                      // true=add prefix 'Areal' or 'River' to Flood alert title   false=no prefix to Flood alert
$noAlertText   = 'No Warnings, Watches, or Advisories';  // Text to display for no alerts.


Done.

Edit:It just ran and it didn't change anything? Change permissions on alertlog folder to the highest?
« Last Edit: July 31, 2013, 03:58:06 PM by hayskswx »




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Amcrest HD IP Camera

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: New Weather Alert Program
« Reply #149 on: July 31, 2013, 04:08:37 PM »
I'm not seeing any php errors...
It would complain about permissions being denied if they were set too low.

Try turning on the error reporting in nws-alerts.php

Find this
Code: [Select]
//ini_set('display_errors', 1);
//error_reporting(E_ALL);

Replace it with this:
Code: [Select]
ini_set('display_errors', 1);
error_reporting(E_ALL);

Save it then upload it. Run the file manually
Report any errors.
You should comment out those two lines after you do this and upload the file again. This will prevent your index page from showing any php errors if there are any.

« Last Edit: July 31, 2013, 04:54:39 PM by Curly »

 

anything