ola icon indicating copy to clipboard operation
ola copied to clipboard

Python API "client.SendDmx" priority support?

Open taf-dk opened this issue 3 years ago • 3 comments

Can I somehow include the priority flag via the python API?

The reason I need it is that I would like to control the light locally via temperature probe and overwrite this with external artnet DMX input.

I guess it should be placed in the client.SendDmx(universe, data, DmxSent) function, looking at the link below.

http://docs.openlighting.org/ola/doc/latest/structola_1_1client_1_1_send_d_m_x_args.html

My code: code.txt

taf-dk avatar Feb 02 '22 15:02 taf-dk

Hi @taf-dk ,

You're right we don't currently support it: https://github.com/OpenLightingProject/ola/blob/e95de59a04c79ddd6ba745578e4183301f4b98b7/python/ola/OlaClient.py#L937-L965

I think we'd be able to add it fairly easily, but it would need a new method to deal with the extra parameter SendDmxPriority(universe, data, priority, DmxSent).

Can't you work around it though; the default priority should be followed by the Python stuff (i.e. 100), so can't you just set your Art-Net port to use a higher priority and it will override it when present?

peternewman avatar Feb 03 '22 01:02 peternewman

Hi @peternewman

Thank you for the quick reply, changing the priority for the artnet input from 100 to 110 input solved the problem for my use case.

taf-dk avatar Feb 03 '22 07:02 taf-dk

Great, glad to hear that works, I'll leave the issue open so we can add it at some point...

peternewman avatar Feb 03 '22 12:02 peternewman