artnode

0.0.1 • Public • Published

ArtNode

A Node.JS work-in-progress implementation of Art-Net, a protocol which allows for DMX512 communications over ethernet.

Setting up

Install the package using npm or yarn:

npm install artnode
# or 
yarn add artnode

Options

TODO

Examples

Listening for DMX

const ArtNet = require('../src/artnet');
 
const artnet = new Artnet({isController: true});
 
const universe = artnet.getUniverse(0);
 
universe.on('data', ({ data, changed }) => {
    changed.forEach(({ address, value }) => {
        console.log(`DMX ${address} set to ${value}.`);
    });
    
    data.forEach((value, address) => {
        console.log(`DMX ${address} is ${value}`);
    });
});
 
artnet.start();

Device discovery

const { ArtNet } = require('artnode');
 
const artnet = new ArtNet({isController: true});
 
artnet.on('device', (device) => {
    console.log(`New device: ${device.shortName} @ ${device.ip}`);
});
 
artnet.on('deviceOffline', (device) => {
    console.log(`Device ${device.shortName} @ ${device.ip} went offline.`);
});
 
artnet.start();

Readme

Keywords

none

Package Sidebar

Install

npm i artnode

Weekly Downloads

2

Version

0.0.1

License

MIT

Unpacked Size

29.4 kB

Total Files

22

Last publish

Collaborators

  • woutervdbrink