Every campus matches NA, tailored: Restart page, Companion-Mac programs, NA's auto-fix hours, nightly backups, restart from NA

- Auto-setup: programs on the Companion Mac itself (ProPresenter at Woonsocket) get a local process
  check and local start/restart fixes; every campus gets a Restart page (keys arrive as computers
  join); NA's auto-fix hours (Tue, Wed, Sun); a program found after its Companion connection joins
  that key instead of making a second one. settings.campus rebuild remakes a campus from what is
  found now, keeping its name, PIN and pages; upgrade-companion brings Companion to 5.0.7 from NA's
  copy (/campus/companion.zip), as Woonsocket was; setup stops with that advice on an older one.
- NA's CAMPUSES page has a RESTART key per campus; the CAMPUS page shows that campus's Restart page
  and a hold there restarts it at that campus.
- Backups: backup/backup-campuses.sh, nightly 04:30 on NA (installed everywhere, acts on the hub),
  into Drive > Waters Creative > Apps > Status Panel Backups/<campus>, 30 kept, alert email via the
  checklist's alert.js. Campuses report the account to back up with. sites/ws/config.json in the repo.
- Woonsocket rebuilt: 9 keys (PROP with ProPresenter on its Mac), Restart page 20 (SUPERRACK, VISTA,
  ABLETON, PROP), auto-fix on NA's hours; all OK. Both campuses backed up to Drive by the job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 17:17:04 -04:00
