This script retrieves weather data from Weather Underground and announces it on AllStar Link.
- Python 3.7 or higher
- Weather Underground API key
- AllStar Link node
- Asterisk AMI access
-
Install the required dependencies:
pip install -r requirements.txt
-
Copy the
.env.examplefile to.env:cp .env.example .env
-
Edit the
.envfile and fill in your configuration:WU_API_KEY: Your Weather Underground API keyWU_STATION_ID: Your local weather station IDASTERISK_HOST: Your Asterisk server hostname (default: localhost)ASTERISK_PORT: Your Asterisk AMI port (default: 5038)ASTERISK_USER: Your Asterisk AMI usernameASTERISK_SECRET: Your Asterisk AMI secretALLSTAR_NODE: Your AllStar node number
Run the script:
python weather_announcer.py- Retrieves current weather conditions from Weather Underground
- Formats weather data into a readable message
- Announces the weather on AllStar Link using Asterisk AMI
- Includes temperature, humidity, wind speed, wind direction, and pressure information
The script includes error handling for:
- Weather API connection issues
- AllStar Link connection problems
- Invalid configuration
This project is open source and available under the MIT License.