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

0 Members and 1 Guest are viewing this topic.

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: New Weather Alert Program
« Reply #150 on: July 31, 2013, 04:16:22 PM »
No errors reported Curly.




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 #151 on: July 31, 2013, 04:55:32 PM »
I'll look into it this evening.

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: New Weather Alert Program
« Reply #152 on: July 31, 2013, 04:57:47 PM »
I'll look into it this evening.

Ok. Thanks for the support.




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 #153 on: July 31, 2013, 07:28: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:

Let's start with the color change.
Open wxnws-alerts-log.php and find this:
Code: [Select]
background-color:#FFF;
There will be 5 instances in the file. Change all 5  #FFF  to the color of your choice.

In the update script package, there is a small image file named lbg.png in the alert-images folder that needs to be uploaded to the same folder. That is a light background fill color for the alert title bar.

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: New Weather Alert Program
« Reply #154 on: July 31, 2013, 07:58:48 PM »
Quote
How do I get it to read my area its currently reading Santa Clara,CA?

Everything is in order as far as the settings and there are no scripting errors.
Have you had any alerts since updating?

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: New Weather Alert Program
« Reply #155 on: July 31, 2013, 08:34:10 PM »
Quote
How do I get it to read my area its currently reading Santa Clara,CA?

Everything is in order as far as the settings and there are no scripting errors.
Have you had any alerts since updating?

No alerts are in effect as of now here. At work so I can't do the color change.




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 #156 on: August 01, 2013, 02:04:07 PM »
Quote
How do I get it to read my area its currently reading Santa Clara,CA?

Everything is in order as far as the settings and there are no scripting errors.
Have you had any alerts since updating?

So the CA alert won't be replaced until I have an alert for my area?

http://hayskansasweather.com/wxnws-alerts-log.php
« Last Edit: August 01, 2013, 02:33:22 PM by hayskswx »




Ryan 

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

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: New Weather Alert Program
« Reply #157 on: August 01, 2013, 02:56:23 PM »
You are not running the current version of nws-alerts.php -- V1.21 is the current version.

The version you are running is not "template aware" and that is the cause of your configuration issue.
« Last Edit: August 01, 2013, 02:57:59 PM by saratogaWX »
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 cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: New Weather Alert Program
« Reply #158 on: August 01, 2013, 02:58:19 PM »
You are not running the current version of nws-alerts.php -- V1.21 is the current version.

I downloaded the newest one yesterday. It's showing I'm running V1.21
« Last Edit: August 01, 2013, 03:01:13 PM by hayskswx »




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 #159 on: August 01, 2013, 03:05:25 PM »
You are not running the current version of nws-alerts.php -- V1.21 is the current version.

The version you are running is not "template aware" and that is the cause of your configuration issue.

Ok. Where is the one that I need to use. I downloaded the newest one?




Ryan 

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

Offline CNYWeather

  • Forecaster
  • *****
  • Posts: 2295
    • CNYWeather
Re: New Weather Alert Program
« Reply #160 on: August 01, 2013, 03:11:40 PM »
Tony




Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: New Weather Alert Program
« Reply #161 on: August 01, 2013, 03:18:49 PM »
Looks like it is working now.  

Use the check-fetch-times.php?show=versions and the link at the bottom of the page to easily get updates.
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 cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
« Last Edit: August 01, 2013, 03:34:34 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 #163 on: August 01, 2013, 05:42:25 PM »
Quote
So the CA alert won't be replaced until I have an alert for my area?

You won't get a logged alert file until a location gets an alert. So far I haven't seen any alerts for the 11 locations since you've updated.

The California alert log is a sample file in the alertlog folder.  NWSalertLog20130505.txt   
You can delete that file now, and it will show nothing on the log web page, or delete it after you get the first alert from your locations.

OR

You can open up the log file and add something custom temporarily.
Open alertlog/NWSalertLog20130505.txt
Delete everything and replace it with this:
Code: [Select]
<?php 
 
$daily_log 
= array (
  
=> 
  array (
    
=> 'No alerts logged',
    
=> 'ELLIS COUNTY',
    
=> 1371095040,
    
=> 1371154800,
    
=> 'NPW.gif',
    
=> 'ELLIS COUNTY',
    
=> 'No alerts logged for this day',
  ),
);

?>
« Last Edit: August 01, 2013, 05:56:12 PM by Curly »

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: New Weather Alert Program
« Reply #164 on: August 02, 2013, 11:54:29 AM »
Everything is working fine. Thanks for the help and support getting this working. :grin:

 http://hayskansasweather.com/wxnws-alerts-log.php
« Last Edit: August 02, 2013, 04:04:44 PM by hayskswx »




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 #165 on: January 14, 2014, 07:29:08 PM »
Hi Curly,

Suddenly yesterday started getting a pile (like >100) of the following in my php_error_log...

[14-Jan-2014 17:15:09 America/Phoenix] PHP Warning:  array_search() expects parameter 2 to be array, null given in /home/tigercon/public_html/tiggrweather.net/AtomAlerts/AtomFeed.php on line 309
[14-Jan-2014 17:15:09 America/Phoenix] PHP Warning:  array_search() expects parameter 2 to be array, null given in /home/tigercon/public_html/tiggrweather.net/AtomAlerts/AtomFeed.php on line 548

