Giter VIP home page Giter VIP logo

dmx's Introduction

node-dmx

DMX-512 controller library for node.js

Install

npm install dmx

Library API

const DMX = require('dmx')

Class DMX

new DMX()

Create a new DMX instance. This class is used to tie multiple universes together.

dmx.registerDriver(name, module)

  • name - String
  • module - Object implementing the Driver API

Register a new DMX Driver module by its name. These drivers are currently registered by default:

  • null: a development driver that prints the universe to stdout
  • socketio: a driver which sends out the universe via socket.IO as an array (see demo_socket_client.js as a client example)
  • artnet: driver for EnttecODE
  • bbdmx: driver for BeagleBone-DMX
  • dmx4all: driver for DMX4ALL devices like the "NanoDMX USB Interface"
  • enttec-usb-dmx-pro: a driver for devices using a Enttec USB DMX Pro chip like the "DMXKing ultraDMX Micro".
  • enttec-open-usb-dmx: driver for "Enttec Open DMX USB". This device is NOT recommended, there are known hardware limitations and this driver is not very stable. (If possible better obtain a device with the "pro" chip)
  • dmxking-utra-dmx-pro: driver for the DMXKing Ultra DMX pro interface. This driver support multiple universe specify the options with Port = A or B

dmx.addUniverse(name, driver, device_id, options)

  • name - String
  • driver - String, referring a registered driver
  • device_id - Number or Object
  • options - Object, driver specific options

Add a new DMX Universe with a name, driver and an optional device_id used by the driver to identify the device. For enttec-usb-dmx-pro and enttec-open-usb-dmx device_id is the path the the serial device. For artnet it is the target ip.

dmx.update(universe, channels[, extraData])

  • universe - String, name of the universe
  • channels - Object, keys are channel numbers, values the values to set that channel to
  • extraData - Object, this data will be passed unmodified to the update Event. (Optional; default value is {})

Update one or multiple channels of a universe. Also emits a update Event with the same information.

DMX.devices

A JSON Object describing some Devices and how many channels they use. Currently not many devices are in there but more can be added to the devices.js file. Pull requests welcome ;-)

The following Devices are known:

  • generic - a one channel dimmer
  • showtec-multidim2 - 4 channel dimmer with 4A per channel
  • eurolite-led-bar - Led bar with 3 RGB color segments and some programms
  • stairville-led-par-56 - RGB LED Par Can with some programms

Class DMX.Animation

new DMX.Animation([options])

Create a new DMX Animation instance. This can be chained similar to jQuery.

The options Object takes the following keys:

  • loop - Number, the number of times this animation sequence will loop when run is invoked. This value is overridden if you invoke runLoop.
  • filter - Function, allows you to read or modify the values being set to each channel during each animation step.

If you specify a filter function, it must take a single object parameter in which keys are channel numbers and values are the values to set those channels to. You may modify the values in the object to override the values in real-time, for example to scale channel brightness based on a master fader.

animation.add(to, duration, options)

  • to - Object, keys are channel numbers, values the values to set that channel to
  • duration - Number, duration in ms
  • options - Object

Add an animation Step. The options Object takes an easing key which allows to set a easing function from the following list:

  • linear (default)
  • inQuad
  • outQuad
  • inOutQuad
  • inCubic
  • outCubic
  • inOutCubic
  • inQuart
  • outQuart
  • inOutQuart
  • inQuint
  • outQuint
  • inOutQuint
  • inSine
  • outSine
  • inOutSine
  • inExpo
  • outExpo
  • inOutExpo
  • inCirc
  • outCirc
  • inOutCirc
  • inElastic
  • outElastic
  • inOutElastic
  • inBack
  • outBack
  • inOutBack
  • inBounce
  • outBounce
  • inOutBounce

Returns a Animation object with the animation step added.

animation.delay(duration)

  • duration - Number, duration in ms

Delay the next animation step for duration. Returns a Animation object with the delay step added.

animation.run(universe, onFinish)

  • universe - Object, reference to the universe driver
  • onFinish - Function, called when the animation is done

Run the Animation on the specified universe.

