Weather Script

Discussions about this interesting Xelatec product
kb3ors
Posts: 49
Joined: Wed Nov 10, 2010 10:58 pm

Weather Script

Postby kb3ors » Sat Apr 09, 2011 6:59 pm

UPDATED 08/14/12

ASTERISK WEATHER SCRIPT
**********************************************************
This script was originally written for IRLP use by
Randy Hammock - KC6HUR and later edited by
Christopher J Kovacs, Sr - W0ANM

Edited 03/15/2011 for use with the XIPAR install of
app_rpt by Brian Burton - KB3ORS

***********************************************************
This version of Weather Script has been stripped down to
just a weather alert software. It contains the following files.

./clearWxAlerts - Clears any active weather alerts that are
currently active.

./getWxAlert - Pulls any weather watches,warnings, or advisorys
for the area defined in the wx_scripts.conf file.

./playWxAlertBg - Is a script that runs in the background that
auto plays an alert message at defined intervals set inside the
script.

wx_scripts.conf - Contains all the config info needed by the other
scripts.

wxtext_conv.sed

alert_list.txt - is grep by the ./getWxAlert script to clean up the
text file downloaded before it is converted to the .wav or .ul file.

nsd_cccc.txt - contains a list of ICAO stations.


********************************************************************

Install Process.

You will need to install the following on a newly installed
allstar node:

wget
festival
perl-DateManip

Some of the abover may already be installed. To verify that
you have all dependencies needed, run the following commands:

yum install wget
yum install festival
yum install perl-DateManip


If you have not downloaded the file, do so now.

(Note: This file is setup using Cepstral Voice. If you are using the default voices by Festival. Please edit the wxscripts.conf file)

cd /var/lib/asterisk/
wget http://www.allstarnode.com/scripts/Weather.tgz
tar -xvf Weather.tgz
cd Weather/
nano wx_scripts.conf -edit Zone information to your area.
To find zone info http://alerts.weather.gov/ scroll down to
your state and click on (zone list).
(ex: Warren County PA is PAZ004)
ctrl 0 to save and ctrl -x to exit.

nano playWxAlertBg - edit XXXXX lines 67 and 69 in the
playmsg area to reflect localplay if using on a repeater.
If this is used on a simplex node playback.
YYYYY to your node #
ctrl 0 to save and ctrl -x to exit.

nano /etc/asterisk/rpt.conf - add under the functions and
functions repeater stanza a dtmf command to play the full version
of the alert.
Replace (ZONE#) with your zone # (EX: PAZ004)
repeater mode (Ex: 86 => localplay,wx/alert/ZONE#/COMPLETE_ALERT)
simplex mode (EX: 86 => playback,wx/alert/ZONE#/COMPLETE_ALERT)


The playWxAlertBg only plays a brief message that there is a warning.

***********************************************************************
Auto Download Weather Alerts.

This will check the NWS website every 15 minutes.

From your Windows box, inside the network, open a web browser pointed to
the address of the linux box XXX.XX.XXX.XX:10000. (EX: 192.168.1.104:10000)

Log in using your root login and password.

At the webmin page open system, and scheduled cron jobs.

Create new scheduled cron job.

Execute as user - "asterisk"

command - /var/lib/asterisk/Weather/getWxAlert

Desription - Download Weather Alert

When to execute - Select times and date

under the minutes column - click selected

hold the ctrl key and click 0,15,30,and 45

click - create

click the browser refresh button and open the cron you just created by
clicking on the /var/lib/asterisk/Weather/getWxAlert under the command line.

Click run now to test the cron you just created.

If the script generates output on the screen, all is well. Logout and close
the browser.

You know have a functioning wx script on your XIPAR install.

Thanks for your patients and enjoy the Script.

KB3ORS - Brian
KB3ORS - Brian

kb3ors
Posts: 49
Joined: Wed Nov 10, 2010 10:58 pm

Re: Weather Script

Postby kb3ors » Mon Apr 25, 2011 10:13 am

Updates to the weather script and readme file. 04/25/2011
KB3ORS - Brian

w0anm
Posts: 3
Joined: Mon Jul 18, 2011 6:57 pm

Re: Weather Script

Postby w0anm » Mon Jul 18, 2011 9:16 pm

There has been some updates with the Weather Script and the NWS on the IRLP side. I wrote the Wx Alert scripts for IRLP :)

There was some issues with using the NWS Zones and Weather Alerts. There are differences in Zone alerts and County alerts. More importantly, some Zone alerts are missing severe weather events. Also, this issue is seen certain parts of the country. Because of this issue, the IRLP scripts have now been changed to use the NWS County Codes for gathering alert information.

I am not sure who maintains the code, but it may be worth the effort to update the AllStar WxScripts to use the COUNTY alerts instead of the ZONE alerts. If you need any assistance, let me know. But be aware, I am not a convert to AllStar; yet. ;)

Here's the latest link to the WxScripts for IRLP side:
[urlhttp://www.w0anm.com/dokuwiki/doku.php?id=irlp:irlp_scripts][/url]

Cheers,

Chris, w0anm (irlp node 3106)

kb3ors
Posts: 49
Joined: Wed Nov 10, 2010 10:58 pm

Re: Weather Script

Postby kb3ors » Wed Jul 20, 2011 8:00 pm

Thank you Chris for Registering and posting. I had found the same issue and changed some but not all of them to the county code.

Brian
KB3ORS - Brian

n3fe
Posts: 4
Joined: Sun Nov 28, 2010 11:39 pm
Location: Mansfield, PA
Contact:

Re: Weather Script

Postby n3fe » Fri Jan 27, 2012 11:01 am

Brian,

I am unable to retrieve what is in the zip file. I do have my own version to use but thought I would share this error with you..

[root@localhost asterisk]# unzip Weather.zip
Archive: Weather.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of Weather.zip or
Weather.zip.zip, and cannot find Weather.zip.ZIP, period.

k0jsc
Posts: 3
Joined: Sun Mar 04, 2012 9:08 pm

Re: Weather Script

Postby k0jsc » Tue Mar 06, 2012 10:38 am

I modified this slightly to get it working on an ACID distro. It's working mostly and I can call the warnings with *86 but it doesn't automatically air the alerts...I must have missed something. Can anyone point me in the right direction?

Thx and 73 de K0JSC

w0anm
Posts: 3
Joined: Mon Jul 18, 2011 6:57 pm

Re: Weather Script

Postby w0anm » Thu Nov 08, 2012 11:07 pm

Well, finally getting started in AllStar. I'll revisit my scripts for AllStar use, but first I need to complete my AllStar node/radio setup.

Stay tuned.

73, Chris w0anm

w0anm
Posts: 3
Joined: Mon Jul 18, 2011 6:57 pm

Re: Weather Script

Postby w0anm » Sun Nov 11, 2012 5:34 pm

I just got started in AllStar and have a node up and running. I have modified the getWxScript to fix an issue with emails and full weather alert text. I am reviewing the Weather scripts above to see who they differ from my irlp Wx Scripts.

73,

Chris, w0anm


Return to “XIPAR Distribution”

Who is online

Users browsing this forum: No registered users and 1 guest