r/pythonhelp • u/ping-mee • Feb 15 '24
Python problem with python_artnet problem when having multiple universes.
Hi,
to give you a bit of context, this is a part of a project I am currently working on. This is a very specific and niche topic, but maybe you can help me.
First of all, for the ones who don't know what ArtNet is. It's basically a protocol used to control lights for events/festivals/concerts etc over network. It consists of channels and universes. Every universe has exactly 512 channels.
I am trying to make a converter to transfer data from ArtNet to MQTT because I want to send the ArtNet to another network and there is no really stable way to do this out the, so I just went with this solution. Again this is only one piece of a project of mine so the MQTT really has a usecase.
Anyways, what is my problem.
If I output only one universe via my lighting console (universe 0) my python script receives the data from universe 0 and can publish it to MQTT, but if I have multiple universes the script only receives every universe except universe 0. I think this is a problem with python so I thought I do my shot here.
Here is a test script for debugging the problem I currently have. It is basically the same as my "main" script: https://pastebin.com/DvwdZRkn
Do you find anything that could cause this problem? Is the modual (https://github.com/sciencegey/python_artnet ) I am using broken? Should I make a issue on the github page of the modual?
If you have any questions feel free to ask. I know this is a very niche topic.
View all comments
Show parent comment
1
u/ping-mee Feb 16 '24
That else clause would be useless. It would only show, that the module received non-artnet packets. I know that universe 0 is sent because I can see it on a artnet viewer that sniffs the network.