eos-console
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

eos-console

Node.js library to interface with ETC Eos Family lighting consoles, written in TypeScript

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.

Package Sidebar

Install

npm i eos-console

Weekly Downloads

2

Version

0.3.1

License

MIT

Unpacked Size

110 kB

Total Files

37

Last publish

Collaborators

  • douglasfinlay