hobbyquaker / artnet Goto Github PK
View Code? Open in Web Editor NEWSend ArtDMX to an Art-Net node (DMX512, Stage Lighting) ๐ก๐ฌ
License: MIT License
Send ArtDMX to an Art-Net node (DMX512, Stage Lighting) ๐ก๐ฌ
License: MIT License
trying to send 8 universes full of data, rate limiting breaks apart.
I was unable to get this module working for a project I'm putting together. Specifically, I am using a single DMX King eDMX1. It seems that the length field of the outgoing Art-Net packet may be wrong. The line var lLen = (length & 0xfe) + 2;
is making it send a universe length of 514.
If I have time later, I'll put together a patch and test it out.
Hi, can you add RDM support please?
Currently, to send to a universe, you have to supply the universe number and the channels or specific channel and its value. Is it possible to just give a channel value in the range of some universe and have the library autodetect which universe it is? If not, could this be added?
I'm calling artnet.set()
in a big (and nested in another for()
) loop, and I can't see data output to the network (I'm using tcpdump
to check), however a simple call effectively transmits data. I know we're not here to debug my own code, but could this be an sync/async issue, having the set()
method being called when we're already outside the loop?
It looks to me that ArtNet is rather sequential and that async calls are not very suitable, so I'm simply wondering if using NodeJS for this is relevant, and if I should simply try to stick to a more primitive and sequential language.
Anyway, trying to figure out the logic behind some simple code like this without being able to output data to an ArtNet node:
for(let i = 0; i <= maxval1; i++) {
// computing some numbers
for(let j = 0; j <= maxval2; j++){
/* computing some other numbers
to make them available for outputting
in an array */
}
artnet.set(0, 1, data_array, function (err, res) {
console.log("never reaching this point");
});
}
artnet.close();
Should I ensure that something is correctly done before calling set()
?
I have an application which can process ArtTrigger packets.
As an example, the popular DMXKing devices can process ArtTrigger packets to play/stop/record shows. https://dmxking.com/downloads/eDMX%20PRO%20Recorder%20Manual%20(EN).pdf
Would this be in-scope of this package and be feasible?
Thank you for your consideration.
ArtTrigger References:
When I'm sending an artnet packages to sometimes it sends the full packet, and other times it's missing half the packets from what I am monitoring.
Is there a way to make "waits" inside this art net system? I've tried many different ways but not had any luck, or is there some kind of fading system that i can use? I currently have an Amazon Echo "Get"ing PHP pages which trigger the execution of the node which then runs the Art net Script and that then gets sent to Open Lighting architecture which of course then changes the different lights according to the data sent to them.
The whole system works perfectly fine when im just sending one insistence of a lighting change, such as:
var options = {
host: 'ola'
};
var artnet = require('artnet')(options);
artnet.set(1, null, null, 10, null, null, 10, function (err, res) {
artnet.close();
});
But when i add more of them to attempt to run them as a sequence nothing happens it just chooses the first one. I've tried many different timer for NPM but none of them seem to work like i would like, my end goal is something along these lines ( Sorry about the poor example i cant think of any other way to do it)
var options = {
host: 'ola'
};
var artnet = require('artnet')(options);
artnet.set(1, null, null, 10, null, null, 10, function (err, res) {
artnet.close();
});
//10%
artnet.set(1, null, null, 50, null, null, 50, function (err, res) {
artnet.close();
});
//30%
artnet.set(1, null, null, 100, null, null, 100, function (err, res) {
artnet.close();
});
//55%
artnet.set(1, null, null, 150, null, null, 150, function (err, res) {
artnet.close();
});
//70%
artnet.set(1, null, null, 200, null, null, 200, function (err, res) {
artnet.close();
});
//85%
artnet.set(1, null, null, 250, null, null, 250, function (err, res) {
artnet.close();
});
//95%
artnet.set(1, null, null, 255, null, null, 255, function (err, res) {
artnet.close();
});
//100%
Thanks, Hope you can help!
Hello,
I need to send on more than 1 universe from within the same code. I'm trying to create multiple instances of the artnet library but it does not seem to work. Is it possible to do this ?
Thanks
It would be helpful, if art net could be configured to always send the full DMX data instead of the only changed ones.
I've a setup with a raspberry pi and Ola running, and it only really works when the full data is always send.
Would you accept a PR?
Is there any way of sending the artnet data to multiple hosts? Ive tried:
var options = {
host: '10.0.0.18'
};
var options = {
host: '10.0.0.30'
};
and
var options = {
host: '10.0.0.18,10.0.0.30'
};
But neither seem to work, any help would be great, thanks
I am using this library to connect to Elation E-Node 8 II. I was not working with the usage suggested in the readme. After some investigation I noticed the socket had to be bound to a specific port - instead of the default random port assigned by dgram
.
If I set host
to 2.39.2.202 for example:
// doesn't work
var artnet = require('artnet')({ host: '2.39.2.202' });
The conditional statement between lines 26 and 35 are skipped and the socket is bound to a random port.
If I set iface
to my local made up IP address 2.39.2.100:
// works
var artnet = require('artnet')({ iface: '2.39.2.100' });
Then the socket port is set and I can communicate with the E-Node 8 II properly.
but...
If I want to set both host
and iface
- because I have to communicate with more than one Artnet for example` then it stops working:
// doesn't work
var artnetA = require('artnet')({ iface: '2.39.2.100', host: '2.39.2.202' });
var artnetB = require('artnet')({ iface: '2.39.2.100', host: '2.39.2.203' });
options={host:"192.168.2.114"}
{ host: '192.168.2.114' }
artnet = require('artnet')(options)
Error: Bad socket type specified. Valid types are: udp4, udp6
at newHandle (dgram.js:87:9)
at new Socket (dgram.js:112:16)
at Object.exports.createSocket (dgram.js:129:10)
at new Artnet (/home/pi/node_modules/artnet/lib/artnet.js:20:24)
at Artnet (/home/pi/node_modules/artnet/lib/artnet.js:7:16)
at repl:1:28
at REPLServer.self.eval (repl.js:110:21)
at Interface. (repl.js:239:12)
at Interface.emit (events.js:95:17)
at Interface._onLine (readline.js:202:10)
Hi,
your code works great.
however im running into an issue here, i try to set the name of my node, but fail misserably.
i suspect the setHost() method, to be able to change my ip later on after ive innitialised the node, but how am i able to set the name of that node?
Artnet monitor for example finds my node like so, UNKNOWN(IPADDRESS), how to change the unknown?
Thanks for the help.
all the best, decoye
Do you guys plan to implement a node,js ArtNet input?
vars:
ipaddress
port
start channel
nChannels
If not, I can develop one
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.