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
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 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/
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.
Uninstalling is just as simple:
sudo dpkg -r fxdmx