Phin Tech docs Rabbit Ears Manager in the store →

The Manager relay: live feeds fetched once for every screen

Superseded 2026-11-03. The Swift server (StationServer, RelayServer, antenna-tower-server, control-room, the Manager's launchd helper and MCP assistant) was replaced by the Go tower in tower/ (ADR 0005). What follows is history.

Design agreed 2026-09-27. The relay and its first feed, planes, were built the same day; see Built at the end.

Live layers (planes, ships, lightning) come from sources with quotas, keys or one-connection terms. Today each Apple TV and the Mac app fetches for itself, so two TVs halve an OpenSky login's credits, and a source like Blitzortung or AISStream would see a connection per screen. The relay fetches each source once, in the Manager, and every screen in the house reads from it.

Decisions #

  1. A protocol, hosted by the Manager. Relay code talks to a small HTTP protocol, not to the Manager's windows, so the same relay could run on the homelab later without changing the TVs. For now the Manager hosts it: it runs all the time on the Mac mini, so it's effectively always on.
  2. Plain HTTP polling. Screens ask for a feed every few seconds and get JSON from the relay's cache; event feeds take a since cursor and return only what's new. None of the sources update faster than every few seconds, so push would look the same and cost reconnect logic on every screen. Asking counts as watching: there's no subscribe step.
  3. Found two ways. The Manager writes its address into a synced setting (rewritten when the Mac's address changes) and advertises _retrotv-relay._tcp over Bonjour. Screens try the synced address first (instant, and works across mesh Wi-Fi and segmented networks), then Bonjour.
  4. Each feed says how it falls back. A feed with a free, keyless source (planes on anonymous OpenSky) fetches directly from the screen when the relay can't be reached, as today. A feed that needs the relay (a secret key, one shared connection, permission terms: ships, lightning) drops out quietly, and its layer shows as unavailable in the Select menu.
  5. A household token. The Manager makes a random token once and syncs it through iCloud; every request carries it and anything without it is refused. It keeps guests' devices from reading the relay or burning quotas. The data is public, so plain HTTP on the home network is fine.

The protocol #

Version 1, at http://<host>:<port>/v1. Every request sends X-RetroTV-Token; without the right one the answer is 401.

Request Answer
GET /v1/hello The relay's version and its feeds: id, kind, and whether each is running.
GET /v1/feeds/<id>?box=minLat,minLon,maxLat,maxLon A snapshot feed's latest items in the box, with the time they're from. If-None-Match gets a 304 when nothing changed.
GET /v1/feeds/<id>?box=…&since=<cursor> An event feed's items since the cursor (at most the last ten minutes), and the next cursor.

Discovery and the token #

In the code #

The first feeds #

  1. Planes (OpenSky): through the relay with your login; a small box for each area page, so it can refresh every half minute there. Falls back to anonymous access from the screen.
  2. Ships (AISStream, a free key): the relay holds one live connection subscribed to the boxes being watched, and serves ships in a box. Relay only.
  3. Lightning (Blitzortung, if they agree): one connection, strikes as events. Relay only.

Built (2026-09-27) #

Status and clients (2026-09-28) #

One relay, chosen (2026-09-28) #