Other campuses set themselves up: one install line, one join line per computer, keys made from what is found

settings/discover.py reads Companion's connections (and their addresses and channel counts), the
Dante devices, the network MIDI sessions here and on joined Macs, this Mac's wired network, and
what runs on each joined computer. settings/autoconf.py turns that into keys, checks, start and
restart fixes and a page layout the way North Attleboro's were made (group keys only when not
everything fits; receivers fold first), all through the existing builders and rules.
settings/campus.py prepares Companion through its internal API (the panel's custom variables and
the blink trigger), picks free pages, applies the first config, serves the program kit, the
campus install line and the Mac/PC join lines, and looks every ten minutes to add new gear
(discover.auto; never during a service or a recording, never removes, never re-adds what someone
took off). Settings > Auto-setup shows what was found and the lines to paste. install.sh keeps the
kit and makes the panel's login key.

Checked on North Attleboro read-only: discovery finds all 43 connections, 19 Dante devices, four
Macs' MIDI sessions and seven computers, and a from-scratch build reproduces NA's layout. The
Companion calls were tried with a throwaway variable and a disabled trigger, then removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-20 14:31:32 -04:00
co-authored by Claude Opus 5.5
parent 348dc43b4d
commit 3976667bba
11 changed files with 1629 additions and 2 deletions
+33
View File
@@ -227,6 +227,39 @@ Fixes and the remote checks are built from fields (`settings/builders.py`): a bu
The page reads what the watchdog writes next to its config (`snapshot.json` every 5 s, `started.json`, `live-now.json`, `fixes-running.json`) instead of asking the gear again. Its own look at the computers (`settings/probes.py`) runs fixed read-only commands over the same login key, fetches whole lists and matches them here, never while a fix runs.
## Other campuses: auto-setup
A campus sets itself up. All a person does is let the panel in: one line on the campus's Mac that runs Companion,
one line on each other computer.
1. **The Companion Mac.** Terminal, paste the campus's line from Settings › Auto-setup on any running campus (North
Attleboro's page shows the Apollo Beach, Southcoast and Woonsocket lines), for example
`curl -fsSL "http://10.1.1.1:8020/campus/install?id=ab" | zsh`. It downloads the program from that page (code only,
never that campus's settings or keys), installs it, makes the panel's login key, and runs
`python3 -m settings.campus setup`: Companion gets the panel's custom variables and the blink-clock trigger (through
Companion's own internal API, as its web UI does), the first two pages from 19 that hold nothing made by hand are
used, the gear is found and the config is applied like any Apply. It prints the editing PIN. North Attleboro's key is
added so it can help remotely (turn on Remote Login for that). Running the line again updates the program.
2. **Each other computer.** Mac: Terminal, `curl -fsSL http://<that Mac>:8020/join | sh` (adds the key, turns on
Remote Login when it can, says it is here). PC: PowerShell as administrator, `irm http://<that Mac>:8020/join.ps1 | iex`
(OpenSSH, the key, a StatusPanel start task for each known program running on it, Wake-on-LAN, then says it is here).
The lines are on that campus's Settings › Auto-setup.
**What gets a key** (`settings/autoconf.py`): each Companion connection of a known kind (HyperDecks, Tascam, consoles,
Dante with every device it sees, Shure receivers and PSMs with their channel count, ATEM, Videohub, Resolume, NovaStar,
OBS, Resi, ProPresenter, Ableton/AbleSet), each known program running on a joined computer (ProPresenter, Ableton,
Arena, OBS, Church Translate, Pro Tools on a Mac; Vista, Arena, OBS, ProPresenter on a PC), and every network MIDI peer at
its wired address (with the wired-network rule). A program's key also carries its Companion connection, its start fix
(auto-fixable) and a Restart page key. rtpMIDI rides inside the MIDI key. When everything fits there are no group keys;
when it does not, REC AUDIO RF SHOW VIDEO STREAM group keys take the top row and wireless receivers fold into RF first.
Generic connections and unknown programs are listed under Settings › Auto-setup, not guessed at.
**After that** (`discover.auto`, "add new gear by itself", on for a new campus, off at North Attleboro): the settings page
looks every ten minutes and soon after a computer joins, and adds what is new (a key in the first free cell, a Dante
device or MIDI link into its key). Never during the auto-fix hours or a recording; nothing is ever removed; a thing that
was there before and was taken off by someone is not added back (`discover-seen.json`). "Look now" adds what is new at
once. Everything it makes is ordinary settings, changed on the page like North Attleboro's.
## One-time Companion setup
1. **Variables → Custom Variables:** add three variables. Leave the start values empty and "persist" off: