DMX USB Interface
in EmptyEpsilon
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
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.
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.
[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
[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?
[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
My problem was that I needed to use the Entec protocol instead of DMX512. AND IT WORKS!
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.
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
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.
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?
Should work then.
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.
See https://www.downtowndougbrown.com/2013/11/linux-custom-serial-baud-rates/