animation.runLoop(universe)

  • universe - Object, reference to the universe driver

Runs an animation constantly until animation.stop() is called

The example below shows a value being animated for 5 seconds:

const animation = new DMX.Animation().add({
  1: 255,
}, 100).add({
  1: 0,
}, 100).runLoop(universe)


setTimeout(() => {
  animation.stop()
}, 5000)

update Event

  • universe - String, name of the universe
  • channels - Object, keys are channel numbers, values the values to set that channel to
  • extraData - Object, data that was passed to the update method.

This event is emitted whenever update is called either by the integrating application or by an animation step.

If triggered by an animation step, extraData.origin will be the string 'animation'.

Webinterface

Versions prior to 0.2 included a Webinterface. This has since been moved into its own repository at https://github.com/node-dmx/dmx-web

Community

We're happy to help. Chat with us on IRC in #dmx on libera.chat.

dmx's People

Contributors

b4cedev avatar bluemaex avatar chetbox avatar cyberhd1811 avatar dependabot[bot] avatar doctormckay avatar drscream avatar evantahler avatar fensterbank avatar hrueger avatar jachwe avatar joebayld avatar kfstudio avatar pboyd04 avatar sdeboeck avatar seriousmanual avatar smcquaid avatar spearway avatar tomdixon avatar unclesamswiss avatar wiedi avatar williamoverton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dmx's Issues

enttec-open-usb-dmx fails

Hi, I'm really struggling to get this working on the enttec open usb box.

The first error I get is:

TypeError: open() expects three agrguments

I've been able to connect to the enttec open usb box by inserting another callback in the open() function in enttec-open-usb-dmx.js:

self.dev = new FTDI.FtdiDevice(device_id)
self.dev.open({
    'baudrate': 57600,
    'databits': 8,
    'stopbits': 2,
    'parity': 'none'
}
, function(err) {
    // new callback 
}
, function(err) {
    cb(err, device_id)
    if(!err) {
        self.start()
    }
})

Now it seems to connect without error. My main problem is the light connected to the enttec device doesn't respond to any values.

I have a Stairville LED PAR56 connected and it works correctly when used with Q Light Controller

The DMX Channels for the light are:

Channel   DMX   Name
1         1     Mode
2         2     Red
3         3     Green
4         4     Blue
5         5     Speed control

I edited the dmx-web-example.config so I have a preset which I would expect produce white light:

    {
        label: "White",
        values: {
            'office': { 1:255,  2:255,  3:255  }
        }
    }

The light doesn't go on though. I don't get what's wrong. Can anyone help?

Error when using any USB-Driver with Electron

I was trying to use this node module with the electron framework. As soon as I created a new DMX() I got this error:

Uncaught Error: A dynamic link library (DLL) initialization routine failed.
\\?\C:\Users\user\Documents\project-dir\node_modules\serialport\build\Release\serialport.node

When I commented out all this.registerDriver() using serialport the error was gone.
dmx.js :

function DMX(options) {
   var options = options || {}
   this.universes = {}
   this.drivers   = {}
   this.devices   = options.devices || require('./devices')

   this.registerDriver('null',                   require('./drivers/null'))
   /*
   this.registerDriver('dmx4all',                require('./drivers/dmx4all'))
   this.registerDriver('enttec-usb-dmx-pro',     require('./drivers/enttec-usb-dmx-pro'))
   this.registerDriver('enttec-open-usb-dmx',    require('./drivers/enttec-open-usb-dmx'))
   this.registerDriver('dmxking-ultra-dmx-pro',  require('./drivers/dmxking-ultra-dmx-pro'))
   */
   this.registerDriver('artnet',                 require('./drivers/artnet'))
   this.registerDriver('bbdmx',                  require('./drivers/bbdmx'))
}

I already tried this which didn't work. I have tested this on a Windows-PC.

Problem running dmx-web.js

Hi all,

I tried to install the library and run the sample. I have a problem here :

app.configure(function() {
          app.use(connect.json());
})

I read that configure method has been removed from express. So I removed the configure to just use

app.use(connect.json());

