Asterisk Weather Centre
From Poggs' Wiki
I have written an Open Source Weather Centre for Asterisk using Terminal Aerodrome Forecast (TAF) data from weather.aero's site.
Contents |
[edit]
Installation
- Download the files weather.pl and astweather-locations.tgz.
- Unpack astweather-locations.tgz in to a subdirectory called weatherstations under your Asterisk sounds directory, e.g. /usr/share/asterisk/sounds.
- Copy the weather.pl script to somewhere accessible from Asterisk.
- Add a line similar to the following in to your extensions.conf file:
exten => 4991,2,agi,/home/pwh/development/weather/weather.pl
- Reload your dial plan and dial.
[edit]
Configuration
To select the weather station you want to use, uncomment one of the $station lines in the Perl script.
[edit]
How it works
The script downloads a METAR for the particular weather station from weather.aero, and processes it using XML::Simple. It then uses Geo::METAR to decode the METAR, and Asterisk's AGI interface to read out data in the report.
[edit]
Future plans
Using telephone numbering data from the OFCOM website, it should be possible to pick the nearest weather station to a caller, assuming they are using a fixed-line 01 or 02-prefixed number.
