Back Link copied!

LoRa APRS API Documentation

This document provides detailed information on using the LoRa APRS API to retrieve ingested data.

Base URL

https://lora.link9.net/api/

Authentication

The API is unauthenticated.

Authorisation

Some end points employ authorisation.

End Points

Retrieve Messages

/messages is a generic multipurpose endpoint for retrieving messages, allowing for filtering on parameters.

HTTP Method

GET

Request Parameters

If no parameters are provided it will return all most recent records.

ParameterDescription
source_ipFilter records by source IP address of the iGate. Use the special value me to restrict to your current public IP address.
rx_callsignFilter records by the receiver (iGate) callsign.
tx_callsignFilter records by the transmitter (Tracker) callsign.
start_timeStart of the date range for received_at.
end_timeEnd of the date range for received_at.
pagePage number for pagination.
limitNumber of records per page.
rawReturn the raw message contents. Default is False.

Special Parameters

Additional parameters are available when specified with a comparison operator.

ParameterDescription
distanceDistance between iGate and Tracker.
signal_strengthSignal Strength in dBm.
signal_qualitySignal Quality (SNR) in dB.
ParameterValues
distance_oplt, gt, eq
signal_strength_oplt, gt, eq
signal_quality_oplt, gt, eq

Limits

The endpoint has the following limits.

TypeLimitDefault
Total Records10001000
Records per Page10010

Response Format

The response will be in JSON format, including an array of messages and pagination details.

Example Request

Get raw syslog messages for current public IP address.

curl "https://lora.link9.net/api/messages?source_ip=me&raw=true"

Example Response

{
  "page": 1,
  "limit": 10,
  "total_records": 8,
  "total_pages": 1,
  "raw_messages": [
  "<165>1 - MM3NDH-10 CA2RXU_LoRa_iGate_1.3 - - - Tx \/ MM3NDH-10>APLRG1,WIDE1-1:!L206OM[e?a xGLoRa APRS 439.9125 MHz",
  "Additional records..."
  ]
}

Example Request

Get the first page of records for iGate MM3NDH-10 with 10 records per page.

curl "https://lora.link9.net/api/messages?rx_callsign=MM3NDH-10&page=1&limit=10"

Example Response

{
  "page": 1,
  "limit": 10,
  "total_records": 320,
  "total_pages": 32,
  "results": [
    {
      "received_at": "2023-09-12 14:22:35",
      "rx_callsign": "MM3NDH-10",
      "tx_callsign": "MM3NDH-11",
      "signal_strength": "-120",
      "signal_quality": "6",
      "distance": "25",
      "latitude": "40.7128",
      "longitude": "-74.0060",
      "path": "WIDE1-1",
      "destination": "APLRT1"
    },
    {
      // Additional records...
    }
  ]
}

Home Assistant

You can add an entity to Home Assistant as a REST sensor and show it on a Map and Entities Card.

Note: Also check the GeoJSON endpoint in the Help section.

Example Sensor Configuration

- platform: rest
  name: mm3ndh_11_lora_location
  resource: 'https://lora.link9.net/api/messages?tx_callsign=MM3NDH-11&limit=1'
  scan_interval: 60
  value_template: "{{ value_json.value }}"
  json_attributes_path: $.results[0]
  json_attributes:
    - distance
    - rx_callsign
    - signal_quality
    - signal_strength
    - latitude
    - longitude

Example Map Card

type: map
entities:
  - entity: sensor.mm3ndh_11_lora_location
    name: MM3NDH-11
theme_mode: auto
hours_to_show: 24
title: LoRa APRS

Example Entities Card

type: entities
entities:
  - type: attribute
    entity: sensor.mm3ndh_11_lora_location
    attribute: signal_strength
    name: Signal Strength
    suffix: dBm
  - type: attribute
    entity: sensor.mm3ndh_11_lora_location
    attribute: signal_quality
    name: Signal Quality
    suffix: dB
  - type: attribute
    entity: sensor.mm3ndh_11_lora_location
    attribute: distance
    name: Distance
    suffix: km
  - type: attribute
    entity: sensor.mm3ndh_11_lora_location
    attribute: rx_callsign
    name: iGate
    secondary_info: last-updated