Most are for line 309. Have not touched this script in ages.

Thoughts appreciated.

EDIT: This started 2 days ago and is throwing errors every 15 minutes. Needless to say, there are currently almost 3900 error lines in the log.
« Last Edit: January 14, 2014, 08:02:20 PM by jgillett »
John
W7JKG

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: New Weather Alert Program
« Reply #166 on: January 15, 2014, 05:16:05 AM »
I'm not seeing any errors when executing the AtomFeed script.
Could this be on a home server ?

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: New Weather Alert Program
« Reply #167 on: January 15, 2014, 10:31:17 AM »
I'm not seeing any errors when executing the AtomFeed script.
Could this be on a home server ?
Nope - no home server.

But - after talking to the host late last night about some really funky errors that were also showing up it turns out to have been a problem with a PHP update to 5.4 that they just did (with no notification at all to me). The php.ini was not being properly seen by my site, which the rep fixed on the spot. I zeroed out the php_error_log last night and it's still zero this morning (it was hitting multiple times every 15 minutes, which makes sense). Very annoyed about their lapse.

Sorry for the bother, but thanks for the reply.
John
W7JKG

Offline Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: New Weather Alert Program
« Reply #168 on: January 23, 2014, 07:21:41 PM »
UPDATE

With the upgrading of php, the file nws-alerts.php has a strict error message about a line in the code.
This is fixed in the latest version 1.23.
You can download just the file nws-alerts.php here
or download the complete package here.

Unzip the file and upload nws-alerts.php. There is nothing to configure.

Thanks

Offline jonnyj771

  • Senior Contributor
  • ****
  • Posts: 220
    • Lightning Weather
Re: New Weather Alert Program
« Reply #169 on: April 06, 2014, 04:20:17 PM »
Curly,

I am using the stand-alone version of the nws-alerts script on my site. I have updated my pages with the Leuven Template ( Leuven Template forum post page)

I am attempting to use the nws-alerts script with this template. Currently, I have no alerts in my area (could be part of the problems). My issues are:
500 internal server error when I attempt to go to the page http://lightningweather.com/weather2/nws-alerts/nws-alerts.php?mu=1 to manually update the script.  I also have the same error when I attempt to go to the summary and details pages.

If I go to the Advisory page which is how I have the wsmenudata.xml set up (for security purposes) I get the page open and blank with no errors.

I have the nws-alerts.php file set to show errors and both my settings page and my nws-alerts-config.php files show where the files/folders are properly located. I have also set 'show no alerts' to true. I am including the text files for these in this.

Is is possible that I am getting these errors due to the lack of alerts or permissions? all of my permissions are set at either 775 or 777 (any lower and I get "file does not exist" errors).  ](*,)

I also have a cron job set up on my computer using Windows7, I used the Setup VistaCron files/instructions as they are nearly identical to Windows7's settings.

I know most everyone in this forum is using a Saratoga-based template (which are good and have no objections to, I just dare to be different) :lol:

Do you have any ideas as to my issues and how to solve them?
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 cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: New Weather Alert Program
« Reply #170 on: April 06, 2014, 04:27:20 PM »
Must be a Cron job issue. I run a vbs file in Windows Task Scheduler.




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 #171 on: April 06, 2014, 04:29:24 PM »
Must be a Cron job issue. I run a vbs file in Windows Task Scheduler.

Ryan,

I appreciate the quick reply. I am using the .vbs file in Windows Task Scheduler. Set for 10 minute intervals.

Edit: I went to the WxStation Computer running the Cronjob...Verified that the task was running without any problems. I enabled the history to make sure if there were errors, that I was able to locate and correct them. It's returning successful tasks since 1:41 PM CDT. (all set on odd minute)
« Last Edit: April 06, 2014, 04:41:33 PM by jonnyj771 »
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 cospringswx

  • Forecaster
  • *****
  • Posts: 4136
    • Colorado Springs Weather
Re: New Weather Alert Program
« Reply #172 on: April 06, 2014, 04:50:15 PM »
Why are you running both? From my understanding only 1 is required. I would keep the task scheduler. Do u have it running for 10 minutes indefinitely? They might be conflicting?




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 #173 on: April 06, 2014, 05:11:14 PM »
Why are you running both? From my understanding only 1 is required. I would keep the task scheduler. Do u have it running for 10 minutes indefinitely? They might be conflicting?

I'm only running the one task. My hosting Provider (iPage) doesn't provide Cron-tasks.
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 Curly

  • Forecaster
  • *****
  • Posts: 724
    • Michiana Weather
Re: New Weather Alert Program
« Reply #174 on: April 06, 2014, 05:34:05 PM »
Jonny J,

I don't know what is causing the internal server error but it could be from the script attempting to write files.
You will need to locate and change three file paths in the file nws-alerts-config.php to the paths below.

Code: [Select]
$cacheFileDir  = './alerts-cache/';         // default cache file directory
$icons_folder  = './alert-images';          // folder that contains the icons. No slash on end

$log_folder    = './alertlog';              // folder that contains the log files. No slash on end

After the changes, upload the file and manually update the file nws-alerts.php.

 

anything