Skip to content

Repository files navigation

eos-console

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.

Design Goals

  • 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.

Basic Usage

Below are some very brief examples of this library's features.

Console Discovery

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();

Connection

import{EosConsole}from'eos-console';consteos=newEosConsole({host: 'localhost',port: 3037});awaiteos.connect();// ...awaiteos.disconnect();

Configuration

Changing User ID

// Set the user ID to 0 to operate as the background userawaiteos.changeUser(1);

Creating OSC Banks

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});

Retrieving Show Data

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
constcue=awaiteos.cues.get(1,0.5);awaiteos.cues.fire(3,1.4);constchannels=awaiteos.patch.getAll();constgroups=awaiteos.groups.getAll();

Executing Commands

awaiteos.executeCommand('Chan 1 Frame Thrust A 50 Frame Angle A -30');awaiteos.executeCommand('Cue 2 Label %1 Enter',['Command with substitutions']);

Handling Console Events

Implicit Output

eos.on('user-cmd',({ commandLine, userId })=>console.log(`User ${userId}: ${commandLine}`)});eos.on('active-cue',({ cue })=>{console.log(`Active cue: ${cue.cueList}/${cue.cueNumber}`);});

Explicit OSC Output

eos.on('osc',({ address, args })=>{/* ... */});

Logging

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}`),});

License

eos-console is licensed under the MIT license. See LICENSE for details.

Disclaimer

This project is in no way affiliated with ETC.

About

Node.js library to interface with ETC Eos Family lighting consoles

Topics

Resources

Contributing

Stars

22 stars

Watchers

6 watching

Forks

Releases

Packages

Used by

Contributors

Languages