diff --git a/README.md b/README.md index 0a9d777..1a4f65b 100644 --- a/README.md +++ b/README.md @@ -89,14 +89,14 @@ The stream's audio comes in on the Dante device STUDIO-A-Resi-AJA-SDI, channels - **When:** inside the `"failover"` windows (Sunday 06:30–13:30 today), even while ALARMS is muted. Once per fault: it re-arms once the fault has been clear for 10 s (a check that cannot ask, say an SSH hiccup, does not count as clear). - **How fast:** about 5–6 s from a crash to the press (2–3 s to notice, 1 s debounce, 2 s `after_seconds`). A vanished Dante device takes as long as Companion's Dante module needs to notice it. - **Unlike auto-fix:** it does not wait 20 s, does not stop for a network blip, and is not limited to 2 tries per 10 minutes. The one guard: when several Dante devices vanish at once (that is NA Ingest's view of Dante, not Studio B) it holds back, like auto-fix. -- **What the keys show:** AUDIO (and the hidden STB AUDIO) carry an extra line **ON FOH BACKUP** while the fault lasts and for 15 minutes after (`note_seconds`), or until STREAM STB is held. Hold AUDIO right after and it says JUST TRIED. +- **What the keys show:** AUDIO (and the hidden STB AUDIO) carry an extra line **ON FOH BACKUP** while the fault lasts and for 15 minutes after (`note_seconds`). Hold AUDIO right after and it says JUST TRIED. - **Log and alert:** every press goes to the daily auto-fix log as `FAILOVER:` lines, to the watchdog log, and to `alert_webhook` if set. -- **Switching back is yours.** It never switches back by itself: when Studio B is up again, hold **STREAM STB** on the Restart page for 2 s (the fix's `"undo"`). That presses Studio B on the Audio page and clears ON FOH BACKUP. +- **Switching back is yours.** It never switches back by itself: when Studio B is up again, press **Studio B** on Companion's Studio B page (page 7) or Audio page (page 4). The alert names that button (the fix's `"undo"`). - **Never:** a press outside the window, a second press for the same fault, or a press back to Studio B. In `config.json`: the `"failover"` block (`windows`, `after_seconds` 2, `note_seconds` 900); `"failover": true` and `"undo"` on the fix (`stream_foh_backup` undoes with `stream_studio_b`); `"interval_seconds"` on ping checks (default 3) and remote checks (default 10). The remote poll runs each computer's checks in its own thread, so a dead Studio B never delays the checks on another Mac. -**Another fallback button:** any Companion button can be a fix. On the settings page, Keys › Fixes › + Fix › "Press a Companion button" (page, row, column and what the button says), tick failover under more and pick its undo; Settings › Auto-fix › Failover calendar holds the window and `after_seconds`; Keys › + Key / + check… adds the checks that call it (a ping with interval seconds and failures, a program on a Mac, a Dante device) with fix = the press; Keys › Restart page › + Restart key adds the keys that press it by hand. The Help page "How do I add…" has an entry "A fallback button". +**Another fallback button:** any Companion button can be a fix. On the settings page, Keys › Fixes › + Fix › "Press a Companion button" (page, row, column and what the button says), tick failover under more and pick its undo; **Settings › Auto switch** has it all on one screen: which buttons switch by themselves (tick, page/row/column, the button to switch back with, Press it now), the hours (calendar), `after_seconds` and `note_seconds`, and what counts as down (how often each check looks, how many misses, how long a fault must last). Keys › + Key / + check… adds more checks that call it (a ping, a program on a Mac, a Dante device) with fix = the press. The Help page "How do I add…" has an entry "A fallback button". ## Restart page (page 20) @@ -112,8 +112,6 @@ Tap **RESTART PAGE** on the status page (row 2). Each key restarts one thing **e | PRODDASH / CAPTIONS / BRIDGE | that service on NA Ingest | | TASCAM | reconnects Companion to the recorder (see TASCAM above) | | SPOTIFY | plays the Christian EDM 2026 playlist on NA Ingest (opens Spotify first if it is closed) | -| STREAM STB | presses Studio B on Companion's Audio page: the stream audio back on Studio B (how you switch back after a failover, see Audio failover) | -| STREAM FOH | presses FOH Backup on Companion's Audio page: the stream audio from the FOH console. Flashes HOLD TO FIX while Studio B is down; once the failover has pressed it, it shows ON FOH BACKUP (green) instead. | A pressing key says PRESSING, then DONE; a press that finds no button there says NO BUTTON THERE. diff --git a/config.json b/config.json index f68c079..6615fbc 100644 --- a/config.json +++ b/config.json @@ -1049,24 +1049,6 @@ "watch": [ "conn:tascam" ] - }, - { - "id": "rs_stream_stb", - "label": "STREAM STB", - "pos": [ - 3, - 2 - ], - "fix": "stream_studio_b" - }, - { - "id": "rs_stream_foh", - "label": "STREAM FOH", - "pos": [ - 3, - 3 - ], - "fix": "stream_foh_backup" } ] }, diff --git a/restart-page.companionconfig b/restart-page.companionconfig index 7c45132..1458889 100644 Binary files a/restart-page.companionconfig and b/restart-page.companionconfig differ diff --git a/schema.py b/schema.py index 2a56dde..8cb99a5 100644 --- a/schema.py +++ b/schema.py @@ -113,6 +113,8 @@ field("auto_fix.windows[].start", "hhmm", None, "", "Schedules", required=True) field("auto_fix.windows[].end", "hhmm", None, "", "Schedules", required=True) field("auto_fix.while_muted", "list", [], "Auto-fixes that keep running inside the window even while ALARMS is " "muted (harmless ones, like playing the Spotify playlist).", "Schedules") +field("auto_fix.disabled", "bool", False, "Auto-fix switched off as a whole: nothing is fixed by itself (holds " + "still work).", "Schedules") field("auto_fix.after_seconds", "int", 20, "A fault must last this long before auto-fix acts.", "Schedules", advanced=True, lo=5, hi=600) field("auto_fix.max_tries", "int", 2, "Tries per fault, then it is yours to hold.", "Schedules", advanced=True, @@ -130,6 +132,8 @@ field("auto_fix.keep_months", "int", 1, "Daily log files are deleted after this advanced=True, lo=1, hi=12) field("failover", "dict", {}, "Automatic fallback: when a fix marked failover may act (it acts even while ALARMS is " "muted).", "Schedules") +field("failover.disabled", "bool", False, "The auto switch switched off as a whole: nothing is pressed by itself.", + "Schedules") field("failover.windows", "list", [{"days": ["sun"], "start": "06:30", "end": "13:30"}], "When a failover may switch " "by itself.", "Schedules") field("failover.windows[].days", "days", None, "", "Schedules", required=True) @@ -184,6 +188,8 @@ field("hosts.*.ssh", "str", None, "How this Mac logs in: user@address.", "Comput field("hosts.*.mac", "mac", None, "The PC's hardware address, to wake it when it is off.", "Computers") field("hosts.*.wake_broadcast", "ip", None, "The broadcast address the wake-up goes to.", "Computers", advanced=True) field("hosts.*.name", "str", None, "The computer, as people say it.", "Computers", apply="none") +field("hosts.*.disabled", "bool", False, "Switched off: kept, but nothing logs in to it - its checks and fixes are " + "skipped (a computer that is away or being rebuilt).", "Computers") field("hosts.*.os", "enum", "mac", "Mac or Windows (a PC's checks are written for cmd.exe).", "Computers", options=["mac", "windows", "other"]) field("hosts.*.role", "str", None, "What it is for.", "Computers", apply="none") @@ -229,6 +235,8 @@ field("fixes.*.mac", "mac", None, "The device expected on that port.", "Fixes") field("fixes.*.playlist", "str", None, "A playlist other than the site's (rare).", "Fixes", advanced=True) field("fixes.*.template", "str", None, "The builder this fix was made with.", "Fixes", advanced=True, apply="none") field("fixes.*.params", "dict", None, "The builder's fields.", "Fixes", advanced=True, apply="none") +field("fixes.*.disabled", "bool", False, "Switched off: kept, but never runs (a hold says TURNED OFF; auto-fix " + "and the auto switch skip it).", "Fixes") field("fixes.*.action", "enum", None, "What a READY page fix does.", "Fixes", options=list(sp.READY_ACTIONS)) field("fixes.*.page", "int", None, "The Companion page the button is on.", "Fixes", lo=1) field("fixes.*.row", "int", None, "The button's row on that page (the top row is 0).", "Fixes", lo=0) @@ -250,6 +258,10 @@ field("tiles[].kind", "enum", None, "A special key: master (ALL), service (ALARM options=["master", "service", "network", "ready"], apply="pages") field("tiles[].members", "list", None, "A group: the keys it sums up.", "Keys") field("tiles[].checks", "list", [], "What the key watches.", "Keys") +field("tiles[].disabled", "bool", False, "Switched off: the key stays on the page (grey, OFF) but checks nothing " + "and fixes nothing, like a connection switched off in Companion.", "Keys") +field("tiles[].checks[].devices_off", "list", [], "Dante devices switched off: kept in the list, not watched.", "Keys") +field("tiles[].checks[].disabled", "bool", False, "Switched off: this check is kept but not looked at.", "Keys") field("tiles[].hold_always", "str", None, "A fix a hold runs even when the key is green.", "Keys", apply="pages") field("tiles[].checks[].type", "enum", None, "What kind of check.", "Keys", required=True) field("tiles[].checks[].conn", "str", None, "The Companion connection.", "Keys") @@ -316,6 +328,8 @@ field("restart_page.keys[].id", "id", None, "", "Keys", advanced=True, required= field("restart_page.keys[].label", "str", None, "", "Keys", required=True, apply="pages") field("restart_page.keys[].pos", "list", None, "[row, column].", "Keys", required=True, apply="pages") field("restart_page.keys[].fix", "str", None, "What holding it runs.", "Keys", required=True) +field("restart_page.keys[].disabled", "bool", False, "Switched off: the key stays on the page (OFF) but a hold does " + "nothing.", "Keys", apply="pages") field("restart_page.keys[].watch", "list", [], "Keep flashing HOLD TO FIX while these fixes' checks or " "'conn: