Controlling dmx head light from rpi using python OLA

533 views
Skip to first unread message

Jolle Jolles

unread,
Jul 3, 2018, 11:12:55 AM7/3/18
to open-lighting
Hi, I recently bought a RS422 / RS485 Serial HAT shield for my rpi to control a dmx head light. I would like to command the light using python.  I followed the steps for setting-up the board here http://www.instructables.com/id/How-to- ... pberry-Pi/ and then followed the steps here https://www.openlighting.org/ola/linuxinstall/#Git and here https://opendmx.net/index.php/OLA_Python_API for installing ola python api, which was successful.

I am however still having trouble to command the dmx light using python. 
- I ran the "ola_universe_info.py" file in the github python examples directory. This shows:
Universe 0
- Name: Universe 0
- Merge mode: LTP
- Output ports:
- Port(id=0, universe=0, active=True, description="/dev/ttyAMA0", supports_rdm=False)
- I then ran the file: ola_send_dmx.py

in the same examples directory, making sure to change universe to 0, in line with above. (running like: python ola_send_dmx.py in terminal over ssh)
- The terminal then shows "Success!" but nothing happens with the light
- The light always shows A001 also indicating the light is connected and listening.
- I have also been able to start ola (by typing in: olad -l 3) in terminal and then trying the script again it still does not do anything.
- Going to the OLA admin in the browser I AM able to change the lights with the DMX console with my mouse
- Running the example script again (and still with the "Success!" message being displayed) the values in the DMX console do not change..

I have invested many hours to get this working but do not get any further and am lost what to do. I hope some people here have helpful expertise to help.

Many thanks,

Jolle

Peter Newman

unread,
Jul 3, 2018, 1:00:21 PM7/3/18
to open-lighting
Hi Jolle,

Starting olad before running the scripts will give you a better chance of success.

Try one of these examples, which send more than a single frame.

Also use the web monitor and/or web console to troubleshoot, as you've already partly done. The faders won't change, but DMX monitor (either on the web or CLI) should reflect the data your Python script is sending.

Jolle Jolles

unread,
Jul 7, 2018, 4:43:15 PM7/7/18
to open-lighting
Hi,

Thanks for replying to my previous msg. I have worked a couple more hours on trying to get it work but now I cannot even control the light via the OLA web interface... I have spent many days trying to control dmx from rpi (via ola) and somehow still are not able to. I really appreciate further help with this and am even willing to pay for someone to help me achieve what I want!

In short what I have:
- A rpi 2B+ with RS485 Serial HAT shield
- DMX head light with multiple channels (x,y,dimmer,color)
- DMX cable connecting DMX light with HAT shield
- OLA installed with python api
- configuration file set up with: device = /dev/ttyAMA0; enabled = true

In short what I want: run python script to send bytes to specific DMX channels of the headlight. For example, by user input, the light changes immediately to that channel and value.

It seems many people have done exactly this, especially on this forum, so I really hope someone can help.

As I said, I am happy to pay someone to make this work...

Jolle

Peter Newman

unread,
Jul 8, 2018, 8:11:28 PM7/8/18
to open-lighting
I'd suggest getting the Python to OLA bit working first, as it's probably the more crucial bit with more variation.

I'd generally favour ola_dmxmonitor over the web UI as there is less in the way to go wrong:

So assuming you've already got OLA and the OLA Python bits installed and you're connecting to the Pi via SSH (PuTTy or similar):
Open an SSH connection and run up olad (assuming it's not already running)
Use the web UI to patch the a Dummy port to the universe you want to control
Open ola_dmxmonitor with the universe you want to control
Run the python script to control the same universe
Does that work? You should see values changing on ola_dmxmonitor to match the Python script.

FWIW, if you're still having issues, I'd strongly consider a clean Raspbian install of their latest release and then just "sudo apt-get install ola ola-python" which should get you to a known good state.
Reply all
Reply to author
Forward
0 new messages