Files
id5100/.claude/handoffs/2026-06-14-163000-repeaterbook-integration.md

4.1 KiB
Raw Permalink Blame History

Handoff: RepeaterBook integration for the ID-5100 web panel

Session Metadata

  • Created: 2026-06-14 ~16:30
  • Project: /home/claude/bin/id5100
  • Branch: master (repo NOW under git + pushed to git.sethpc.xyz/Seth/id5100)
  • Continues from: 2026-06-14-144031-id5100-civ-control-suite.md

Current State — DONE, verified on live hardware, pushed

Added a "Repeaters" feature to the existing ID-5100 panel: a RepeaterBook CSV is ingested into a local repeaters.json, the panel shows a proximity-ordered, searchable list, and tapping a row tunes the radio (freq + duplex direction + CTCSS tone) over CI-V with per-step status. Built brainstorm → spec → plan → subagent-driven execution → final review → hardening. 27 unit tests pass; full tune_repeater ACKed on the rig.

What shipped (8 commits, baseline 03000705d48ad0)

  • civ.py — added CTCSS tone BCD codec + duplex/tone command constants. (Offset codec was added then REMOVED after live verification — see below.)
  • repeaters.py (new) — normalize_csv, load, search (rank-ordered), ingest_csv + __main__. Pure stdlib. test_repeaters.py (13 tests).
  • repeaters.json (generated) — 1073 records from repeaterbook/RB_2606141409.csv.
  • radio.pyset_duplex/get_duplex/set_tone/get_tone/set_tone_on/tune_repeater.
  • server.pyGET /api/repeaters?q=&limit=, POST /api/tune-repeater (per-step result).
  • panel.html — "Repeaters · nearest first" card (search + list + per-step ✓/✗).
  • README.md + DECISIONS.md updated; docs/screenshots/repeaters-panel.png (verified UI).
  • Spec: docs/superpowers/specs/2026-06-14-repeaterbook-integration-design.md (+ post-CSV revision note). Plan: docs/superpowers/plans/2026-06-14-repeaterbook-integration.md.

CRITICAL live-CI-V findings (2026-06-14, verified on the rig)

  • Duplex direction 0x0F works (read → 0x10 simplex). 0x10 simplex / 0x11 DUP / 0x12 DUP+.
  • Repeater tone 0x1B/0x00 works; wire field is 3 bytes: a 0x00 pad + 2-byte BCD (00 08 85 = 88.5 Hz). radio.py adds the pad on set, strips it on get (data[2:]).
  • Tone on/off 0x16/0x42 works.
  • Offset amount 0x0D is REJECTED (NG) — not supported on the ID-5100. The radio applies its own configured auto-offset (0.6/5 MHz) when a duplex direction is set, so standard repeaters work from duplex alone. Offset codec/methods were removed (honest YAGNI).
  • A full tune_repeater to W4CIA (147.210, DUP+, 110.9 Hz) returned all steps True, then state was restored to 146.520 simplex.

Active processes / environment

  • server.py --port 8550 is RUNNING (background, nohup, log .server.log) at http://192.168.0.141:8550/ — the new prod panel with all features. Holds /dev/ttyUSB0. Stop by PID (pgrep -f "server.py --port 8550" then kill); do NOT pkill -f "server.py --port 8550" — that string self-matches your own shell and kills it (hit this twice this session).
  • Radio on /dev/ttyUSB0, 9600 baud, addr 0x8C. Stop the server before any cli/probe (one owner).

Data refresh workflow (CSV-only)

RepeaterBook's API is now token-gated (401 auth_missing; manual app-token approval — request text is in the spec). We went CSV-only: drop a new export into repeaterbook/ and run python3 repeaters.py ingest repeaterbook/<file>.csv repeaters.json. The export has no lat/long but is proximity-sorted, so file order = rank.

Possible next steps (all optional)

  • systemd user unit for server.py (still a bare background process; survives until reboot only).
  • Vendor web fonts locally (panel still pulls DSEG7/Google Fonts from CDNs).
  • If hands-off data refresh is ever wanted: request the RepeaterBook app token and revive the deferred API client + timer (design spec has the form text).
  • DV call-routing (URCALL/RPT1/RPT2) remains out of scope (RS-MS1A data-jack protocol).

Known limitations (by design)

  • Tune is not atomic (per-step status shows what landed).
  • DV/D-STAR rows tune freq/direction only; call routing set on the head.
  • Offset amount comes from radio config, not RepeaterBook (CI-V can't set it on this radio).