danesparza / fxdmx

:record_button: REST service for DMX fixture control from Raspberry Pi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fxdmx CircleCI

REST service for DMX fixture control from Raspberry Pi.

Control lights, fog machines, relays ... even flame throwers!

Made with ❤️ for makers, DIY craftsmen, prop makers and professional soundstage designers everywhere

Prerequisites

There are no other software prerequisites, but you'll need to make sure you have a USB DMX controller. I recommend the DMXking ultraDMX micro -- also available at Amazon. You should probably also pick up a few lights and at least 1 3 prong DMX cable.

Installing

Installing fxdmx is also really simple. Grab the .deb file from the latest release and then install it using dpkg:

sudo dpkg -i fxdmx-1.0.40_armhf.deb 

This automatically installs the fxdmx service with a default configuration and starts the service.

You can then use the service at http://localhost:3040

See the REST API documentation at http://localhost:3040/v1/swagger/

Setup

After plugging in your hardware, there is one very simple setup step you should probably do: Setting the default serial USB device. You can see all the USB serial devices installed by using the REST service call /v1/system/usbinfo. On my test Raspberry Pi, here's what this looks like when I run curl:

Request:

curl -X GET "http://localhost:3040/v1/system/usbinfo" -H  "accept: application/json"

Response:

{
  "message": "1 devices found",
  "data": [
    {
      "device": "/dev/ttyUSB0",
      "product": "DMX USB PRO",
      "manufacturer": "DMXking.com"
    }
  ]
}

Notice that 'device' property that shows a path like /dev/ttyUSB0? You'll need to take what you find there and navigate to the REST service call /v1/system/defaultusb to set the default device to use. Here's what it looks like for me using curl:

Request:

curl -X PUT "http://localhost:3040/v1/system/defaultusb" -H  "accept: application/json" -H  "Content-Type: application/json" -d "{  \"devicepath\": \"/dev/ttyUSB0\"}"

Response:

{
  "message": "Default USB device updated",
  "data": "/dev/ttyUSB0"
}

Now you can run your DMX timelines without having to set the device information every time.

Removing

Uninstalling is just as simple:

sudo dpkg -r fxdmx

About

:record_button: REST service for DMX fixture control from Raspberry Pi

License:Apache License 2.0


Languages

Language:Go 100.0%