APRS API in Python.
Go to file
2023-04-14 22:06:48 -05:00
.gitignore Add .gitignore. 2023-04-06 20:46:10 -05:00
api_app.py Stub out a KISS connection. 2023-04-13 17:16:16 -05:00
api_waitress.py Set up to run waitress in screen if needed. 2023-04-11 20:52:59 -05:00
config.ini Store frames in database, remove frames older than chosen age. 2023-04-14 22:06:48 -05:00
init_db.py Snapshot. 2023-04-13 20:46:28 -05:00
kiss_and_db.py Snapshot. 2023-04-13 20:46:28 -05:00
README.md Update readme. 2023-04-11 20:55:58 -05:00
requirements.txt Stub out a KISS connection. 2023-04-13 17:16:16 -05:00
schema.sql Store frames in database, remove frames older than chosen age. 2023-04-14 22:06:48 -05:00
start-aprs_api.sh Set up to run waitress in screen if needed. 2023-04-11 20:52:59 -05:00
tcp_kiss_send_recv.py Store frames in database, remove frames older than chosen age. 2023-04-14 22:06:48 -05:00

README

I got tired of APRS-IS websites not showing me all the paths that packets take, only the shortest path to IS. So this is a Python 3 tool that turns direwolf logs into a REST API in JSON format.

Setup

  1. Run direwolf with logging to CSV on by using -l. (-L not yet implemented).
  2. Install requirements using pip install -r requirements.txt.
  3. Run app.py with either a Python call or a real WSGI server. You can use screen to detach the session.
    • Default URL is http://127.0.0.1:5000
    • Example waitress and screen scripts are included, see
      • api_waitress.py and
      • start-aprs_api.sh
  4. Access the API from whatever other system you want.

Endpoints:

-/packets - gives the most recent packets, with the fields from the Dire Wolf User Guide.

Example of an object packet sent by W1CDN-1 and digipeated by K0UND-2:

{
            "chan": 0,
            "utime": 1680566406,
            "isotime": "2023-04-04T00:00:06Z",
            "source": "W1CDN-1",
            "heard": "K0UND-2",
            "level": "113(71/42)",
            "error": 0,
            "dti": ";",
            "name": "147.390GF",
            "symbol": "/r",
            "latitude": 47.924167,
            "longitude": -97.009667,
            "speed": 0.0,
            "course": 0.0,
            "altitude": 0.0,
            "frequency": 147.39,
            "offset": 600.0,
            "tone": 0.0,
            "system": "DireWolf, WB2OSZ",
            "status": 0,
            "telemetry": 0.0,
            "comment": " https://www.wa0jxt.org/"
        },

Contributing

If you want to contribute, please get in touch with me on Mastodon at https://mastodon.radio/@W1CDN.