Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

artnet

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

artnet

Module to send commands to an Art-Net node

  • 1.2.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
55
decreased by-72.36%
Maintainers
1
Weekly downloads
 
Created
Source

artnet

License NPM version Dependency Status

This is a Node.js module that can be used to send ArtDMX packages to an Art-Net node.

Usage

connect, set channel 1 to 255, disconnect.

var options = {
    host: '172.16.23.15'
}

var artnet = require('artnet')(options);

// set channel 1 to 255 and disconnect afterwards.
artnet.set(1, 255, function (err, res) {
    artnet.close();
});

The set method can set multiple channels at once:

Use an array to set subsequent channels...

// set channel 100 to 10, channel 101 to 20 and channel 102 to 30
artnet.set(100, [10, 20, 30]);

...if you want to keep certain channels unchanged set them to null

// set channel 50 to 255 and channel 52 to 127
artnet.set(50, [255, null, 127]);

you can omit the channel, it defaults to 1

// Set channel 1 to 255 and channel 2 to 127:
artnet.set([255, 127]);

This lib throttles the maximum send rate to ~40Hz. Unchanged data is refreshed every ~4s.

Options

  • host (Default "255.255.255.255")
  • port (Default 6454)
  • refresh (millisecond interval for sending unchanged data to the Art-Net node. Default 4000)
  • iface (optional string IP address - bind udp socket to specific network interface)
  • sendAll (sends always the full DMX universe instead of only changed values. Default false)

Methods

set( [ [ uint15 universe , ] uint9 channel , ] uint8 value [ , function(err, res) callback ] )
set( [ [ uint15 universe , ] uint9 channel , ] array[uint8] values [ , function(err, res) callback ] )

Every parameter except the value(s) is optional. If you supply a universe you need to supply the channel also. Defaults: universe = 0, channel = 1

Callback is called with (error, response) params. If error and response are null data remained unchanged and therefore nothing has been sent.

close( )

Closes the connection and stops the send interval.

setHost( string host )

Change the Art-Net hostname/address after initialization

Further Reading

License

The MIT License (MIT)

Copyright (c) 2014, 2015 hobbyquaker

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Credits

Art-Net™ Designed by and Copyright Artistic Licence Holdings Ltd.

Keywords

FAQs

Package last updated on 26 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc