A very early alpha test of an application for ham radio operators using allstar3 to make periodic and event based alerts for a variety of weather, civil and geologic situations. Works in the US and Canada. Uses GPS if you are mobile, but also allows you to fix a position if you are not travelling. Let's make this code keep people safe !
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
swanie98635 d6ba3e62b8
Initial commit of ASL3 Weather Announcer
2 months ago
asl3_wx_announce Initial commit of ASL3 Weather Announcer 2 months ago
err pastes Initial commit of ASL3 Weather Announcer 2 months ago
.gitignore Initial commit of ASL3 Weather Announcer 2 months ago
LICENSE Initial commit of ASL3 Weather Announcer 2 months ago
README.md Initial commit of ASL3 Weather Announcer 2 months ago
asl3-wx.service Initial commit of ASL3 Weather Announcer 2 months ago
config.example.yaml Initial commit of ASL3 Weather Announcer 2 months ago
config.yaml.example Initial commit of ASL3 Weather Announcer 2 months ago
config_fixed.yaml Initial commit of ASL3 Weather Announcer 2 months ago
debug_ec.py Initial commit of ASL3 Weather Announcer 2 months ago
debugv2.log Initial commit of ASL3 Weather Announcer 2 months ago
deploy.ps1 Initial commit of ASL3 Weather Announcer 2 months ago
diagnose_audio.py Initial commit of ASL3 Weather Announcer 2 months ago
pydantic.log Initial commit of ASL3 Weather Announcer 2 months ago
requirements.txt Initial commit of ASL3 Weather Announcer 2 months ago
test_tts.py Initial commit of ASL3 Weather Announcer 2 months ago

README.md

ASL3 Weather Announcer

ASL3 Weather Announcer is a flexible, multi-country weather alert and reporting system designed for AllStarLink 3 (Asterisk) nodes.

It provides automated verbal announcements for:

  • Active Weather Alerts: Warnings, watches, and advisories as they are issued.
  • Daily Reports: Detailed forecast, current conditions, sunrise/sunset, and moon phase.
  • Time Announcements: Current local time at start of report.

Features

  • Multi-Provider Support:
    • 🇺🇸 USA: Uses National Weather Service (NWS) API.
    • 🇨🇦 Canada: Uses Environment Canada data.
    • Extensible: Plugin architecture allows adding more countries easily.
  • Smart Location:
    • GPS/GNSS: Automatically detects location using gpsd.
    • Static: Configurable fallback lat/lon.
    • Auto-Zone: Automatically monitors the correct County, Forecast Zone, and Fire Weather Zone for your location.
  • Customizable:
    • Extra Zones: Manually monitor adjacent counties or specific stations (e.g., VAC001 or ON/s0000430).
    • Audio: Works with pico2wave, flite, or any CLI TTS engine. Plays to multiple ASL3 nodes.

Installation

Prerequisites

On your ASL3 server (Debian/Raspbian):

sudo apt update
sudo apt install python3-pip libttspico-utils gpsd sox

Install Package

  1. Clone this repository to your scripts directory (e.g., /etc/asterisk/scripts/).
  2. Install python dependencies:
    pip3 install -r requirements.txt
    

Configuration

Copy the example config:

cp config.yaml.example config.yaml

Edit config.yaml:

location:
  type: auto         # Use 'auto' for GPS, or 'static' for fixed lat/lon
  # latitude: 45.123
  # longitude: -75.123

voice:
  tts_command: 'pico2wave -w {file} "{text}"'

audio:
  nodes: 
    - "1966"         # Your Private Node
    - "92394"        # Your Public Node

alerts:
  min_severity: "Watch"
  extra_zones:       # Optional: Monitor extra areas
    - "VAC001"       # US County FIPS
    - "ON/s0000430"  # Canadian Station ID

Usage

Test Full Report

Announce current conditions, forecast, and time immediately:

python3 -m asl3_wx_announce.main --config config.yaml --report

Run Alert Monitor

Run in the background to announce new alerts as they happen:

python3 -m asl3_wx_announce.main --config config.yaml --monitor

Scheduled Hourly Reports

To announce the weather every hour, add to crontab -u asterisk -e:

0 * * * * /usr/bin/python3 -m asl3_wx_announce.main --config /path/to/config.yaml --report

Contributing

Pull requests are welcome! See provider/ directory to add support for new countries.

License

MIT License

Powered by TurnKey Linux.