Offers simplistic API and converts calls into DMX commands.
# 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]
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.
# 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
# Send trigger signal from source '35406887899400'
curl -v -X POST -H "Content-Type: application/json" -d "{\"source\": \"35406887899400\"}" localhost:8080/api/v1/trigger
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
- Log who is responsible for DMX updates