[EE] DMX USB control is not working. How to debug?

edited February 2019 in EmptyEpsilon

I'm setting up a DMX lighting for Empty Epsilon running on Ubuntu 18.04

I'm using Enttec DMX USB PRO (mk1) for the USB->DMX communication, and I have verified
with OLA that the DMX device is working and output maps addresses 1-3 to my RGB led strip control,
and actually lights it up correctly.

When running Empty Epsilon with this configuration (which should light up the led strip in green):

device = EnttecDMXProDevice
port = ttyUSB4

mainLights = 2

condition = Always
target = mainLights
value = 1.0
I get this on the log (hardware.ini is symlinked to ~/.emptyepsilon/hardware.ini ):

[INFO] /usr/local/share/emptyepsilon/hardware.ini not found. Not controlling external hardware.
[INFO] New hardware device: EnttecDMXProDevice with: 512 channels
[INFO] Channel #2: 2
[INFO] Hardware subsystem initialized with: 512 channels
But nothing happens on the leds and I get no errors on the log.
Where should I start looking for more clues on why this is not working?

The device is on the /dev/ttyUSB4 , I verified it from the dmesg log.
I have shut down the OLAD daemon so it should not be pushing control values to the DMX.


  • This could be a EE linux related issue, or a EnttecDMXPro implementation not working. The device is write only, so there is no error reporting. Also, the protocol was reverse engineered and never tested in EE, as I don't have the hardware.

    You could try, "stty -F /dev/ttyUSB4 raw" before running EE, to see if EE forgets to change some serial settings that are relevant.
  • I figured out the issue: Empty Epsilon run as my non-privileged user
    is not allowed to access /dev/ttyUSBX.
    Running EE with sudo fixes this one.

    I'm currently working on how to get my non-privileged user the
    privileges to use the ttyUSB device. Currently most promising route seems to be using udev rules to set the controlling group to something else than default 'dialout'.

    What to do before Empty Epsilon DMX will work?
    ###Check which device the Enttec converter is set to:
    `dmesg|grep USB`

    ###Set this in the hardware.ini
    Without the /dev/ prefix.

    Also set up a Condition=Always test rule with correct DMX channel and easily verifiable control value.

    ###Test if it works using root privileges
    `sudo EmptyEpsilon` and start server and client.
    Your Always-rule should trigger and DMX device channel should get set to given value.

    ###Configure the device type ownership
    OLAD seems to run with root privileges or with access to `dialout` group, which you will notice
    the /dev/ttyUSB[0-9] belongs to, by running `ls -l /dev/ttyUSB[0-9]`.

    Empty Epsilon is run using your user privileges, which do not include that group.
    Ubuntu does not seem to allow adding users to `dialout` group, so we need to configure `udev` to
    set the device type ownership to something we can control.

    ###Configure udev rule
    To see what kinds of values you can match with udev rules, you should check out
    `sudo udevadm info --attribute-walk --path=/sys/bus/usb-serial/devices/ttyUSB0`
    where ttyUSB0 should also be replaced with whatever number your ttyUSB device was set to.

    Add the following to `/etc/udev/rules.d/99-ttyusb.rules` (which you may have to create):
    `KERNEL=="ttyUSB[0-9]*", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{manufacturer}=="ENTTEC", GROUP="ftdiusbserial", MODE="0660", SYMLINK="ttyUSBEnttec"`

    For me, running `ls -l /dev/ttyUSB*` shows correct group and symlink by name `/dev/ttyUSBEnttec` pointing to it.

    I can now use "ttyUSBEnttec" in my hardware.ini and regardless of which ttyUSBX the Enttec device is mapped to, EE always sees it by its symlink.
    Unfortunately that ftdiusbserial-group access still does not let my non-privileged user to use the device, and I've only verified this as root so far. At least we know the Ubuntu 18.04, Enttec DMX USB Pro (mk1) and Empty Epsilon work together as documented, aside from having to run as root.

    Any tips on how to fix this are greatly appreciated.
  • It would probably be better to chmod or chown the device node to allow normal users to access it than to run EE as root.
  • I've added users to the dialout group in ubuntu. So I'm sure that works.

    sudo adduser "username" dialout
Sign In or Register to comment.