DMX USB Interface

Hello, I decided to pursue connecting Empty Epsilon to external lighting using DMX. I purchased a Lixada Freestyler USB to DMX512 interface and successfully installed uDMX drivers in Windows 10. I have tested using QLC+ and can talk to lights just fine. I am having trouble determining what COM port to define in the hardware.ini for EE. I assume I can use the "DMX512SerialDevice"? Please help. Thanks Kyle

Comments

  • A few other notes on this. I have looked at the EmptyEpsilon text file and it states after running the game "hardware.ini not found. Not controlling external hardware." But I made the hardware.ini file and placed it in the same directory as the emptyepsilon executable. What am I doing wrong?
  • On windows, make sure there isn't a hidden extension.

    For uDMX, there is a different device type you need to use, "uDMXDevice" instead of "DMX512SerialDevice". But this has never been tested with real hardware. So no idea if it works.
  • Thank you. But I discovered the game won't even detect hardware.ini. So even when trying to use diagnostic mode it doesn't work at all. :(
  • Well, it tries to read the hardware.ini from the current working directory, which is generally the directory where the exe is located, but if you run it differently, this could change.
  • I have put the hardware.ini in many folders. All of them. It still doesn't detect it. I don't understand why. Is it possible that it is being used but the log will still say that it is not found? Do you happen to have a screenshot of what it looks like when the debug is working in-game for the DMX commands in hardware.ini?
  • The code that logs this is really easy:
    https://github.com/daid/EmptyEpsilon/blob/master/src/hardware/hardwareController.cpp#L34

    But I just noticed this:
    https://github.com/daid/EmptyEpsilon/blob/master/src/main.cpp#L268

    Could be that it needs to be in your home directory.
  • I made some directories and named them "home" and put hardware.ini in all of them. I can't figure it out. I can't make a directory named ".emptyepsilon" in windows. I re-downloaded the installer and unzipped everything to a new directory and tried it again and still nothing. I don't know what else to try.
  • Ok I screwed up and had the file name wrong. Fixed that. Debug use works great. Now when I'm trying to get my USB to DMX dongle working I find these lines in the emptyepsilon.txt after trying:

    [ERROR] Failed to open registry key for serial port list.
    [WARN] Failed to open: COM3
    [ERROR] Failed to open port: COM3 for DMX512SerialDevice
    [ERROR] Failed to configure device: DMX512SerialDevice
  • edited October 2018
    What is the parameter of the USB device in Windows that I can use for the "port" setting. I saw the example for Arduino. In this case it is a USB to DMX and has a USB port but I have no idea how to confirm what COM channel it is set to.
  • Further update: I got it to respond. I am using the ilutzmination uDMX driver. I dumped it into my game directory even though it was already in the windows/system32 directory. I got a pulse. But my log says:

    [ERROR] uDMX.dll reported device is not connected.
    [ERROR] But resuming to use it anyhow.
    [INFO] New hardware device: uDMXDevice with: 512 channels
    [INFO] Channel #8, 9, 10, 11, 12, 13, 14: 8
    [INFO] Channel #8, 9, 10, 11, 12, 13, 14: 9
    [INFO] Channel #8, 9, 10, 11, 12, 13, 14: 10
    [INFO] Channel #8, 9, 10, 11, 12, 13, 14: 11
    [INFO] Channel #8, 9, 10, 11, 12, 13, 14: 12
    [INFO] Channel #8, 9, 10, 11, 12, 13, 14: 13
    [INFO] Channel #8, 9, 10, 11, 12, 13, 14: 14
    [INFO] Channel #1, 2, 3, 4, 5, 6, 7: 1
    [INFO] Channel #1, 2, 3, 4, 5, 6, 7: 2
    [INFO] Channel #1, 2, 3, 4, 5, 6, 7: 3
    [INFO] Channel #1, 2, 3, 4, 5, 6, 7: 4
    [INFO] Channel #1, 2, 3, 4, 5, 6, 7: 5
    [INFO] Channel #1, 2, 3, 4, 5, 6, 7: 6
    [INFO] Channel #1, 2, 3, 4, 5, 6, 7: 7
    [INFO] Hardware subsystem initialized with: 512 channels

    What am I doing wrong?
  • edited October 2018
    Ok update again, A little stumped. I have the new DMXking usb to dmx dongle. It works great using their diagnostic software. I find COM4. When I launch a server I do not get any light activity ever. This is what the log says. From what I read it acts like everything is fine but I never get any lights turning on. Any ideas?


    [INFO] New hardware device: DMX512SerialDevice with: 512 channels
    [INFO] Channel #8, 9, 10, 11, 12, 13, 14: 8
    [INFO] Channel #8, 9, 10, 11, 12, 13, 14: 9
    [INFO] Channel #8, 9, 10, 11, 12, 13, 14: 10
    [INFO] Channel #8, 9, 10, 11, 12, 13, 14: 11
    [INFO] Channel #8, 9, 10, 11, 12, 13, 14: 12
    [INFO] Channel #8, 9, 10, 11, 12, 13, 14: 13
    [INFO] Channel #8, 9, 10, 11, 12, 13, 14: 14
    [INFO] Channel #1, 2, 3, 4, 5, 6, 7: 1
    [INFO] Channel #1, 2, 3, 4, 5, 6, 7: 2
    [INFO] Channel #1, 2, 3, 4, 5, 6, 7: 3
    [INFO] Channel #1, 2, 3, 4, 5, 6, 7: 4
    [INFO] Channel #1, 2, 3, 4, 5, 6, 7: 5
    [INFO] Channel #1, 2, 3, 4, 5, 6, 7: 6
    [INFO] Channel #1, 2, 3, 4, 5, 6, 7: 7
    [INFO] Hardware subsystem initialized with: 512 channels

    Thanks,

    Kyle
  • Another update HOLY CRAP I GOT IT TO WORK!

    My problem was that I needed to use the Entec protocol instead of DMX512. AND IT WORKS!
  • And... that verifies that the Entec protocol implementation works :-) that was never really tested.
  • (Note that DMX512 is fire and forget, so that's why you are not getting feedback that it was not working. It's send only, there is no confirm of the data)
  • YES thank you! It is really a great enhancement to the experience to implement this. I am using a DMXking usb to DMX dongle and it works wonderfully. I need to learn more of the options available. For example I thought I read somewhere how to keep the lights on when you board the ship. Right now the lights come on under condition hasship == 0 but they turn off once you spawn a server. Is there a way to keep "house lights" on when no other activity is happening? Stuff like that. I was able to implement a glow effect for both red and yellow alerts, which is freaking awesome (and similar to the effect on TNG bridge)

    I've decided to stay away from strobe effects as that doesn't really emulate the bridge environment. I might keep them when we are being fired upon etc for very brief events.

    I am trying to hack a "dumb" fog machine to give it DMX controls. Haven't found good documentation on the internet so far about this. Surprising. The cheapest DMX fog machines start around $200 USD. I want to implement fog events when the hull is getting hit.

    Thanks again for all the effort you have put into this game daid, it is really enjoyable and so noteworthy that you made something better than the commercially available equivalent. I hope that more programmer savvy enthusiasts keep the development going. I have a 7 and 10 year old so I know what you mean about priorities shifting and having less time/willpower to work on projects.

  • > Is there a way to keep "house lights" on when no other activity is happening?
    https://github.com/daid/EmptyEpsilon/wiki/DMX-Configuration
    Use the "always" condition. As this is always true, it will set the state of the lights, unless something later in the file overrules it by being true.


    Example, the following config will turn the lights on, always, unless the shields are up, then the lights are at 50%.

    [state]
    condition = Always
    target = main_light
    value = 1

    [state]
    condition = ShieldsUp
    target = main_light
    value = 0.5
  • I've tried hooking up a smoke machine to a relay and a low hull state. It works, but I also have an electrical engineering background, so I don't fear the voltages involved.

    The smoke machine I used has 2 inputs, main power and a trigger. The main power heats up the fluid, and the trigger ejected the smoke. But if I just kept it powered, smoke would still leak out of it. And if I didn't power it, then the smoke wouldn't be in smoke form when the hull was damaged.
  • Hi...

    Hope you do not mind me asking a few questions tagging onto the end of this thread....

    Is the "Lixada Freestyler USB to DMX512 interface" this thing? https://smile.amazon.com/gp/product/B074RG9P9Q/

    I guess it probably is. Anyway, I have bought one, trying to get DMX working with SNIS, along with some cheapo par lights and dmx cable (the stuff mentioned in this thread: https://artemis.forumchitchat.com/post/easy-plug-play-dmx-28-10051243 )

    I noticed above, the "entec protocol" was mentioned, which I gather has a different start code and end code than DMX512... like so: https://github.com/daid/EmptyEpsilon/blob/master/src/hardware/devices/enttecDMXProDevice.cpp#L69

    So I am fiddling around with this stuff, and so far have not got anything it to work (but to be fair, what I am fiddling with is my own code that isn't known to work.)

    Does anyone know if this particular combo of hardware works with EmptyEpsilon on linux?
  • That device looks like a usual usb to serial+level shifter. So the https://github.com/daid/EmptyEpsilon/blob/master/src/hardware/devices/dmx512SerialDevice.cpp
    Should work then.
  • This device works for windows, but I never succeed to make it work with linux.
  • edited October 2019
    Thanks el.tito... I am beginning to suspect it doesn't work for linux, but I might be wrong. I have a github issue where I'm recording what I find: https://github.com/smcameron/space-nerds-in-space/issues/232

    daid: Yes, I would have thought so too, but kyle's comment indicating he finally got it working using the enttec protocol and his description of his device as "Lixada Freestyler USB to DMX512 interface" made me think perhaps I might have similar luck.

    There is a linux driver, however it is just the usual usbserial driver (ftdi_sio). I think it does not support changing the baud rate (TCGETS2, TCSETS2 return "inappropriate ioctl for device") and I think the default might be 9600 (read in some random documentation). There exist (very old, obsolete) open source linux drivers that are meant to replace the normal usbserial driver for DMX purposes, e.g. here, and here. The fact that these exist, and some of the things it says here begin to make me suspect that the normal linux usbserial driver ftdi_sio is unsuitable for DMX with this device. OLA lists some devices; this one is not among them.
  • edited October 2019
    Oh. If you get tcgets2 errors, then you need some legacy ioctls to change te baudrate. I thought all drivers used the new interface now.

    See https://www.downtowndougbrown.com/2013/11/linux-custom-serial-baud-rates/
Sign In or Register to comment.