OpenLightingProject / ola

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

Waveshare 2-CH RS485 HAT #1803

Open pdawcewicz opened 1 year ago

pdawcewicz commented 1 year ago

Hi.

Can I use this Rpi3B+ shield to control DMX decoder over RS485? https://www.waveshare.com/wiki/2-CH_RS485_HAT OLA is my last resort - I cannot get it to work with any other code. I've enabled OLA UART native DMX plugin, but it is missing on available ports list.

UART native DMX Config Location /etc/ola/ola-uartdmx.conf Enabled in Config File Yes Active Yes

Regards, Paweł

peternewman commented 1 year ago

Hi @pdawcewicz ,

Can you share some olad -l 4 logs please: https://www.openlighting.org/ola/get-help/ola-faq/#How_do_I_get_olad_-l_4_logs

What does your ola-uartdmx.conf look like?

Have you added new device lines into the config: http://docs.openlighting.org/ola/conf/ola-uartdmx.conf.html

It looks like they come up as /dev/ttySC0 and SC1.

You might need to independently write a little script to set those GPOs appropriately, but if that works adding that into OLA would be fairly easy too: https://github.com/waveshare/2-CH-RS485-HAT/blob/master/RaspberryPi/system_dev/python/examples/main.py

Does their loopback test work at least? https://www.waveshare.com/wiki/2-CH_RS485_HAT#Test

pdawcewicz commented 1 year ago

HI @peternewman

Thank you for your prompt reply. I admit I haven't done the loopback test, so today I have, and it turned out that it fails every time - freezes at different stages of the test, or returns errors. I've sent a request to the manufacturer, and after solving this issue, hopefully, I'll get back to your suggestions. It's good to know I can count on your support. Thanks.

By the way, ultimately I want to control my DMX decoder over Node-RED. I've noticed it includes dedicated node for OLA, so the next step after solving current issues, will be Node-RED tests.

peternewman commented 1 year ago

Thank you for your prompt reply. I admit I haven't done the loopback test, so today I have, and it turned out that it fails every time - freezes at different stages of the test, or returns errors. I've sent a request to the manufacturer, and after solving this issue, hopefully, I'll get back to your suggestions. It's good to know I can count on your support. Thanks.

No worries and sorry to hear it's not working on its own, but that probably rules out OLA at least.

By the way, ultimately I want to control my DMX decoder over Node-RED. I've noticed it includes dedicated node for OLA, so the next step after solving current issues, will be Node-RED tests.

Well the good news is that if you want you can work on the two bits independently. You can use OLA's web UI, or ola_dmxmonitor to see the data Node-RED is sending and just patch the dummy plugin in OLA for now, then you can test that's all communicating as expected. Then you can do the OLA to DMX bit independently using our UI again or ola_dmxconsole.

pdawcewicz commented 1 year ago

Good to hear that.

To be honest, my main goal is to be able to send simple DMX packets over Node-RED, and I was hoping I can achieve that without OLA, which looks like a pretty advanced solution, but I haven't found any easier way to go. I was successfully using SimpleDMX library before, when I was doing another DMX / RS485 project on Arduino, but with Rpi I haven't found anything as simple as that. My coding skills are low, that's why I decided to go with low-code solution, i.e. Node-RED.

peternewman commented 1 year ago

To be honest, my main goal is to be able to send simple DMX packets over Node-RED, and I was hoping I can achieve that without OLA, which looks like a pretty advanced solution, but I haven't found any easier way to go.

It may be advanced, but its also flexible and has lots of options (which I guess causes it to be advance). It does mean if you switch to e.g. E1.31 or Art-Net in future, you don't need to change anything at the Node-RED end. Plus from doing similar sort of stuff at work, I find the split I mentioned above very beneficial as you can prove your Node-RED code independent of the output from the device and vice-versa. SimpleDMX may be simpler, but it's harder to do the debugging in the middle.

pdawcewicz commented 1 year ago

It looks like OLA cannot set 250k baudrate to my device, which is surprising because I finally managed to run device's self loopback test, and it also works with 250k baudrate.

image

Here is my ola-uartdmx.config

image