Giter Club home page Giter Club logo

dmx-web's Introduction

node-dmx

Webinterface and HTTP API using node-dmx

Install

npm install -g dmx-web

Webinterface

Configuration

The Daemon dmx-web looks for a configuration file in /etc/dmx-web.json. An alternate location can be passed as a command line argument.

This configuration file consists of these sections:

  • server is used to set the listen port and host.
  • universes is used to describe the DMX Universes with details like which output driver to use and which devices are at which address.
  • scenesFileLocation is used to specify a JSON file where scenes should be saved to.
  • devicesFileLocation is used to specify a JSON file where configured devices should be saved to.
  • allowEditing is used to enable or disabling editing of scenes and devices via the web UI.

A example configuration is in the repository by the name dmx-web-example.conf

Run

dmx-web [-c <full-path to config file>]

Run as a service

On MacOS you can run dmx-web as a service by adding a launch script to /Library/LaunchDaemons. See the example file.

Scenes

Scenes are combinations of Animations and static values which can be edited and activated via the web UI. They are saved into a file located at scenesFileLocation so they can be recalled later.

Devices

You can add devices via the web UI or by editing the file specified in devicesFileLocation. Devices are used to display what a DMX channel is used for.

HTTP API

There is a HTTP api embded into dmx-web which allows you to set DMX values via http calls

Static

Set dmx values for a universe by posting to: /state/<universe>

Example request:

{
  "1": 255,
  "2": 0,
  "3": 128
} 

Animations

A List of Channel Transistions can be POSTed to /animation/<universe>. Each transistion is a JSON Object with at least the to property present. The Value of which also has to be an Object describing the channel end-states.

A duration for this transistion can be given in the duration property. If not specified 0ms is assumed.

Scripts

Scripts are user provided javascript ran as part of a scene to configure DMX values.

To set a DMX value call dmx.set(universeName, channel, value)

Example:

[
	{"to": {"10": 0, "20": 0}},
	{"to": {"10": 255}, "duration": 2000},
	{"to": {"20": 255}, "duration": 1000}
]

This sets channels 10 and 20 to zero. Then transistions channel 10 to 255 in 2 seconds. After that channel 20 is faded to 255 in 1 second.

Community

We're happy to help. Chat with us on IRC in #node-dmx on freenode.

dmx-web's People

Contributors

bluemaex avatar drscream avatar evantahler avatar fensterbank avatar jachwe avatar joebayld avatar kfstudio avatar pboyd04 avatar sdeboeck avatar seriousmanual avatar smcquaid avatar spearway avatar wiedi avatar williamoverton avatar

Stargazers

 avatar

Watchers

 avatar

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.