Skip to content

UI Receivers Page

OneSeventyFour edited this page May 14, 2026 · 1 revision

UI: Receivers page

The fleet view. Every receiver in the global Receivers table renders as a card with live telemetry. This is where you edit receiver metadata, retry stuck receivers, fetch their config, and start an OTA flash.

📷 Screenshot placeholder: the Receivers page with a fleet of 3-4 receivers in a card grid, varying status colors.

Top strip — fleet health

A compact ShowHealth summary across the top:

  • Online count.
  • Aggregate battery levels.
  • Aggregate success percentage.
  • Any error states.

If a show is staged, the health strip filters to "receivers used by the staged show" and surfaces verification warnings (missing receivers, disabled receivers, insufficient cues — driven by useShowReceiverVerification).

Per-receiver card

Each card shows:

  • Header — receiver ident (e.g. RX146), label, type, online indicator (WiFi-style icon — green / yellow / red based on last contact freshness from lmt).
  • Battery — current battery percent + a small bar.
  • Cues — a 1×N or 2×N grid of cue buttons with continuity colors:
    • Red — cue is in the loaded show but no continuity.
    • Green — cue is in the loaded show and has continuity.
    • Blue — cue has continuity but isn't in the loaded show.
    • Off — neither.
  • Telemetry strip — last latency sample (lat ms), success percent (successPercent), firmware version (fwVersion), board version (boardVersion), board count (numBoards), cues available (cuesAvailable), fire duration (fireDurationMs).
  • Show overlay (only when a show is loaded) — which cues this receiver is responsible for, count of items, etc.

Edit mode

A Lock / Edit toggle on each card. When unlocked:

  • Edit the label.
  • Toggle enabled off (won't be added to the dongle's poll list; saves a poll slot).
  • Set the cues the receiver controls — typically derived from cuesAvailable (the receiver's own report) but you can override with config_data.force_cues_available if you want to lie about it (rare, mostly for testing).
  • For Bilusocn types: set the zone number and cue range.

Save calls updateReceiver (PATCH /api/receivers/[id]) and then reloadReceiversOnDaemon (POST /api/receivers/reload), which causes the daemon to re-read the table and reconcile the dongle's poll list.

Reloading is gated by the daemon — if a show is loaded, the reload is silently refused so a stray edit doesn't trash a loaded show. You'll need to unload before editing.

Retry button

Per-card Retry. POSTs to /api/receivers/[id]/retry, which drops { "type": "retry_receiver", "ident": "<id>" } for the daemon. The daemon re-issues sync <ident> to the dongle, which re-registers the receiver in the poll list. Useful when one receiver is stuck offline but everything else is fine.

Fetch config button

Per-card Fetch config. POSTs to /api/receivers/[id]/rxcfg, which drops { "type": "fetch_receiver_config", "ident": "<id>" }. The daemon sends rxcfg <ident> to the dongle, which queues a RECEIVER_CONFIG_QUERY for the next poll. The receiver replies via ACK payload with its RECEIVER_CONFIG_RESPONSE; the daemon persists the new values to Receivers.fw_version, board_version, cues_available, config_data.

Optionally, you can write a new fire_duration_ms (50–5000 ms range). The daemon includes it in the query and the receiver writes it to its own NVS before responding.

Adding a receiver

The + Add receiver button (top-right) opens a modal with the same fields as edit mode: ident (must match what's flashed into the receiver's NVS), label, type, cue assignments. Type defaults to BKYD_TS_24_1.

For Bilusocn receivers (BILUSOCN_433_TX_ONLY), the form simplifies to zone number + cue range.

OTA flash

The OTA flow doesn't live on this page — it's on Settings → Debug → OTA Flash. From there you pick a target receiver, upload a .bin, and watch progress. See OTA flashing.

What "online" means

A receiver shows online if lmt (last contact time) is within 8 seconds. This threshold is hard-coded as LATENCY_TO_CONSIDER_ONLINE_MS in the protocol handler. It's intentionally generous: we'd rather show "online" for a receiver that's just had a few packet drops than scare the operator with red.

If a receiver goes offline mid-show:

Implementation

  • host/byh_app/backyardhero/src/components/receivers/ReceiverDisplay.jsx — the page itself.
  • host/byh_app/backyardhero/src/store/useAppStore.js — receiver CRUD methods (createReceiver, updateReceiver, deleteReceiver, reloadReceiversOnDaemon, retryReceiver, fetchReceiverConfig).
  • host/byh_app/backyardhero/src/util/useShowReceiverVerification.js — the cross-check between staged show and global receivers.

Clone this wiki locally