I couldn't run the app So I commented this part as well and the app runs now. But I am not sure what this connect.json() does. Can this be omitted?

A few small questions

I have a few questions before I am going to get into this

  • To use this with a DMX lighting system I would need a USB to DMX interface then I would set the connection port in my JS file
  • Could I use this in an Electron app, and I would do this I would set up some controls and have those written to a variable then parse that into the DMX library
  • Does this library have all the capabilities of a prebuilt software like ShowXpress I just need to make it usable

Thank you

entec-open-usb-dmx not responding?

Hi :-)
I've finally got my simply lighting console code to the point where I can test it with an actual device, so I got the entec-open-usb-dmx... of course now I'm having difficulty either connecting or getting anything out of it, so I'm hoping I can work with you to do some testing...
I'm on a macbook air, osx 10.11.6, using the latest git version of your code.
The device shows up as /dev/cu.usbserial-AL00DG7I
It works fine using JV Lightning controller, just as a test, so I know the hardware side works fine...

Starting the app with
var universe = dmx.addUniverse('demo', 'enttec-open-usb-dmx', '/dev/cu.usbserial-AL00DG7I');
yields a quiet (ie. no error log) startup, but I get no response from the device (an LED par), and it indicates it's not receiving any DMX signal.

At this point I'm not certain whether I should be looking at the system or node serial driver, or the specific enttec-open-usb-dmx driver code.

I did a test where I downloaded a fresh git copy, did npm install to get required packages, updated the addUniverse line to specify the "/dev/cu.usbserial-AL00DG7I" device in demo_simple.js, and ran it.
It appeared to function without error (ie. toggled 'on/off' in console) but did not register a proper DMX signal with the light, nor did I get any reaction from it...

I discovered some chatter online about ElCapitan conflicting in some way with FTDI drivers??? That's way outside my knowledge base, but I tried a couple of the suggestions to no avail... I'm not sure if that's a red herring, or in fact what I'm up against and should continue... The fact that the device works perfectly with different software and no system modifications suggests that maybe there isn't a conflict after all, but maybe I'm mis-interpreting...?

I also note that deejbee above is using totally different code to init the device:
self.dev = new FTDI.FtdiDevice(device_id)
and I'm not sure if perhaps I should be trying something like that as well...?

Anyway - thanks for a great package, and if you have any ideas that might point me in a direction to test, I'd be happy to be your remote tester :-)
Thanks and happy new year!
David

Enttec Open DMX USB not working

In short, I have the same issue as #24. I'm using a Stairville CLB4 RGB Compact LED Bar 4. It indicated that it is not receiving any DMX data.

Upgrade serialport to fix compile errors

Hi,
would it be possible to upgrade the serialport dependency to the newest version? This would fix some compiler errors in TravisCI like shown here.
I tested it with serialport 8.0.4 and the builds work again...
Unfortunately this serialport version has breaking api changes, so maybe some drivers would have to be updated, too?

Is there any way to catch / grab / record DMX input ?

Hi,

I'm searching for a tool that can record input DMX data from an USB <-> DMX interface, to play a delayed show.
I don't see anything in your tool that can do it (i don't explored all), but is there any way to do it ?
I find many tool to receive artnet or aSCN data, but not from DMX...

Tk for that tool.

Sometimes light value not setting / Can I read the current light state?

Hello!

I have the issue that it seems that sometimes my universe.updateAll() calls are getting swallowed / don't reach the lights.

I would love to catch that. Is it actually possible to read out the current set value on the lights (or even find out how many lights are connected and what their respective light value is?)

This way I could issue the command again if the light settings are not changing.

Using enttec-usb-dmx-pro driver.

Thank you!

How does this connect to visualization software?

Hello,
Does node-dmx have any support for connecting to visualization software? If so, what softwares are supported and how do I send the output to both the visualization and usb to dmx adapter? Thanks in advance.

EnttecUSBDMXPRO driver: SerialPort "writable" property no longer exists?

In the sendUniverse method, it checks the "writable" property:

