APRSD Plugin for OpenWeatherMap APIs
Features
This plugin provides two APRSD plugins that use the OpenWeatherMap API:
WeatherPlugin - Returns current weather conditions based on GPS beacon location
TimePlugin - Returns current time in the timezone of the GPS beacon location
Both plugins use aprs.fi to look up the GPS coordinates of APRS stations, then use OpenWeatherMap to fetch weather and timezone information.
Requirements
APRSD server (version 4.2.0 or higher)
OpenWeatherMap API key (free tier available)
aprs.fi API key (for location lookup)
Installation
You can install APRSD Plugin for OpenWeatherMap APIs via pip from PyPI:
$ pip install aprsd-openweathermap-plugin
Configuration
Getting an OpenWeatherMap API Key
Visit https://home.openweathermap.org/users/sign_up to create a free account
Once logged in, navigate to https://home.openweathermap.org/api_keys
Generate a new API key (or use the default one provided)
The free tier includes 1,000 API calls per day, which is sufficient for most use cases
Note: It may take a few minutes for a newly created API key to become active.
Configuring the Plugin
Add the following to your APRSD configuration file (typically aprsd.conf):
[aprsd_openweathermap_plugin]
enabled = True
apiKey = YOUR_OPENWEATHERMAP_API_KEY_HERE
[aprs_fi]
apiKey = YOUR_APRS_FI_API_KEY_HERE
You can get an aprs.fi API key from https://aprs.fi/account/
Usage
Weather Plugin
The WeatherPlugin provides current weather conditions at the location of an APRS station’s GPS beacon.
Command Format: * w or weather - Get weather at your own location (based on your callsign’s last GPS beacon) * w CALLSIGN or weather CALLSIGN - Get weather at the specified callsign’s location
Example Usage:
Send a message to your APRSD server:
weather
Response:
clear sky 20.5C/15.2C Wind 10@180 65%
Or query weather for a specific station:
weather N0CALL
Response:
partly cloudy 22.0C/18.0C Wind 15@270G25 70%
The response includes: * Weather description (e.g., “clear sky”, “partly cloudy”) * Temperature and dew point in Celsius or Fahrenheit (based on configured units) * Wind speed, direction, and optional gust * Humidity percentage
Time Plugin
The TimePlugin provides the current time in the timezone of an APRS station’s GPS beacon location.
Command Format: * t or time - Get time at your own location * t CALLSIGN or time CALLSIGN - Get time at the specified callsign’s location
Example Usage:
Send a message to your APRSD server:
time
Response:
2024-01-15 14:30:00 PST
Or query time for a specific station:
time N0CALL
Response:
2024-01-15 16:30:00 EST
The plugin automatically determines the timezone based on the GPS coordinates and returns the local time. If OpenWeatherMap API is unavailable, it defaults to UTC time.
How It Works
Both plugins follow a similar workflow:
Extract the callsign from the message (or use the sender’s callsign if not specified)
Query aprs.fi API to get the GPS coordinates (latitude/longitude) of the callsign’s last beacon
Use the GPS coordinates to query OpenWeatherMap API for: * WeatherPlugin: Current weather conditions * TimePlugin: Timezone information
Format and return the results
The plugins require both APIs to be functional: * If aprs.fi lookup fails, the plugin returns “Failed to fetch location” * If OpenWeatherMap API fails, WeatherPlugin returns “Unable to get weather” * If OpenWeatherMap API fails, TimePlugin defaults to UTC timezone
Contributing
Contributions are very welcome. To learn more, see the Contributor Guide.
License
Distributed under the terms of the MIT license, APRSD Plugin for OpenWeatherMap APIs is free and open source software.
Issues
If you encounter any problems, please file an issue along with a detailed description.
Credits
This project was generated from @hemna’s APRSD Plugin Python Cookiecutter template.
Metadata
Release files for aprsd-openweathermap-plugin 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aprsd_openweathermap_plugin-1.0.0.tar.gz | 21.6 kB | Without provenance | Details for aprsd_openweathermap_plugin-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aprsd_openweathermap_plugin-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for aprsd_openweathermap_plugin-1.0.0-py3-none-any.whl |
Total release size: 33.4 kB
Release files / aprsd_openweathermap_plugin-1.0.0.tar.gz
| Download URL | aprsd_openweathermap_plugin-1.0.0.tar.gz |
|---|---|
| Size | 21.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e0a09502433e07eb32b69d8577ba7bbba98fe5dcb134f6c820e716773e9dc762
|
|
BLAKE2b-256 checksum How to use checksums |
0880fa11cda53f5eb389dcf4f6d09cd4be89f491e1d4e6aa841f43d4743b72aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.3
|
Release files / aprsd_openweathermap_plugin-1.0.0-py3-none-any.whl
| Download URL | aprsd_openweathermap_plugin-1.0.0-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7ee7f79db4ad027f03f19dda0573cb187e44a4909077ff528820a2b20b09d4bf
|
|
BLAKE2b-256 checksum How to use checksums |
12d075af607a106c58522a9bbc7d6c25ff82940dd138a932ecc62bed79314235
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.3
|
Security for aprsd-openweathermap-plugin 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.