# companion-module-digico-s31 Bitfocus Companion (5.0+) connection module for the DiGiCo S21/S31: per-channel control of one buss (the Apollo Beach "Studio" group by default), aux send level/on/pan, mutes, faders, snapshots — plus a UDP relay so several DiGiCo iPad apps can share the console's single iPad slot. User-facing documentation (console + iPad setup, variables, the verified protocol table) is in [companion/HELP.md](companion/HELP.md); Companion shows it on the connection's help button. ## Layout | Path | Purpose | | --- | --- | | `src/main.js` | the `InstanceBase` subclass (config, lifecycle, state, learn log) | | `src/definitions.js` | actions, feedbacks, variables, presets | | `src/dialects.js` | address builders/parsers: `sd` (iPad extension, verified), `sseries` (OSC Control extension), `raw` | | `src/console-link.js` | one UDP socket to the console (fixed local port) | | `src/relay.js` | iPad relay: tracks clients, forwards verbatim, fans out | | `src/osc.js` | tolerant OSC codec | | `tools/` | `mock-s31.js` (console emulator, both dialects), `fake-ipad.js`, see `tools/README.md` | | `test/selftest.js` | end-to-end check: mock console ↔ link/relay ↔ fake iPad | ## Develop ```bash npm install # @companion-module/base ~2.1.3 (2.2.x is rejected by Companion 5.0.x) npm test # runs test/selftest.js against the mock console ``` ## Install as a developer module (how it runs on AB-ProPresenter) 1. Copy this folder, including `node_modules`, to the Companion computer, e.g. `~/Apps/companion-dev-modules/companion-module-digico-s31/`. 2. In the Companion launcher → Developer, enable developer modules and set the path to the *parent* folder (`~/Apps/companion-dev-modules`); the launcher restarts Companion with `--extra-module-path`. (On AB this was done by editing `dev_modules_path` in `~/Library/Application Support/companion/config.json` and relaunching Companion.) 3. Connections → Add → "DiGiCo: S21; S31" (version *Dev*). Later file changes hot-reload the connection. The console side (Extensions → iPad) must point at the Companion computer's IP with Send Port 9000 / Receive Port 8000 (the module defaults).