Module pistar

Module pistar 

Source
Expand description

Pi-Star JSON host file fetcher.

Fetches the canonical D-STAR reflector host list from http://www.pistar.uk/downloads/DStar_Hosts.json and upserts each reflector into the reflectors Postgres table.

The Pi-Star host file is the most comprehensive public registry of D-STAR reflectors, maintained by the Pi-Star project. It maps reflector callsigns to IP addresses and categorises them by protocol type (REF/XRF/DCS).

Poll interval: daily (default 86 400 s). The host file changes rarely β€” new reflectors appear at most a few times per month.

StructsΒ§

PiStarReflector πŸ”’
A single reflector entry from the Pi-Star host file.
PiStarResponse πŸ”’
Top-level JSON envelope returned by the Pi-Star host endpoint.

ConstantsΒ§

PISTAR_URL πŸ”’
Pi-Star host file download URL.

FunctionsΒ§

fetch_and_store πŸ”’
Fetches the Pi-Star host file and upserts all reflectors into Postgres.
map_protocol πŸ”’
Maps Pi-Star’s protocol type labels to the internal protocol identifiers used in the reflectors table.