GithubHelp home page GithubHelp logo

dmx-web-go's Introduction

DMX Webserver

Offers simplistic API and converts calls into DMX commands.

Running

# Replace COM5 with whatever port your dmx is attached to
go run cmd\dmxweb\dmxweb.go -dmx-write-port COM5

If running/debugging via VS-Code, make sure to pass the necessary flags as args via launch.json. For example

"configurations": [
    {
  "name": "my super awesome config",
  # ...
  "args": ["-dmx-write-port", "COM5"]
    }
]

Note: Boolean flags require the use of = eg. -myflag=[true|false]

Configuring Actions

Using a config file you can define trigger sources, chases and event sequences to interact with the DMX output and bridge.

The config flag allows to specify a different config file.

Example CURLs

DMX API

# Set DMX Channel '1' to value '150'
curl -v -X PATCH -H "Content-Type: application/json" -d "{\"list\": [{\"channel\": 1, \"value\": 150}]}" http://localhost:8080/api/v1/dmx

# Fade DMX Channel '1' to value '150' over '2500' milliseconds
curl -v -X PATCH -H "Content-Type: application/json" -d "{\"fadeTimeMillis\": 2500, \"scene\": {\"list\": [{\"channel\": 1, \"value\": 150}]}}" http://localhost:8080/api/v1/dmx/fade

# Clear DMX (set all DMX channels to 0 immediately)
curl -v -X PUT http://localhost:8080/api/v1/dmx/clear

Trigger API

# Send trigger signal from source '35406887899400'
curl -v -X POST -H "Content-Type: application/json" -d "{\"source\": \"35406887899400\"}" localhost:8080/api/v1/trigger

Example WWW

Run with -static ./www as example to also have a static file server, serving a demo page.

go run cmd\dmxweb\dmxweb.go -dmx-write-port COM5 -log-level debug -static ./www

DEV Todos

  • Log who is responsible for DMX updates

dmx-web-go's People

Contributors

h3rby7 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.