Code Monkey home page Code Monkey logo

artnet's People

Contributors

hibas123 avatar hobbyquaker avatar jnovack avatar margau avatar martinzuern avatar maxjoehnk avatar solexious avatar sparks-alec 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

artnet's Issues

lib does not work

trying to send 8 universes full of data, rate limiting breaks apart.

Universe length may be wrong

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.

Auto select universe

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?

In a big for() loop, never sending data

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()?

artNet.set()

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.

Wait Timers?

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!

Can't seem to initialize more than 1 instance

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

Option to always send full DMX array

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?

More than one host?

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

Missing case: pass host, iface and port via constructor options

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' });

Error: Bad socket type specified. Valid types are: udp4, udp6

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)

Set Name of Node Feature

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

ArtNet Input

Do you guys plan to implement a node,js ArtNet input?

vars:
ipaddress
port
start channel
nChannels

If not, I can develop one

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.