OpenLightingProject / ola

The Open Lighting Architecture - The Travel Adaptor for the Lighting Industry
https://www.openlighting.org/ola/
Other
643 stars 204 forks source link

Enttec Dmx Pro Usb only work with opened DMX-Console #1811

Open lehmanns54 opened 1 year ago

lehmanns54 commented 1 year ago

I´m trying to use the Python API to control my DMX-Lighting over an RaspberryPi with the Enttec Dmx Pro Usb. My problem: I´ve red on a few other sources that i need to send frames instead of one dmx data one time. So i used the exact same code as the example code from the website for multiple frames. Everytime my web browser and the DMX-Console is opened, my light increases the dmx signal perfectly with every tick and gets brighter. Badly everytime i close the DMX-Console, my light goes out and do nothing if i try to run the code. Any idea to fix this? Sorry for bothering, maybe it´s an easy one but i tried for hours now and need help Thanks for looking at it!

peternewman commented 1 year ago

I´m trying to use the Python API to control my DMX-Lighting over an RaspberryPi with the Enttec Dmx Pro Usb. My problem: I´ve red on a few other sources that i need to send frames instead of one dmx data one time.

That shouldn't be the case for a DMX Pro USB (but would be for an Open DMX USB), as it's got it's own microcontroller. If you send a frame once the micro will keep repeating it at the desired frame rate. Is it a genuine DMX USB Pro (which version/Mk?) or a clone?

So i used the exact same code as the example code from the website for multiple frames.

Just to confirm, do you mean this code?: https://www.openlighting.org/ola/developer-documentation/python-api/#Sending_Multiple_Frames

Everytime my web browser and the DMX-Console is opened, my light increases the dmx signal perfectly with every tick and gets brighter. Badly everytime i close the DMX-Console, my light goes out and do nothing if i try to run the code.

So the web browser console re-transmits the frames which is probably the reason it's "fixing" it for you. If we can get to the bottom of what's going wrong we should be able to fix it.

Any idea to fix this? Sorry for bothering, maybe it´s an easy one but i tried for hours now and need help Thanks for looking at it!

Can you try using ola_dmxconsole or ola_set_dmx on the command line and see how they behave?

Do you only have one light/one type/from one manufacturer?

Can you use ola_usbpro and it's --get-params to check the timing the device is configured for: http://docs.openlighting.org/ola/man/man1/ola_usbpro.1.html

lehmanns54 commented 1 year ago

That shouldn't be the case for a DMX Pro USB (but would be for an Open DMX USB), as it's got it's own microcontroller. If you send a frame once the micro will keep repeating it at the desired frame rate. Is it a genuine DMX USB Pro (which version/Mk?) or a clone?

It´s just the normal version, not the mk and original, not a clone.

Just to confirm, do you mean this code?: https://www.openlighting.org/ola/developer-documentation/python-api/#Sending_Multiple_Frames

Yes, exactly this code

Can you try using ola_dmxconsole or ola_set_dmx on the command line and see how they behave?

It´s the same issue. If i set the dmx with ola_set_dmx in the terminal on my Raspi, nothing happens until i open the DMX-Console in the browser. Then light accepts the dmx-data i´ve set in the terminal

Do you only have one light/one type/from one manufacturer?

Yes i only attached one light at the moment

Can you use ola_usbpro and it's --get-params to check the timing the device is configured for: http://docs.openlighting.org/ola/man/man1/ola_usbpro.1.html

Device: 1 Firmware: 2.4 Break Time: 96.03us MAB Time: 10.67us Packet Rate: 40 packets/sec

This are the params

lehmanns54 commented 1 year ago

Any idea?

eshkrab commented 1 year ago

I'm having the same problem with both Enttec Pro MKII (using usbserial plugin) and a random FTDI USB to DMX cable (using ftdi plugin). I'm on an OrangePi Zero 2, running Armbian (the Debian Bullseye flavor). Have tried setting different update frequencies without any results.

Am still troubleshooting but using the Enttec to listen to DMX output from OLA via Touchdesigner on my Mac, the output from OLA seems to be working correctly. I'm seeing values set by ola_set_dmx and the python API (haven't tested cpp yet) just fine.

I'm using a pretty standard DMX512 32 channel decoder but looks like that's part of the problem. I'll update if I get to the bottom of this.

ETA: Using a different DMX decoder works without issues, meanwhile using Enttec Pro from my Mac with OLA with the not-working decoder has the same issue of only working with the DMX Console. Touchdesigner is also able to drive the original decoder without a problem, so I assume it's some kind of difference in timing issue. I'll probably just use a different decoder but it's definitely an interesting issue

terminal27 commented 1 year ago

Hi, It seems I opened an issue same as here, but with Velleman USB device.. @lehmanns54 did you manage to find the root of the issue? Thank you in advance,

terminal27 commented 1 year ago

OK, finally found the answer. My device has 14 channels but expect to received 512 address settings otherwise doesn't know what to do with the rest. So I did fill in with zeros:

import os import time

i = 0 n = 10 while i<n: m=0 p=502 myStr = '120,60,0,0,0,0,255,255,30,0' #these are the 10 useful channels for location, colour, intensity, etc while m < p: myStr = myStr + ',0' m += 1 os.system('ola_streaming_client -u 1 -d ' + myStr) time.sleep(1) #to have the device on for 10 seconds approx at that specific location and set. print(i) i += 1 q = 0 r = 511 myStr2 = '0' while q < r: q += 1 myStr2 = myStr2 + ',0' os.system('ola_streaming_client -u 1 -d ' + myStr2) #to blank out send 512 time zeros

and now it works. I run the cmd 'ola_streaming_client' within my python script for other coding.