Resi cue countdowns on ProPresenter and in Companion

The Resi -> ProPresenter bridge, its installer and site kit, and the
Companion module resi-studio-cues, as running at North Attleboro.

Bridge (resi_to_propresenter.py)
- Follows a Resi decoder's playhead and keeps ProPresenter's NextCue timer
  counting down to the next cue; optional cue name as a stage message, sent
  once per cue (ProPresenter flashes it on every send) and off by default.
- Playhead estimate no longer learns a cadence from the partial first gap
  after a start, so a 30s Resi doesn't read as paused half the time.
- Backs off on 429, holds 2 min before retrying a failed startup login, and
  logs Resi's actual reason (wrong password, USER_LOCKED, rate limit).
- --setup asks for the login, decoder, ProPresenter and timer.

install_bridge.sh installs it as a login service (outside ~/Documents,
which launchd may not read); make_kit.sh builds the kit for another site.

Companion module resi-studio-cues 0.1.4 (source/, package committed)
- Same playhead fix; login and request hold-off (15s doubling to 5 min);
  a 401/403 on a fresh session is a permission, not a reason to sign in
  again; init never fails on a Resi problem, so Companion can't restart it
  into a login loop.

Tests: test_playhead.py, test_stage_message.py, test_rate_limit.py and
source/backoff_test.js run offline; test_end_to_end.py drives a real
ProPresenter and refuses to run without an explicit flag.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-06 18:11:01 -04:00
co-authored by Claude Opus 5.5
commit 1a658875bc
24 changed files with 4548 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UpdateVariableDefinitions = UpdateVariableDefinitions;
function UpdateVariableDefinitions(instance) {
const vars = [
{ variableId: 'org_name', name: 'Organization name' },
{ variableId: 'first_name', name: 'First name' },
{ variableId: 'last_name', name: 'Last name' },
{ variableId: 'email', name: 'Email' },
{ variableId: 'auth_status', name: 'Auth status' },
{ variableId: 'last_error', name: 'Last error' },
{ variableId: 'last_poll', name: 'Last poll (local time)' },
{ variableId: 'current_position', name: 'Current position (HH:MM:SS.ms)' },
{ variableId: 'playback_state', name: 'Playback state (PLAYING/PAUSED)' },
{ variableId: 'position_update_interval_sec', name: 'Seconds between Resi position updates' },
{ variableId: 'player_fields', name: 'Fields Resi returns for this decoder (diagnostic)' },
{ variableId: 'current_position_sec', name: 'Current position (seconds)' },
{ variableId: 'current_event_id', name: 'Current event id (live from player)' },
{ variableId: 'cue_count', name: 'Cue count' },
{ variableId: 'cue_names', name: 'Cue names (comma separated)' },
{ variableId: 'event_id', name: 'Current event id (cues loaded for)' },
{ variableId: 'next_cue_name', name: 'Next cue name' },
{ variableId: 'next_cue_time_in_seconds', name: 'Seconds until next cue' },
{ variableId: 'next_cue_position', name: 'Next cue position (HH:MM:SS.ms)' },
{ variableId: 'next_cue_tod', name: 'Next cue time-of-day (24 hour)' },
{ variableId: 'prev_cue_name', name: 'Previous cue name' },
{ variableId: 'prev_cue_time_ago_in_seconds', name: 'Seconds since previous cue' },
{ variableId: 'prev_cue_position', name: 'Previous cue position (HH:MM:SS.ms)' },
{ variableId: 'prev_cue_tod', name: 'Previous cue time-of-day (24 hour)' },
{ variableId: 'next_cue_time_in_hms', name: 'Time until next cue (HH:MM:SS)' },
{ variableId: 'prev_cue_time_ago_in_hms', name: 'Time since previous cue (HH:MM:SS)' },
{ variableId: 'lookup_cue_query', name: 'Lookup cue query (name)' },
{ variableId: 'lookup_cue_found', name: 'Lookup cue found (true/false)' },
{ variableId: 'lookup_cue_name', name: 'Lookup cue name (matched)' },
{ variableId: 'lookup_cue_uuid', name: 'Lookup cue uuid' },
{ variableId: 'lookup_cue_position', name: 'Lookup cue position (HH:MM:SS.ms)' },
{ variableId: 'lookup_cue_position_sec', name: 'Lookup cue position (seconds)' },
{ variableId: 'lookup_cue_tod', name: 'Lookup cue time-of-day' },
{ variableId: 'playback_last_change_epoch_ms', name: 'Playback last position change (epoch ms)' },
];
instance.setVariableDefinitions(vars);
}
//# sourceMappingURL=variables.js.map