EnttecUSBDMXPRO.prototype.sendUniverse = function () {
  if (!this.dev.writable) {
    return;
  }

I think that it should be checking SerialPort.isOpen property instead? I can't find the writable property in the current SerialPort documentation: https://serialport.io/docs/en/api-stream

I found this while debugging a memory leak when testing an animation to be sure my app wouldn't crash if it couldn't find an Enttec device. If testing for 'writable', the driver will write to a non-existent serial port, leak memory, and eventually crash. When I changed the driver code to this, it seems to run ok:

EnttecUSBDMXPRO.prototype.sendUniverse = function () {
  if (!this.dev.isOpen) {
    return;
  }

Multiple DMX512 Decoders

This may be a question more related to how DMX works in general, rather than how the library works, so I apologize if that's the case, but how do the channel numbers work when using multiple DMX decoders daisy chained together? Do they just increment until the max 512 channels are reached?

General compatibility

Hey there!

I am still new to the whole "DMX thing" and am currently looking forward on getting some lights for my home which I want to control via Node.

I was curious what specs I should be looking for when buying a DMX to USB interface as there aren't many interfaces listing what driver they are using.

I also looked at the README but couldn't find many affordable interfaces for beginners. Can you guys recommend any, by any chance?

Looking forward to using your library soon!

Thank you very much and stay safe! :)

how to install this library?

I tried win 11 / node js 18, 14, 5 — and it says all depreciated and doesnt work.
Is there manual, how to use this software?

Thoughts about wasting 1 byte on universe update

I'm not sure what to think about this change: 00d960e

Indeed this fixes the issue with the zero-indexed adresses, which is important because an API should not just wrap things 1:1 (which it did before), it should make things easy.
And a dmx library is easy, when the channel shown on the DMX device can be used without illogical conversion.

But how the change is implemented, we loose 1 byte on every universe update, resulting in loosing performance I think.
In most cases when updating some lights, the user don't send all 512 channels to the api. Only the channels which should change would be sent.
So wouldn't it be a better idea, to process the given data in the library's update method (before sending it over the buffer) and substracting every key by 1? Indeed we would need to iterate through every key in the given state object and in worst case we would iterate through all 512 keys, but in most cases we would iterate only a few keys and avoid wasting 1 byte on every update.

What do you guys think about it?

Documentation is wonky for this project

No offense to the awesome work done here to make this functional, but I found the documentation and setup for this to be very wonky and not helpful.
Using DMXUSB Pro here is what I got to work:
var universe = dmx.addUniverse('demo', 'enttec-usb-dmx-pro', 'COM3') //on Windows find Com port in device manager
Then I found that the JSON values to be really simple, it's just channel:value,
The documentation makes it seem complicated, and the examples are not commented at all.
So you need to look in the manual for your fixture and get the channel numbers for the functions, eg. channel 1 for intensity. You also need to set your fixtures correctly with the right starting channel.
BUT!
Each channel value is mysteriously decremented by 1 value. So if you set your fixture to start at 1, you start your values with 0.
Confused? So was I. My gobo wheel spinning and spinning.
Anyway, got it to work fine with a DMXPro USB from Enntec .
If you have questions you can DM me.
I will post more when I get it working in UI sliders. ;)
Here was something that worked with the Chauvet intimidator 155.
setInterval(function(){
universe.update({ //for some weird ass reason each channel in the map is decrement by 1?
0:50, //so this is pan
1: 100, // tilt
5:12, //sets color to magenta
6:255, //shutter open
7:255, //intensity full
8:127, //gobo wheel off
});
});
What was also helpful was having another file where all values were set to 0 = easy reset.

Make driver reentrant

I'm trying to figure out how to move this into node-red and I need to figure out how I can close the serial port when node-red reloads. I'm down to, in the driver (this case is enttec-open-usb-dmx):

 this.dev = new SerialPort(deviceId, {
    'baudRate': 250000,
    'dataBits': 8,
    'stopBits': 2,
    'parity': 'none',
  }, err => {
    if (!err) {
      this.start();
    } else {
      console.warn(err);
    }
  });

I get err, but I can't figure out how to close the serial port from the previous open.