co-authored by Claude Opus 5.5
parent b793490d90
commit 6d1cfea2f7
10 changed files with 985 additions and 29 deletions
+581
View File
@@ -0,0 +1,581 @@
{
"site": {
"id": "ws",
"name": "Woonsocket",
"ingest_name": "WS ProPresenter",
"ingest_hostname": "WS-ProPresenter-3.local",
"ingest_ips": [
"10.2.2.210",
"169.254.104.16"
],
"contacts": "",
"live_services": [],
"editing_code": "9248"
},
"companion": {
"host": "127.0.0.1",
"port": 8000
},
"page": 19,
"page_name": "19\\nStatus",
"page_hold_ms": 2000,
"variables": {
"state": "sp_state",
"heartbeat": "sp_hb",
"command": "sp_cmd"
},
"timing": {
"fix_cooldown_seconds": 60,
"alert_after_seconds": 30
},
"auto_fix": {
"after_seconds": 20,
"max_tries": 2,
"retry_seconds": 90,
"pause_after_network_seconds": 60,
"restart_connections": true,
"windows": [
{
"days": [
"tue"
],
"start": "14:00",
"end": "22:00"
},
{
"days": [
"wed"
],
"start": "09:00",
"end": "21:00"
},
{
"days": [
"sun"
],
"start": "05:00",
"end": "14:00"
}
],
"fixes": [
"superrack_ws_foh",
"x32edit_ws_foh",
"vista_ws_lights",
"ableton_ws_tracks",
"propresenter_ingest",
"midi_reconnect"
]
},
"tiles": [
{
"id": "all",
"label": "ALL",
"pos": [
0,
1
],
"kind": "master"
},
{
"id": "service",
"label": "ALARMS",
"pos": [
3,
0
],
"kind": "service"
},
{
"id": "net",
"label": "NET",
"pos": [
3,
7
],
"kind": "network"
},
{
"id": "superrack",
"label": "SUPERRACK",
"checks": [
{
"type": "remote",
"template": "mac_program",
"params": {
"host": "ws_foh",
"process": "SuperRack SoundGrid"
},
"msg": "SUPERRACK NOT RUNNING",
"fix": "superrack_ws_foh",
"host": "ws_foh",
"cmd": "pgrep -xq 'SuperRack SoundGrid'"
},
{
"type": "remote",
"template": "soundgrid",
"params": {
"host": "ws_foh"
},
"msg": "SOUNDGRID LOST",
"host": "ws_foh",
"cmd": "lsof -nP -iTCP -sTCP:ESTABLISHED -a -c SuperRack 2>/dev/null | grep -q ':19000 (ESTABLISHED)'"
}
],
"pos": [
0,
2
]
},
{
"id": "x32_edit",
"label": "X32 EDIT",
"checks": [
{
"type": "remote",
"template": "mac_program",
"params": {
"host": "ws_foh",
"process": "X32-Edit"
},
"msg": "X32 EDIT NOT RUNNING",
"fix": "x32edit_ws_foh",
"host": "ws_foh",
"cmd": "pgrep -xq X32-Edit"
}
],
"pos": [
0,
3
]
},
{
"id": "m32",
"label": "M32",
"checks": [
{
"type": "conn",
"conn": "m32"
}
],
"pos": [
0,
4
]
},
{
"id": "vista",
"label": "VISTA",
"checks": [
{
"type": "remote",
"template": "mac_program",
"params": {
"host": "ws_lights",
"process": "Vista"
},
"msg": "VISTA NOT RUNNING",
"fix": "vista_ws_lights",
"host": "ws_lights",
"cmd": "pgrep -xq Vista"
}
],
"pos": [
0,
5
]
},
{
"id": "ableton",
"label": "ABLETON",
"checks": [
{
"type": "remote",
"template": "mac_program",
"params": {
"host": "ws_tracks",
"process": "Live"
},
"msg": "ABLETON NOT RUNNING",
"fix": "ableton_ws_tracks",
"host": "ws_tracks",
"cmd": "pgrep -xq Live"
}
],
"pos": [
0,
6
]
},
{
"id": "prop",
"label": "PROP",
"checks": [
{
"type": "conn",
"conn": "Propresenter-API"
},
{
"type": "process",
"match": "/Applications/ProPresenter.app/Contents/MacOS/ProPresenter",
"name": "PROP",
"fix": "propresenter_ingest"
}
],
"pos": [
0,
7
]
},
{
"id": "midi",
"label": "MIDI",
"checks": [
{
"type": "midi_peer",
"session": "WS FOH Mac mini",
"peer": "WS Tracks",
"address": "10.2.1.219:5004",
"fix": "midi_reconnect",
"tag": "WS TRACKS",
"host": "ws_foh"
},
{
"type": "midi_peer",
"session": "Lighting",
"peer": "WS Tracks",
"address": "10.2.1.219:5004",
"fix": "midi_reconnect",
"tag": "WS TRACKS",
"host": "ws_lights"
},
{
"type": "midi_wired",
"nets": [
"10.2.0.0/16"
],
"fix": "midi_reconnect"
}
],
"pos": [
1,
1
]
},
{
"id": "atem",
"label": "ATEM",
"checks": [
{
"type": "conn",
"conn": "ATEM"
}
],
"pos": [
1,
2
]
},
{
"id": "resi",
"label": "RESI",
"checks": [
{
"type": "conn",
"conn": "Resi"
},
{
"type": "ping",
"conn": "Resi"
}
],
"pos": [
1,
3
]
}
],
"fixes": {
"superrack_ws_foh": {
"template": "mac_start",
"params": {
"host": "ws_foh",
"process": "SuperRack SoundGrid",
"app": "/Applications/Waves/SuperRack SoundGrid/SuperRack SoundGrid.app"
},
"label": "start SuperRack on WS FOH if it is not running",
"short": "SUPERRACK",
"kind": "ssh",
"host": "ws_foh",
"run": "pgrep -xq 'SuperRack SoundGrid' || open '/Applications/Waves/SuperRack SoundGrid/SuperRack SoundGrid.app'"
},
"restart_superrack_ws_foh": {
"template": "mac_restart",
"params": {
"host": "ws_foh",
"process": "SuperRack SoundGrid",
"app": "/Applications/Waves/SuperRack SoundGrid/SuperRack SoundGrid.app",
"wait_seconds": 10,
"force": true,
"background": false,
"stop_children": false,
"newest_of": ""
},
"label": "restart SuperRack on WS FOH (closes it first)",
"short": "SUPERRACK",
"kind": "ssh",
"host": "ws_foh",
"run": "pkill -TERM -x 'SuperRack SoundGrid'; i=0; while pgrep -xq 'SuperRack SoundGrid' && [ $i -lt 20 ]; do sleep 0.5; i=$((i+1)); done; pgrep -xq 'SuperRack SoundGrid' && pkill -KILL -x 'SuperRack SoundGrid'; sleep 1; open '/Applications/Waves/SuperRack SoundGrid/SuperRack SoundGrid.app'"
},
"x32edit_ws_foh": {
"template": "mac_start",
"params": {
"host": "ws_foh",
"process": "X32-Edit",
"app": "/Applications/X32-Edit.app"
},
"label": "start X32-Edit on WS FOH if it is not running",
"short": "X32 EDIT",
"kind": "ssh",
"host": "ws_foh",
"run": "pgrep -xq X32-Edit || open /Applications/X32-Edit.app"
},
"vista_ws_lights": {
"template": "mac_start",
"params": {
"host": "ws_lights",
"process": "Vista",
"app": "/Applications/Vista.app"
},
"label": "start Vista on WS Lights if it is not running",
"short": "VISTA",
"kind": "ssh",
"host": "ws_lights",
"run": "pgrep -xq Vista || open /Applications/Vista.app"
},
"restart_vista_ws_lights": {
"template": "mac_restart",
"params": {
"host": "ws_lights",
"process": "Vista",
"app": "/Applications/Vista.app",
"wait_seconds": 10,
"force": true,
"background": false,
"stop_children": false,
"newest_of": ""
},
"label": "restart Vista on WS Lights (closes it first)",
"short": "VISTA",
"kind": "ssh",
"host": "ws_lights",
"run": "pkill -TERM -x Vista; i=0; while pgrep -xq Vista && [ $i -lt 20 ]; do sleep 0.5; i=$((i+1)); done; pgrep -xq Vista && pkill -KILL -x Vista; sleep 1; open /Applications/Vista.app"
},
"ableton_ws_tracks": {
"template": "ableton",
"params": {
"host": "ws_tracks",
"app": "Ableton Live 11 Suite",
"restart": false,
"wait_seconds": 15
},
"label": "start Ableton on WS Tracks if it is not running",
"short": "ABLETON",
"kind": "ssh",
"host": "ws_tracks",
"run": "pgrep -xq Live || { L=$(ls -td ~/Library/Preferences/Ableton/Live*/ | head -1); S=$(grep -a 'info: Loading document \"' \"${L}Log.txt\" | grep -v '/Templates/' | tail -1 | sed -E 's/^.*Loading document \"(.*)\"[^\"]*$/\\1/'); if [ -n \"$S\" ] && [ -f \"$S\" ]; then open -a 'Ableton Live 11 Suite' \"$S\"; else open -a 'Ableton Live 11 Suite'; fi; }"
},
"restart_ableton_ws_tracks": {
"template": "ableton",
"params": {
"host": "ws_tracks",
"app": "Ableton Live 11 Suite",
"restart": true,
"wait_seconds": 15
},
"label": "restart Ableton on WS Tracks (closes it first)",
"short": "ABLETON",
"kind": "ssh",
"host": "ws_tracks",
"run": "L=$(ls -td ~/Library/Preferences/Ableton/Live*/ | head -1); S=$(grep -a 'info: Loading document \"' \"${L}Log.txt\" | grep -v '/Templates/' | tail -1 | sed -E 's/^.*Loading document \"(.*)\"[^\"]*$/\\1/'); pkill -TERM -x Live; i=0; while pgrep -xq Live && [ $i -lt 30 ]; do sleep 0.5; i=$((i+1)); done; pgrep -xq Live && pkill -KILL -x Live; sleep 1; if [ -n \"$S\" ] && [ -f \"$S\" ]; then open -a 'Ableton Live 11 Suite' \"$S\"; else open -a 'Ableton Live 11 Suite'; fi"
},
"propresenter_ingest": {
"template": "mac_start",
"params": {
"host": "ingest",
"process": "ProPresenter",
"app": "/Applications/ProPresenter.app"
},
"label": "start ProPresenter on this Mac if it is not running",
"short": "PROP",
"kind": "local",
"run": "pgrep -xq ProPresenter || open /Applications/ProPresenter.app"
},
"restart_propresenter_ingest": {
"template": "mac_restart",
"params": {
"host": "ingest",
"process": "ProPresenter",
"app": "/Applications/ProPresenter.app",
"wait_seconds": 10,
"force": true,
"background": false,
"stop_children": false,
"newest_of": ""
},
"label": "restart ProPresenter on this Mac (closes it first)",
"short": "PROP",
"kind": "local",
"run": "pkill -TERM -x ProPresenter; i=0; while pgrep -xq ProPresenter && [ $i -lt 20 ]; do sleep 0.5; i=$((i+1)); done; pgrep -xq ProPresenter && pkill -KILL -x ProPresenter; sleep 1; open /Applications/ProPresenter.app"
},
"midi_reconnect": {
"kind": "midi_connect",
"template": "midi_connect",
"params": {},
"short": "RECONNECT",
"label": "reconnect the peer to the network MIDI session it dropped out of (like Connect in Audio MIDI Setup), at its wired address"
}
},
"hosts": {
"ingest": {
"self": true,
"name": "WS ProPresenter",
"role": "the watchdog, Companion, the settings page",
"os": "mac",
"networks": [],
"runs": [
{
"kind": "launchagent",
"label": "org.waterschurch.status-panel",
"name": "the watchdog"
},
{
"kind": "launchagent",
"label": "org.waterschurch.status-settings",
"name": "the settings page"
},
{
"kind": "app",
"process": "Companion",
"name": "Companion",
"http": "http://127.0.0.1:8000/api/connections"
}
]
},
"ws_foh": {
"name": "WS FOH",
"os": "mac",
"ssh": "watersmedia@10.2.1.12",
"role": "found by auto-setup",
"runs": [
{
"kind": "sshd"
}
]
},
"ws_lights": {
"name": "WS Lights",
"os": "mac",
"ssh": "wslighting@10.2.2.2",
"role": "found by auto-setup",
"runs": [
{
"kind": "sshd"
}
]
},
"ws_tracks": {
"name": "WS Tracks",
"os": "mac",
"ssh": "wstracks@10.2.1.219",
"role": "found by auto-setup",
"runs": [
{
"kind": "sshd"
}
]
}
},
"gear": {},
"debounce_seconds": 3,
"network": {
"interface": "en14",
"gateway": "10.2.0.1",
"burst_connections": 4,
"burst_groups": 3,
"burst_window_seconds": 10,
"remember_seconds": 300
},
"nav_keys": [
"pagenum"
],
"nav_hold_ms": 1000,
"nav_tap_page": 1,
"discover": {
"auto": true
},
"restart_page": {
"page": 20,
"page_name": "20\\nRestart",
"jump_pos": [
3,
6
],
"back_pos": [
3,
0
],
"keys": [
{
"id": "rs_superrack",
"label": "SUPERRACK",
"fix": "restart_superrack_ws_foh",
"pos": [
0,
1
]
},
{
"id": "rs_vista",
"label": "VISTA",
"fix": "restart_vista_ws_lights",
"pos": [
0,
2
]
},
{
"id": "rs_ableton",
"label": "ABLETON",
"fix": "restart_ableton_ws_tracks",
"pos": [
0,
3
]
},
{
"id": "rs_prop",
"label": "PROP",
"fix": "restart_propresenter_ingest",
"pos": [
0,
4
]
}
]
},
"service_windows": [
{
"days": [
"mon",
"tue",
"wed",
"thu",
"fri",
"sat",
"sun"
],
"start": "00:00",
"end": "23:59"
}
]
}