Node.js library to interface with ETC Eos Family lighting
consoles, written in TypeScript
Report Bug
·
Request Feature
Warning This project is under active development and compatibility with any specific Eos console versions is not guaranteed.
For a summary of the most recent changes, please see CHANGELOG.md.
- Expose a simple and intuitive API to read and modify show data.
- Hide underlying OSC specifics as much as possible.
- Parse and emit all Eos events.
- Cache responses to improve performance of repeated requests.
Note that this library is not designed to automatically synchronise with show data like EosSyncLib.
Below are some very brief examples of this library's features.
import { EtcDiscovery } from 'eos-console';
const discovery = new EtcDiscovery();
discovery.on('found', (device: EtcDiscoveredDevice) => {
console.log(`Found console: ${device.name}`);
});
discovery.on('lost', (device: EtcDiscoveredDevice) => {
console.log(`Lost console: ${device.name}`);
});
discovery.start();
import { EosConsole } from 'eos-console';
const eos = new EosConsole({ host: 'localhost', port: 3037 });
await eos.connect();
// ...
await eos.disconnect();
// Set the user ID to 0 to operate as the background user
await eos.changeUser(1);
OSC banks are created using the cueListBanks
, directSelectsBanks
, and
faderBanks
modules.
// Create cue list bank 1 showing the next 10 and previous 3 cues of cue list 1
await eos.cueListBanks.create(1, {
cueList: 1,
pendingCueCount: 10,
prevCueCount: 3
});
// Create direct selects banks 1 showing 10 colour palettes
await eos.directSelectsBanks.create(1, {
buttonCount: 10,
targetType: 'cp'
});
// Create fader bank 1 showing 10 faders on its second page
await eos.faderBanks.create(1, {
faderCount: 10,
page: 2
});
Show data is accessed through dedicated modules. The following record target modules are available:
beamPalettes
colorPalettes
cueLists
cues
curves
effects
focusPalettes
groups
intensityPalettes
macros
magicSheets
patch
pixelMaps
presets
snapshots
subs
const cue = await eos.cues.get(1, 0.5);
await eos.cues.fire(3, 1.4);
const channels = await eos.patch.getAll();
const groups = await eos.groups.getAll();
await eos.executeCommand('Chan 1 Frame Thrust A 50 Frame Angle A -30');
await eos.executeCommand('Cue 2 Label %1 Enter', ['Command with substitutions']);
eos.on('user-cmd', ({ commandLine, userId }) =>
console.log(`User ${userId}: ${commandLine}`)
});
eos.on('active-cue', ({ cue }) => {
console.log(`Active cue: ${cue.cueList}/${cue.cueNumber}`);
});
eos.on('osc', ({ address, args }) => { /* ... */ });
By default the library will not write any log output. To enable logging, provide a log handler via the constructor.
const eos = new EosConsole({
logging: (level, message) => console.log(`[${level}] ${message}`),
});
eos-console
is licensed under the MIT license. See
LICENSE
for details.
This project is in no way affiliated with ETC.