[Error: Error Resource temporarily unavailable Cannot lock port]

Broadcast on artnet

I need to enable broadcast on the artnet driver. I added this code to make it work.

self.dev.on('listening', function(){
    self.dev.setBroadcast(true);
});

Should we add it to the master? Or maybe have an option to enable broadcast?

Compatible with Max485?

I have a Max485 module that I want to pair up with a raspberry pi. I see online that it is connected to the serial port on the Raspberry Pi. Will this work with Node DMX? I have a working setup of the Max485 on an ESP8266 working great but I had to (exhaustively) write my own interface and have since bought more complex lighting that will require animation so it looks like the Node DMX will make that all very nice and easy so I want to move over to the Pi but have yet to really mess with it. It looks like from this article https://www.industrialshields.com/blog/raspberry-pi-for-industry-26/post/how-to-communicate-raspberry-pi-3-b-with-a-max485-module-137 I should be able to just hook up the tx and rx alone with some control gpio. Just wondering how much work will need to be done to talk to the Max485.

Can not find .json

It only works when I specify the exact route.
I'm running it from:

C:\Users###\AppData\Roaming\npm\node_modules\dmx

with

node dmx-web

module.js:341
    throw err;
    ^
Error: Cannot find module '/etc/dmx-web.json'
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.Module._load (module.js:290:25)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at Object.<anonymous> (C:\Users\Sergi\AppData\Roaming\npm\node_modules\dmx\dmx-web.js:18:14)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)

Search for connected interfaces

The library is working great. A nice-to-have feature would be the ability to search for connected devices. Happy to implement that, but what would be the best approach? Should we add a search function to each driver and call them one after each other / simultaneously?

[IDEA] Documentation

I guess you might already received a notification, but I just created a wiki page with a very basic guide on how to use your library on MacOS with an enttec adapter. I am not sure if anyone else needs this, but I thought… maybe someone is as clueless as me and might be happy to find that info. If so, you might want to link it from the README.

Can this library be used as a Server?

I was hoping to intercept DMX messages from a piece of software, and then translate the message to a LIFX bulb. It looks like this library is intended to be a 'client', which controls DMX units? Is this correct?

Support Serialport version ^10

Thanks for your work on this project!
Serialport post version 10 has some different syntax that causes it not to work with node-dmx. I'll submit a PR in a few for the enttec-usb-dmx-pro.js driver.

module not working on macOS Catalina?

I have a enttec open usb dmx and a ultra dmx micro and I can not get either to work on my MacBook Pro. (Connected via a dongle as the MacBook is all usb C). I modified the simple demo, as below, and neither work. (I comment/uncomment and plug/unplug the correct device pair)

I'm connecting the device(s) to a dmx512 decoder for outputting to led strips. The strips definitely work as I can connect them to power directly. The /dev/usbserial addresses are correct.

Any help appreciated.

const DMX = require('./index');

const dmx = new DMX();

const universe = dmx.addUniverse( 'demo', 'enttec-usb-dmx-pro', '/dev/cu.usbserial-6A009910' );
//const universe = dmx.addUniverse( 'demo', 'enttec-open-usb-dmx', '/dev/cu.usbserial-AL05O8DK' );

let on = false;

setInterval(() => {
if (on) {
on = false;
universe.updateAll(0);
console.log('off');
} else {
on = true;
universe.updateAll(250);
console.log('on');
}
}, 1000);

Best interface?

I am currently looking for a DMX USB interface. Which one is the best according to your research?

For me it is better to invest a little more money. But then the interface must be able to control multiple channels simultaneously without jerks.

trouble using with Electron: "DMX is not a constructor"

I'm not sure if this is strictly speaking an issue, or just something I'm having difficulty with in my setup. I've been trying for several days to get this library working in an Electron project I'm testing.

I'm just using the demo_simple.js code as is:

var DMX = require('./dmx'); var A = DMX.Animation; var dmx = new DMX(); var universe = dmx.addUniverse('demo', 'null')

but it bugs out at the constructor, with a TypeError: DMX is not a constructor.

Has anyone successfully used this with Electron? Is this error indicative of a simple config problem, or is there some fundamental reason I won't be able to make this work?

