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';constdiscovery=newEtcDiscovery();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';consteos=newEosConsole({host: 'localhost',port: 3037});awaiteos.connect();// ...awaiteos.disconnect();// Set the user ID to 0 to operate as the background userawaiteos.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 1awaiteos.cueListBanks.create(1,{cueList: 1,pendingCueCount: 10,prevCueCount: 3});// Create direct selects banks 1 showing 10 colour palettesawaiteos.directSelectsBanks.create(1,{buttonCount: 10,targetType: 'cp'});// Create fader bank 1 showing 10 faders on its second pageawaiteos.faderBanks.create(1,{faderCount: 10,page: 2});Show data is accessed through dedicated modules. The following record target modules are available:
beamPalettescolorPalettescueListscuescurveseffectsfocusPalettesgroupsintensityPalettesmacrosmagicSheetspatchpixelMapspresetssnapshotssubs
constcue=awaiteos.cues.get(1,0.5);awaiteos.cues.fire(3,1.4);constchannels=awaiteos.patch.getAll();constgroups=awaiteos.groups.getAll();awaiteos.executeCommand('Chan 1 Frame Thrust A 50 Frame Angle A -30');awaiteos.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.
consteos=newEosConsole({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.