dmx-devices
v0.4.0
Published
An object-oriented wrapper for devices supporting DMX prococol
Downloads
15
Readme
Proper, programmable access to devices that support DMX
TL;DR instead of saying "set channel 37 to 141" why not say "set light1 to 'pink'".
Alpha quality code disclaimer
This package is in it's very early days, the API hasn't stabilised yet and much is yet to be figured out, so do use it with this caveat in mind. I'd be eager to hear any usecases, so do give a shout on github!
Installation
npm install dmx-devices
Demo
// import a device, a Beamz RGBW bar in this case
import {BeamzLCB244} from "dmx-devices";
// init at address 1 in 58 channel mode (this specific bar supports 9, 16,
// 30, and 58 channel modes)
let bar = new BeamzLCB244(1, "58ch");
// set color to pink. the reason why the property is called `light1` is
// because in 58 channel mode you get access to 8 individual light groups
// on the LED bar
bar.light1.color = "pink";
// `dmx` property is a dict of {channel: value} that you can forward to
// the DMX controller
console.log(bar.dmx);
> {"1":0,"2":0,"3":255,"4":192,"5":203,"6":192,"7":0,"8":0,"9":0...
Currently recognized devices & adding your own
Check the devices directory for all currently recognized devices.
The LED Par is a good starting point for figuring how to create your own config.