Thanks for what looks like a super project,
Cheers,
David Hoare

Not working on node version 7.x.x

I'm running this in node 6.9.4 and I get the following in the terminal on running the script.

... Output above...

==== C stack trace ===============================

 1: v8::Template::Set(v8::Local<v8::Name>, v8::Local<v8::Data>, v8::PropertyAttribute)
 2: SerialportPoller::Init(v8::Local<v8::Object>)
 3: init
 4: node::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&)
 5: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&))
 6: v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::(anonymous namespace)::BuiltinArguments<(v8::internal::BuiltinExtraArguments)1>)
 7: v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*)
 8: 0x3310d7e092a7
 9: 0x3310d7f77244
(node) v8::ObjectTemplate::Set() with non-primitive values is deprecated
(node) and will stop working in the next major release.

==== JS stack trace =========================================
... Output below ...

I'm guessing that there is some piece of a dependency that node-dmx uses v8::ObjectTemplate::Set(). How can I help find the corresponding dependency and see if there is an update to get node-dmx working in node v7.x.x?

Add types for typescript support

Hi
im using your library for a project and it seems to lack types for typescript. I believe adding support for it would really make this library more awesome. I can help you with this and add types. Would you be willing to add support if I open a PR? Thank you

updateAll for enttec-usb-dmx-pro driver

Hi

I have an ENTTEC DMXUSB PRO and would like to use this to drive some dmx lights. I installed all the packages correctly and I am able to run the demo and light up some dmx lights.

However, I just noticed the updateAll method is currently marked //TODO for the pro driver.
Could I used the code from the open driver to drive a pro ?

No connection to Enttec Open Dmx

What is the correct path to my enttec device?
pi@raspberrypi:~ $ dmx-web
Error: Error: No such file or directory, cannot open /dev/cu.usbserial-6AVNHXS8
^C
pi@raspberrypi:~ $ cd /sys/bus/usb/devices
pi@raspberrypi:/sys/bus/usb/devices $ ls
1-0:1.0 1-1 1-1.1 1-1:1.0 1-1.1.1 1-1.1:1.0 1-1.1.1:1.0 1-1.1.2 1-1.1.2:1.0 1-1.1.2:1.1 1-1.1.2:1.2 1-1.2 1-1.2:1.0 1-1.3 1-1.3:1.0 1-1.3:1.1 1-1.3:1.2 usb1
pi@raspberrypi:/sys/bus/usb/devices $ cd
pi@raspberrypi:~ $ sudo udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[57347.509619] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2 (usb)
KERNEL[57347.517134] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0 (usb)
KERNEL[57347.517294] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/ttyUSB0 (usb-serial)
KERNEL[57347.518289] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/ttyUSB0/tty/ttyUSB0 (tty)
UDEV [57347.539482] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2 (usb)
UDEV [57347.548009] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0 (usb)
UDEV [57347.553368] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/ttyUSB0 (usb-serial)
UDEV [57347.575536] add /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0/ttyUSB0/tty/ttyUSB0 (tty)

JS for files that store only objects

I'd suggest changing these to JSON files, and if you need features like comments use json5. You can even require() JSON files and get just an object with its contents. The major problem with using JS for data-storage is that it's not secure and 100% vulnerable to code injection.

Question: Naming Information of moving head Pan/Tilt

Hey there,

