ALARMS and AUTO-FIX as two keys; LIGHTS at Southcoast hands the lights to an operator

- kind autofix: its own switch on the auto-fix hours; ALARMS then only silences (NA keeps the old
  combined key until it has room for one)
- kind bypass: hold takes every network MIDI link to a peer out (here and on listed Macs), checks stop
  calling it lost, re-taken every 10 s; hold again puts back exactly what was taken plus every watched link
- a MIDI peer with no address is never called (it connected SC Tracks to itself)
- holds from NA's CAMPUS page flip switch keys; a rebuild keeps them; new campuses get AUTO-FIX
- key kind changes restart the watchdog; settings page has separate alarm / auto-fix buttons
- WS and SC configs: AUTO-FIX at 3,1; SC LIGHTS at 1,3; NA config synced from live

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-21 13:33:48 -04:00
co-authored by Claude Opus 5.5
parent 2f8e3d47a3
commit d0c755824b
15 changed files with 605 additions and 44 deletions
+19 -3
View File
@@ -198,9 +198,25 @@ def button(tid, tile, cfg):
press, hold = "service toggle", None
sw = cfg.get("service_windows") or []
always = len(sw) == 1 and set(sw[0].get("days", [])) == set(DAYS) and sw[0].get("start") == "00:00" and sw[0].get("end") in ("23:59", "00:00")
note = ("Press: silence the alarms AND stop every auto-fix; press again to turn both back on. They come back by "
"themselves %s. Holds still fix. The stream-audio failover still switches by itself on Sundays."
% ("at midnight" if always else "when the alarm schedule next starts or ends"))
if any(t.get("kind") == "autofix" for t in cfg.get("tiles", [])):
note = ("Press: silence the alarms; press again to turn them back on. They come back by themselves %s. "
"Auto-fix is the AUTO-FIX key." % ("at midnight" if always else "when the alarm schedule next starts or ends"))
else:
note = ("Press: silence the alarms AND stop every auto-fix; press again to turn both back on. They come back by "
"themselves %s. Holds still fix. The stream-audio failover still switches by itself on Sundays."
% ("at midnight" if always else "when the alarm schedule next starts or ends"))
elif kind == "autofix":
stale_text = "'%s\\n?'" % label
press, hold = "autofix toggle", None
note = ("Press: pause auto-fix (alarms stay on); press again to turn it back on - or on outside its hours. It goes "
"back to its hours by itself when they next start or end. Holds always fix.")
elif kind == "bypass":
stale_text = "'%s\\n?'" % label
press, hold = "ack " + tid, "restart " + tid
b = tile.get("bypass") or {}
note = ("Hold %s s: hand %s to an operator - its MIDI links (%s) are taken out%s and the panel stops putting them "
"back. Hold again: everything is put back." % (secs, label, ", ".join(b.get("peers") or []),
" and Companion's %s switched off" % ", ".join(b["conns"]) if b.get("conns") else ""))
else:
stale_text = "'%s\\n?'" % label
press = "ack " + tid