Skip to content

hemna/aprsd-timeopencage-plugin

Repository files navigation

APRSD plugin for Time using OpenCage

PyPI Status Python Version [License](https://opensource.org/licenses/Apache Software License 2.0)

Read the Docs Tests Codecov

pre-commit

Features

  • Get local time for any APRS callsign based on their GPS location
  • Automatically determines timezone using OpenCage reverse geocoding
  • Supports querying time for your own callsign or any other callsign
  • Falls back to UTC if OpenCage API is unavailable

Requirements

  • APRSD server configured and running
  • APRS.fi API key configured
  • OpenCage Data API key (get one at https://opencagedata.com/api)
  • Python 3.11+

Installation

You can install APRSD plugin for Time using OpenCage via pip from PyPI:

$ pip install aprsd-timeopencage-plugin

Configuration

Add the following to your APRSD configuration file:

[aprsd_timeopencage_plugin]
apiKey = YOUR_OPENCAGE_API_KEY

Replace YOUR_OPENCAGE_API_KEY with your actual OpenCage Data API key.

Usage

The plugin responds to APRS messages starting with t or time. It will:

  1. Look up the callsign's location from APRS.fi
  2. Use OpenCage to determine the timezone for that location
  3. Return the current local time in that timezone

Example Interactions

Get time for your own location:

You: t
APRSD: 2025-01-25 14:32:15 PST

Get time for another callsign:

You: time N0CALL
APRSD: 2025-01-25 17:32:15 EST

Short command:

You: t KD0ABC
APRSD: 2025-01-25 15:32:15 CST

The plugin automatically:

  • Uses your callsign's location if no callsign is specified
  • Looks up the specified callsign's location from APRS.fi
  • Determines the correct timezone based on GPS coordinates
  • Returns the formatted local time

If the OpenCage API is unavailable, the plugin will fall back to UTC time.

Contributing

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

License

Distributed under the terms of the [Apache Software License 2.0 license](https://opensource.org/licenses/Apache Software License 2.0), APRSD plugin for Time using OpenCage 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.

About

APRSD plugin for fetching time based on GPS location

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors