
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
dmx-animate-web
Advanced tools
This module acts as a http API and Webinterface to control dmx devices via node-dmx-animate.
Please familiarize yourself with the concept of the library, because we'll rely on it here.
After you've installed dmx-animate install dmx-animate-web with
npm i dmx-animate-web --save
Configure dmx-animate, sequences and devices as shown here: node-dmx-animate
But add a dmx-animate-web import and create a instance:
const dmxAnimate = require('dmx-animate')
const dmx = new dmxAnimate({
universes: [
{name: 'demo', driver: null, serialPath: 'COM7'}
]
})
// !important:
const dmxAnimateWeb = require('dmx-animate-web')
const dmxWeb = dmxAnimateWeb(dmx)
var rgbDevice = dmx.addDevice({
name: 'basic-rgb',
startChannel: 4,
channels: ['r','g','b'],
isRgb: true,
reactSound: ['r','g','b']
})
dmx.addSequence('demo',function(){
return rgbDevice.dim([255,255,255],undefined,2000).run()
})
dmx-animate-web(dmx, [config])
dmx: The instance the webserver should useIf you take a glance at the console there should be a similar message like this:
Web server started at localhost:8080
I included a demo web interface for the barely usage and control.
If you open localhost:8080 or computersIP:8080, a website should load.
You should see all your defined devices and their channels.
You can click the device names to get a wide view and execute programs from the web interface. isRgb defined devices can be controlled using a color wheel. reactToSound defined device channels can be controlled by the browsers microphone input (sensitivity and dim durations can be altered)
The sequences tab gives you an overview over all defined sequences and you can play them directly.
define Rgb devices
To enable the color wheel, pass isRgb: truein the device
define reactSound
Pass an array of channel names that should change on sound peaks:
reactSound: ['r','g','b']
Important: In many browsers the microphone is deactivated if the connection is not secure. So if you serve the site to other devices in your local network, consider a https connection.
You can access the http api yourself. There are these endpoints: **GET /api/devices **
Returns all devices and groups with this schema:
[
{
"name": String,
"channels": [String],
"state": {
"channel":Number
...
},
"programs": [String]
"reactSound":[String]
}
]
GET /api/sequences
Returns all sequences with this schema:
[
{
"name": String,
"duration": Number
}
]
POST /api/runSequence/[name]
Executes the sequence called name. Returns: {"success":Boolean}
(optional) Request Body: Array of Arguments
POST /api/stopSequence/[name]
Stops a running sequence called name. Returns: {"success":Boolean}
POST /api/blackout
Blackouts all devices. Returns: {"success":Boolean}
POST /api/device/set
Executes a method on a device, animates it or just sets it's channels to a value.
Request Body:
{
"name": String,
"commands": [
{
"type": String,
"args": Array
}
]
}
type - The name of a method on the device
args - (optional) An Array of Arguments you would pass into the function usually
Returns:
{
"success": Boolean,
"results": [
"value": For each command
]
}
Example:
{
"name": "basic-rgb",
"commands": [
{
"type": "set",
"args": [{"r":150,"g": 50, "b": 255}]
},
{
"type": "dim",
"args": [{"r":255,"g": 150, "b": 0},null,10000]
},
{
"type": "run"
}
]
}
FAQs
A web interface and api for dmx-animate
We found that dmx-animate-web demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.