npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rtf-dm/artnet-lib

v1.6.13

Published

ArtNet library

Readme

Logo

ArtNet-Lib

ArtNet-Lib is a flexible Node.js library written in TypeScript that implements part of the ArtNet protocol version 14. It enables easy control of DMX512 devices, discovery, and configuration of ArtNet nodes in your network.

📦 Installation

npm i @rtf-dm/artnet-lib

🚀 Quick Start

Basic Initialization

import { ArtNetImpl } from '@rtf-dm/artnet-lib';

const artNet = new ArtNetImpl({
  discovery: {
    sendReply: true, // Library will respond to ArtPoll requests
  },
});

await artNet.init();

Nodes Discovery

// Wait for new device to appear in the network
const [node] = await artNet.nodeManager.waitFor('NEW_NODE_REGISTERED');

// Or via event handler
artNet.nodeManager.addListener('NEW_NODE_REGISTERED', (payload) => {
  console.log('Device discovered:', payload.name);
});

🎯 Key Features

🔍 Automatic Device Discovery

  • Search for ArtNet nodes in local network

  • Device status tracking (online/offline)

  • Automatic node information updates

🌌 DMX Universe Management

  • Create virtual universes for device grouping

  • Support for various device drivers

  • Flexible DMX channel control

💡 Supported Drivers

  • Generic — universal driver for any DMX devices

  • MixPanel150 — specialized driver for specificequipment

  • Custom driver development support

📡 Multiple Data Transmission Methods

  • Broadcast — network-wide transmission

  • Multicast — group transmission

  • Unicast — targeted transmission to specific Node

📚 Usage Examples

Creating and Configuring a Universe

// Create universe with devices
const universe = artNet.createUniverse('my-universe', [
  { deviceName: 'Generic', numChannelsCaptured: 5 },
  { deviceName: 'MixPanel150' },
  { deviceName: 'Generic', numChannelsCaptured: 10 },
]);

// Device control
universe.getDevice('MixPanel150').forEach((device) => {
  device.setBrightness({ percent: 100 });
});

universe.getDevice<'Generic'>(0)?.setChannels({
  channels: [255, 128, 64, 32, 16],
});

Attaching Universe to Node

// Attach universe to node port
artNet.nodeManager.attachUniverse(node.macAddress, 0, universe);

// Send data
await artNet.nodeManager.syncAllNodes();

Advanced Node Configuration

await artNet.nodeManager.getByMac(node.macAddress)?.configure({
  netSwitch: 2,
  netSubSwitch: 12,
  swOut: [1, 2, 3, 4],
  longName: 'My Lighting Setup',
});

🏗️ Library Architecture

Core Components:

ArtNetImpl — main library class

NodeManager — managed discovered devices

Discovery — device discovery mechanism

Universe — virtual DMX universes

Device — DMX device abstraction

Data Transmission Types:

broadcastUniverse() — broadcast transmission

multicastUniverse() — multicast transmission

unicastUniverse() — unicast to specific device

🔧 Advanced Configuration

Network Settings

const artNet = new ArtNetImpl({
  discovery: { sendReply: true },
  network: {
    networkIp: '192.168.0.1',
    networkMask: '255.255.255.0',
    port: 6454, // Standard ArtNet port
  },
});

Device Event Handling

artNet.nodeManager.addListener('NODE_STATUS_UPDATED', (payload) => {
  console.log('Device updated:', payload.name);
});

artNet.nodeManager.addListener('NODE_IS_DEAD', (payload) => {
  console.log('Device unavailable:', payload.name);
});

📋 Complete Usage Example

import { ArtNetImpl } from '@rtf-dm/artnet-lib';

void (async () => {
  const artNet = new ArtNetImpl({ discovery: { sendReply: true } });
  await artNet.init();

  // Wait for device
  const [node] = await artNet.nodeManager.waitFor('NEW_NODE_REGISTERED');

  // Create universe
  const universe = artNet.createUniverse('demo', [
    { deviceName: 'Generic', numChannelsCaptured: 8 },
    { deviceName: 'MixPanel150' },
  ]);

  // Configure devices
  universe.getDevice('MixPanel150').forEach((device) => {
    device.setBrightness({ percent: 75 });
  });

  // Attach and synchronize
  artNet.attachUniverse(node.macAddress, 0, universe);
  await artNet.multicastUniverse({
    type: 'Group',
    universeName: 'demo',
    deviceGroup: 'Generic',
    action: {
      actionName: 'setChannel',
      parameters: { channel: 0, value: 255 },
    },
  });

  await artNet.dispose();
})();

🔄 Changelog

Version 1.6.13

Minor fixes in readme and examples

Version 1.6.2

Protocol package refactoring
Package version updates

Version 1.6.0

Preparation for 2-byte DMX channel support
ArtNet packet library updates

Version 1.5.16

ArtNet packets moved to separate package @rtf-dm/artnet-packets
Added create() method for each packet

Version 1.2.0

Added ArtNetImpl::enumerateInterfacesInfo()
Fixed ArtNetImpl::changeNetwork() method
Fixed discovery polling interval updates

Version 1.1.28

Added detailed README comments
Added example file
Added method logs