eos-console
v0.3.1
Published
Library to interface with ETC Eos Family lighting consoles.
Downloads
12
Maintainers
Readme
Warning
This project is under active development and is not feature complete
Design Goals
- Expose a simple and intuitive API
- Hide underlying OSC specifics as much as possible
- Publish all Eos events through an
EventEmitter
instance - Cache responses where possible to improve performance of repeated requests
Design Non-Goals
This library is not designed to automatically synchronise with show data like EosSyncLib.
Basic Usage
Below are some very brief examples of this library's features.
Console Discovery
import { EtcDiscovery } from 'eos-console';
const discovery = new EtcDiscovery();
discovery.on('found', (device: EtcDiscoveredDevice) => {
console.log(`Found console: ${device.name}`);
});
discovery.start();
Connection
import { EosConsole } from 'eos-console';
const eos = new EosConsole({ host: 'localhost', port: 3037 });
await eos.connect();
// ...
await eos.disconnect();
Retrieving Show Data
const swVersion = eos.getVersion();
const groups = await eos.getGroups();
const cue = await eos.getCue(1, 0.5);
Executing Commands
await eos.changeUser(5);
await eos.fireCue(3, 1.4);
await eos.executeCommand('Chan 1 Frame Thrust A 50 Frame Angle A -30');
await eos.executeCommand('Cue 2 Label %1 Enter', ['Command with substitutions']);
Handling Console Events
Implicit Output
eos.on('user-cmd', (userId, cmd) =>
console.log(`User ${userId}: ${cmd}`)
});
eos.on('current-cue', (cueList, cueNumber) => { /* ... */ });
Explicit OSC Output
eos.on('osc', ({address, args}) => { /* ... */ });
Logging
By default the library will not produce any log output. To enable logging, provide a log handler via the constructor.
const eos = new EosConsole({
logging: (level, message) => console.log(`[${level}] ${message}`),
});
To Do
- [ ] Documentation
- [ ] Settle on an event naming convention for implicit output
License
eos-console
is licensed under the MIT license. See
LICENSE
for details.
Disclaimer
This project is in no way affiliated with ETC.