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
+13
View File
@@ -570,6 +570,19 @@ def keep_from(new, old):
cfg = copy.deepcopy(new)
have = referenced(cfg)
kept = []
# Switch keys made for this campus by hand (Southcoast's LIGHTS) and an AUTO-FIX key: auto-setup makes neither.
for t in old.get("tiles", []):
if t.get("kind") not in ("bypass", "autofix") or t["id"] in {x["id"] for x in cfg["tiles"]}:
continue
if t["kind"] == "autofix" and any(x.get("kind") == "autofix" for x in cfg["tiles"]):
continue
used = {tuple(x["pos"]) for x in cfg["tiles"] if x.get("pos")} | (
{tuple(cfg["restart_page"]["jump_pos"])} if cfg.get("restart_page") else set())
if t.get("pos") and tuple(t["pos"]) not in used:
cfg["tiles"].append(copy.deepcopy(t))
else:
place_new(cfg, {k: v for k, v in copy.deepcopy(t).items() if k != "pos"})
kept.append(t["label"])
# Computers in the old setup that did not answer this time, and the keys that check them.
gone = {a: h for a, h in (old.get("hosts") or {}).items() if not h.get("self") and a not in cfg["hosts"]}
for alias, h in gone.items():