you might have noticed i'm currently publishing some dmx lights to your package. First a small LED-Pot, then a LED-Bar and currently i'm working on a Moving Head. But the problem is, that the channel 1 and 2 have a middle value of 128. But how do i let the people know this? (The same applies for channels which have sometimes something like: 1...255: Intensity of the red color (0%-100%), if channel 6 [in this example the dimmer] has a value between 1...255 and channel 8 [in this case a overwriting macro-channel] has a value of 0.

I'm personally thinking of something like this:

module.exports = {
  'someDMXDevice': {
    channels: ['dimmer', 'red', 'green', 'blue', 'macros', 'pan', 'tilt'],
    ranges: {
      'red': {
        'type': 'condition',
        'conditions': [
          { 'value': 1, 'statement': 'Intensity Red, if channel "dimmer" is between 1...255 and channel "macros" is 0' },
        ],
      },
      //Same applies for the channel green and blue but not including them in this example
      'pan': {
        'type': 'rotation',
        'values': [
          { 'min': 0, 'degrees': -270 },
          { 'middle': 128, 'degrees': 0 },
          { 'max': 255, 'degrees': 270 },
        ],
      },
      'tilt': {
        'type': 'rotation',
        'values': [
          { 'min': 0, 'degrees': -85 },
          { 'middle': 128, 'degrees': 0 },
          { 'max': 255, 'degrees': 85 },
        ],
      },
    },
  },
};

(Also i'm not too shure when to put the key into quotes. If you have a system for this i would be pleased, if you tell me this.)

UniverseToObject does not return Universe as an Object

UniverseToObject (https://github.com/wiedi/node-dmx/blob/master/dmx.js#L43) does only send an empty object in my setup. I only evaluated it via calling https://github.com/wiedi/node-dmx/blob/master/dmx-web.js#L116 where the initial sending of values does not work.

The cause might be in Line 46 (https://github.com/wiedi/node-dmx/blob/master/dmx.js#L46) where universe.length is used. In my setup it does not return the length of the universe but an object. I fixed it by using 512 instead of universe.length.

On Blank-Project with artnet-driver:

console.log(universe.length) //<Buffer 02 00>
console.dir(universe.length) //Buffer { '0': 2, '1': 0 }

Enhancement: Allow managing fixtures/scenes in the web interface

I think it'd be a good idea to edit scenes / fixtures in the web UI. Perhaps under a 'config' tab.

I can start working on this however how would I modify the universe? I would have to save to the json config, but it would need to change the current DMX output in realtime as well. Perhaps a step in the right direction and I can work on this.

Thoughts?

ENTTEC buffer bierfly resets to 0

ENTTEC buffer bierfly resets to 0 when simply sending an update. I don't know exactly what causes this. It could be that when updating (at 44Hz) the values are messed up. Is there some way to disable the resend or change the interval?

Kissbox Compatibility

Does the artnet driver work with interfaces other than the EnttecODE? I'm going to be working with a Kissbox DMX1TR, which uses ethernet as well, and was just curious if this library would work.

Fade curves.

Hey there!

I have a basic fade in - fade out animation running with this library on my (DIY) Enttec Open DMX controller, connected to two Chauvet SlimPars.

The problem I am running into is that the animation seems to be super choppy, as in, you can see the fixture switching intensity levels in steps, and it doesn't appear smooth. I have tried multiple of the "easing" options but haven't really felt any of them improved the fixture's output.

I know the problem is not my adapter, or the fixtures, as running the same setup through QLC+ (free open-source lighting software), the fade times are a lot smoother.

I don't know if it's a matter of the framerate of this library or its animation feature, but any help is certainly appreciated!

EnttecOpenUSBDMXDriver

hello,

I'm using it with a 8-channel mode with that.
CLNB600_Cameo_DMX_Control_Table_EN.pdf

I'm just trying to move to proper position with a white light

import { DMX, EnttecOpenUSBDMXDriver, Animation } from "dmx-ts";
import { EnttecOpenDMXUSBDevice } from "enttec-open-dmx-usb";

const dmx = new DMX();

enum C {
  MechPan = 1,
  MechTilt = 2,
  Dimmer = 3,
  Strobe = 4,
  Red = 5,
  Green = 6,
  Blue = 7,
  White = 8,
}

(async () => {
  const universe = await dmx.addUniverse(
    "demo",
    new EnttecOpenUSBDMXDriver(await EnttecOpenDMXUSBDevice.getFirstAvailableDevice()),
  );
  universe.updateAll(0);
  universe.update({ [C.MechPan]: 255, [C.Dimmer]: 255, [C.White]: 255 });
})();

But this is glitchy as hell look at this :

212352663-b77a8078-423d-4cf9-a5be-3a5a5244f123.mp4

What I'm supposed to understand ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.