Hold Woonsocket's keys from NA; MIDI links moved and fixed on Macs without python; one check per link

- NA's CAMPUS page (99): tap = acknowledge, hold = fix, at the campus shown. NA's settings page
  turns the cell into that campus's key and writes the command into that campus's Companion
  (sp_cmd), exactly as a press on its own deck does. Logged on both sides.
- coremidi.JXA_CONNECT: connect_peer in JavaScript for Automation, used when a Mac has no python
  (no Command Line Tools): a MIDI hold now reconnects Woonsocket's Tracks, FOH and Lights.
- Woonsocket's MIDI links are on wired addresses now (Tracks to Lighting 10.2.2.2, Tracks to FOH
  10.2.1.12; the other ends list Tracks at 10.2.1.219), and the wired-network rule is back on there.
- Auto-setup keeps one check per MIDI link (the end that reports the link's state): two pulled
  links read 4 DOWN before.

Tried live: a hold sent from NA's page 99 reconnected the FOH link at Woonsocket.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 17:00:31 -04:00
co-authored by Claude Opus 5.5
parent 457335bc96
commit b793490d90
5 changed files with 119 additions and 7 deletions
+15
View File
@@ -287,6 +287,21 @@ def items(inv, nets):
if host:
chk["host"] = host
midi_checks.append(("midi:%s|%s|%s" % (host, sname, p["name"]), chk))
# One check per link, not one per end (2026-10-20: two links pulled at Woonsocket read "4 DOWN"):
# keep the end whose Mac says whether the link is live (newer macOS reports a peer's state).
def end_of(host):
return host or "ingest"
def reports_state(host, sname):
return any("state" in p for p in (((inv.get("midi") or {}).get(host) or {}).get(sname) or {}).get("peers") or [])
by_pair = {}
for ident, c in midi_checks:
other = owner.get(c["peer"]) or computer_by_ip(inv, ip_of(c["address"])) or c["peer"]
pair = frozenset((end_of(c.get("host", "")), other))
best = by_pair.get(pair)
if best is None or (reports_state(c.get("host", ""), c["session"]) and not reports_state(best[1].get("host", ""), best[1]["session"])):
by_pair[pair] = (ident, c)
midi_checks = [x for x in midi_checks if x in by_pair.values()]
if midi_checks:
checks = [c for _, c in midi_checks] + [{"type": "midi_wired", "nets": list(nets), "fix": "midi_reconnect"}]
out.append({"ident": "midi_wired", "group": "SHOW", "label": "MIDI", "checks": checks,