Skip to main content

APRSD Plugins for the AVWX Api

Project description

PyPI Status Python Version License

Read the documentation at https://aprsd-avwx-plugin.readthedocs.io/ Tests Codecov

pre-commit

Features

  • Fetch METAR weather reports for APRS callsigns

  • Automatically finds the nearest weather station to a callsign’s location

  • Uses aprs.fi to get GPS coordinates for callsigns

  • Returns raw METAR data for aviation weather information

Requirements

  • Python 3.11 or higher

  • APRSD server (version 4.2.0 or higher)

  • AVWX API access (either via subscription or self-hosted)

  • aprs.fi API key (for location lookups)

Installation

You can install AVWX Api based APRSD plugins via pip from PyPI:

$ pip install aprsd-avwx-plugin

AVWX API Setup

This plugin requires access to an AVWX API instance. You have two options:

Official AVWX REST API (Subscription Required)

The official AVWX REST API is available at https://info.avwx.rest/_. This service provides:

  • METAR - Current surface conditions

  • TAF - 24-hour forecasts

  • PIREP - Inflight observations

  • AIRMET/SIGMET - Weather advisories

  • NOTAM - Notices to airmen

  • Station information and search

The official service requires a subscription (hobby, pro, or enterprise tiers). Basic METAR and TAF parsing services are free, but other features require paid plans.

For more information, visit the AVWX REST API website.

Self-Hosted AVWX Engine

Alternatively, you can self-host your own AVWX API using the open-source avwx-engine project. This allows you to run your own aviation weather parsing service without subscription fees.

To self-host:

  1. Clone the avwx-engine repository:

    $ git clone https://github.com/avwx-rest/avwx-engine
    $ cd avwx-engine
  2. Follow the installation and setup instructions in the avwx-engine README

  3. Configure the plugin to point to your self-hosted instance (see Configuration below)

The avwx-engine is a Python library that can be run as a service. You’ll need to set up an API server wrapper around it to provide REST API endpoints that this plugin can consume.

Configuration

The plugin requires two configuration options in your APRSD configuration file:

  • avwx_plugin.apiKey - Your AVWX API key (required)

  • avwx_plugin.base_url - The base URL for the AVWX API (default: https://avwx.rest)

Example configuration:

[avwx_plugin]
apiKey = your-api-key-here
base_url = https://avwx.rest

If you’re self-hosting, set base_url to your self-hosted instance URL:

[avwx_plugin]
apiKey = your-api-key-here
base_url = http://localhost:8000

You also need an aprs.fi API key for location lookups:

[aprs_fi]
apiKey = your-aprs-fi-api-key-here

Usage

Once installed and configured, the plugin can be triggered via APRS messages.

Command Format

The plugin responds to messages starting with m or metar:

  • m - Get METAR for your own callsign’s location

  • metar - Get METAR for your own callsign’s location

  • m <CALLSIGN> - Get METAR for the specified callsign’s location

  • metar <CALLSIGN> - Get METAR for the specified callsign’s location

How It Works

  1. When a user sends a metar command (with or without a callsign), the plugin:

    1. Determines the target callsign (either the sender or the specified callsign)

    2. Queries aprs.fi to get the GPS coordinates for that callsign

    3. Uses the AVWX API to find the nearest weather station to those coordinates

    4. Fetches the METAR report for that station

    5. Returns the raw METAR data to the user

  2. The plugin requires the callsign to have recent GPS data in aprs.fi for location lookup.

Example Usage

Send an APRS message to your APRSD server:

m

or

metar

or

m N0CALL

or

metar N0CALL

The plugin will respond with the raw METAR report for the nearest weather station to the callsign’s location, for example:

KJFK 251851Z 36010KT 10SM FEW250 12/03 A3012 RMK AO2 SLP201 T01220028

If the callsign doesn’t have location data in aprs.fi, or if the AVWX API is unavailable, an error message will be returned.

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the MIT license, AVWX Api based APRSD plugins 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aprsd_avwx_plugin-1.0.0.tar.gz (18.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aprsd_avwx_plugin-1.0.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file aprsd_avwx_plugin-1.0.0.tar.gz.

File metadata

  • Download URL: aprsd_avwx_plugin-1.0.0.tar.gz
  • Upload date:
  • Size: 18.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.3

File hashes

Hashes for aprsd_avwx_plugin-1.0.0.tar.gz
Algorithm Hash digest
SHA256 916b7c87976a916d8bdde850d45feddd6f657820b55d2b5d58f8a14d0a6c1351
MD5 968c431fe069833775bbd83944788b93
BLAKE2b-256 8f913785ad1aef2f0ad87a8546e95bbee7ae3165be8c4be0e0be6c159f6f2e8b

See more details on using hashes here.

File details

Details for the file aprsd_avwx_plugin-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aprsd_avwx_plugin-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6b111402f18a6dae28bf408b9f091649007c004a634df4a5d5c4d5b3b27ded1b
MD5 c4ba79337c0bdd7436961c6241a24489
BLAKE2b-256 0506ff2c9c6776d3707e67ea63a6d96ea6756cbfe7cf39b155845e06caff5af6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page