Skip to content

feat: import by callsign or qth from ukrepeater.net #92

Description

@pskillen

Problem / outcome

Let operators pull authoritative UK repeater details from ukrepeater.net instead of hand-typing them, in two flows:

  • Flow A — Search & add: search by callsign, locator (Maidenhead), town/QTH, or band; pick from the results; add the selected repeater(s) as channel(s) to the current codeplug (and to the shared reference library once feat: shared reference library of channels/TGs/contacts (outside any one codeplug) #30 ships).
  • Flow B — Verify existing: on an existing channel, a "Check ukrepeater.net" button queries by callsign, shows a diff of remote vs local, and lets the user confirm/apply updates.

Both flows stay in this ticket, delivered in phases (below).

Data source

ETCC/RSGB beta APIhttps://api-beta.rsgb.online — is the single data source for this feature (no CSV-bundle path).

  • Endpoints: /callsign/{call}, /locator/{4-or-6-char}, /band/{band}, /keeper/{call}, /aprs/{call}, /all/systems.
  • Returns JSON { "data": [ … ] }.
  • Responds with Access-Control-Allow-Origin: *, so it is callable directly from the browser SPA — no proxy/server required.
  • Treat as beta / unstable: degrade gracefully on failure, cache responses, attribute the source in the UI, and keep the "not authoritative for emergency operations" disclaimer.

Sample record (GB7DC):

{ "type":"DM","status":"OPERATIONAL","keeperCallsign":"G7NPW","town":"DERBY",
  "modeCodes":["A","D","M:1","F","P","N"],
  "tx":439350000,"rx":430350000,"ctcss":71.9,"txbw":12.5,
  "band":"70CM","locator":"IO92","dbwErp":14,
  "extraDetails":{"ngr":"SK3837","antennaHeight":0,"polarisation":""} }

Two mapping gotchas

  1. tx/rx are repeater-side and inverted vs the radio. Repeater tx (output) = our channel RX frequency; repeater rx (input) = our channel TX frequency.
  2. Mode + colour code live in modeCodes: A=analogue, D=D-STAR, F=Fusion, P=P25, N=NXDN, X=node/packet, and M:<cc> = DMR with colour code <cc>. Timeslot is not in the listing (it is per-talkgroup), so the user fills that in.

Field mapping (import boundary only)

This is an import-boundary concern: mapping lives in a new import source/adapter; the internal Channel model stays vendor/radio-neutral (no profile constants, no caps).

ukrepeater field internal Channel
tx rxFrequency
rx txFrequency
ctcss rxTone / txTone
txbw bandwidthKHz
modeCodes mode (+ colourCode from M:<cc>)
locator location (via src/lib/maidenheadGrid.ts)
repeater (callsign) callsign / name
town, keeperCallsign, status, ngr, dbwErp display / vendorExtras

Architecture

Add a network-backed "remote repeater directory" source — a sibling to the existing file import adapters (src/lib/import/), not a CSV file adapter. Design it generically so other directories (e.g. RepeaterBook) can plug in later, in keeping with the format-agnostic import principle. Snapshot a copy into the codeplug at add-time; live library references are only relevant once #30 lands.

Scope / phasing

  1. Search + add to current codeplug (analogue + DMR).
  2. Verify/refresh existing channel (diff + confirm) — Flow B.
  3. Library target (depends on feat: shared reference library of channels/TGs/contacts (outside any one codeplug) #30).

Open questions

  • Status filtering (e.g. OPERATIONAL vs NOT OPERATIONAL) — include all, or default to operational?
  • Dedupe / identity on re-import and on verify (channel names are case-sensitive FKs).
  • Resilience if the beta API or its CORS policy changes — what is the fallback/failure UX (no CSV path in scope)?
  • How much remote metadata to retain in vendorExtras vs discard.

Relates to

Workflow note

Likely multi-commit work: branch from origin/main, atomic conventional commits per logical change (do not batch into one end-of-plan commit), open a PR linking Closes #92. Pair with the docs/features / progress-tracking skills for the build log.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions