January 8, 2022

Working with the Enttec Open DMX USB Interface on Linux

If you thought linux audio was rough, hold on to your hats. I recently spent almost a full weekend reading documentation and trying to get the Open Lighting Architecture (OLA) software running on my Raspberry Pi.

As is usually the case with software engineering, the resulting solution to get everything up and running only takes a few minutes to run - hopefully this'll save you a weekend.

Setting up OLA with the Enttec Open DMX USB Interface - Linux

Working with DMX on linux is actually a little easier than you'd expect - I just had a really rough time with the current documentation out there.

That said, if you're trying to use an Enttec OPen DMX USB interface on a debian-based board like a Raspberry Pi - here's my handy-dandy script that'll get you up and running in just a few minutes.

#!/bin/bash
sudo apt-get update
sudo apt-get install -y \
   ola \
   git \
   ola-python \
   python3-pip
sudo adduser pi olad
cd /etc/ola/
sudo tee ./ola-ftdidmx.conf > /dev/null <<EOL
enabled = true
frequency = 30
EOL
sudo tee ./ola-usbserial.conf > /dev/null <<EOF
device_dir = /dev
device_prefix = ttyUSB
device_prefix = cu.usbserial-
device_prefix = ttyU
enabled = false
pro_fps_limit = 190
tri_use_raw_rdm = false
ultra_fps_limit = 40
EOF
sudo tee ./ola-opendmx.conf > /dev/null <<EOF
device = /dev/dmx0
enabled = false
EOF
sudo killall -s SIGHUP olad
sudo service restart olad
sleep 10
ola_dev_info | grep FT232R
DMX_DEVICE_NUMBER=$(ola_dev_info | grep FT232R | grep -oP '(?<=Device )(\d+)')
DMX_PORT_NUMBER=$(ola_dev_info | grep FT232R | grep -oP '(?<=port )(\d)')
DMX_UNIVERSE=0
ola_patch -d $DMX_DEVICE_NUMBER -p $DMX_PORT_NUMBER -u $DMX_UNIVERSE

If everything runs correctly; you should have a functional DMX adapter controllable through OLA. Send a few test commands:

# If you're using a standard RGB lamp, this should flash it (and a few extras connected)
ola_streaming_client -u 0 -d 255,255,255,255,255,255,255,255,255,255,255,255,

If you're using a standard RGB lamp, the above should flash it (and a few extra lights if they're connected).

And that's pretty much it. Once it's working, you can have a lot of fun with OLA; but getting it set up in the first place can be a bit of a nightmare. Best of luck!

Let's Work Together

I solve problems with DevOps, Developer Relations, IoT, and Artificial Intelligence.