parent
382d2c94dd
commit
7b264c26bd
|
@ -129,24 +129,21 @@ def start_mqtt_publishers(universe_count):
|
||||||
artNetPacket = artNet.readPacket()
|
artNetPacket = artNet.readPacket()
|
||||||
# Make sure we actually *have* a packet
|
# Make sure we actually *have* a packet
|
||||||
if artNetPacket is not None and artNetPacket.data is not None:
|
if artNetPacket is not None and artNetPacket.data is not None:
|
||||||
print(artNetPacket.universe)
|
#Checks to see if the current packet is for the specified DMX Universe
|
||||||
# Checks to see if the current packet is for the specified DMX Universe
|
if artNetPacket.universe in universe_list:
|
||||||
# if artNetPacket.universe in universe_list:
|
dmxPacket = artNetPacket.data
|
||||||
# print(3)
|
# channel = 1
|
||||||
# dmxPacket = artNetPacket.data
|
# for value in artNetPacket.data:
|
||||||
# print(4)
|
# # Create MQTT topic based on the universe and channel
|
||||||
# # channel = 1
|
# topic = f"{str(artNetPacket.universe)}/{str(channel)}"
|
||||||
# # for value in artNetPacket.data:
|
|
||||||
# # # Create MQTT topic based on the universe and channel
|
|
||||||
# # topic = f"{str(artNetPacket.universe)}/{str(channel)}"
|
|
||||||
|
|
||||||
# # # Publish the DMX value to the MQTT topic
|
# # Publish the DMX value to the MQTT topic
|
||||||
# # mqtt_client.publish(topic, str(value))
|
# mqtt_client.publish(topic, str(value))
|
||||||
# # channel + 1
|
# channel + 1
|
||||||
# for i in range(512):
|
for i in range(512):
|
||||||
# # Lists in python start at 0,
|
# Lists in python start at 0,
|
||||||
# print(dmxPacket[i-1], end=" ")
|
print(dmxPacket[i-1], end=" ")
|
||||||
# print(5)
|
print(5)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error in universes {universe_list}: {e}")
|
print(f"Error in universes {universe_list}: {e}")
|
||||||
|
|
Loading…
Reference in New Issue