# eos-console

> Library to interface with ETC Eos Family lighting consoles.

Latest version **0.3.1** (published 2023-12-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install eos-console
pnpm add eos-console
yarn add eos-console
bun add eos-console
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2023-12-21 |
| First published | 2023-11-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 107.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 22 |
| Author | Douglas Finlay |
| Maintainers | douglasfinlay |
| Keywords | etc, eos, lighting, osc, theatre |

## Links

- npm: https://www.npmjs.com/package/eos-console
- Repository: https://github.com/douglasfinlay/node-eos-console
- Homepage: https://github.com/douglasfinlay/node-eos-console#readme
- Issues: https://github.com/douglasfinlay/node-eos-console/issues
- npm.io page: https://npm.io/package/eos-console

## Dependencies (2)

- [slip](https://npm.io/package/slip.md) ^1.0.2
- [osc-min](https://npm.io/package/osc-min.md) ^1.1.2

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 0.3.1 (latest) — 2023-12-21
- 0.3.0 — 2023-12-13
- 0.2.0 — 2023-11-19
- 0.1.1 — 2023-11-14

## README

<h1 align="center"><code>eos-console</code></h1>
  <p align="center">Node.js library to interface with ETC Eos Family lighting
  consoles, written in TypeScript</p>
</div>

> **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](https://github.com/ETCLabs/EosSyncLib).

## Basic Usage

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

### Console Discovery

```ts
import { EtcDiscovery } from 'eos-console';

const discovery = new EtcDiscovery();

discovery.on('found', (device: EtcDiscoveredDevice) => {
    console.log(`Found console: ${device.name}`);
});

discovery.start();
```

### Connection

```ts
import { EosConsole } from 'eos-console';

const eos = new EosConsole({ host: 'localhost', port: 3037 });
await eos.connect();
// ...
await eos.disconnect();
```

### Retrieving Show Data

```ts
const swVersion = eos.getVersion();
const groups = await eos.getGroups();
const cue = await eos.getCue(1, 0.5);
```

### Executing Commands

```ts
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

```ts
eos.on('user-cmd', (userId, cmd) => 
    console.log(`User ${userId}: ${cmd}`)
});

eos.on('current-cue', (cueList, cueNumber) => { /* ... */ });
```

#### Explicit OSC Output

```ts
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.

```ts
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`](https://github.com/douglasfinlay/node-eos-console/blob/main/LICENSE)
for details.

## Disclaimer

This project is in no way affiliated with [ETC](https://www.etcconnect.com/).

---
_Source: https://npm.io/package/eos-console · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
