parent
1d7577159d
commit
3a48d09b5b
|
@ -119,16 +119,17 @@ def mqtt_publisher(universe, artnetPacket):
|
||||||
try:
|
try:
|
||||||
dmx_values = artnetPacket.data
|
dmx_values = artnetPacket.data
|
||||||
while True:
|
while True:
|
||||||
if artnetPacket.universe == universe:
|
if artnetPacket is not None and artnetPacket.data is not None:
|
||||||
if dmx_values is not None:
|
if artnetPacket.universe == universe:
|
||||||
dmxPacket = artnetPacket.data
|
if dmx_values is not None:
|
||||||
for i in dmx_values:
|
dmxPacket = artnetPacket.data
|
||||||
# # Create MQTT topic based on the universe and channel
|
for i in dmx_values:
|
||||||
# topic = f"{universe}/{channel}"
|
# # Create MQTT topic based on the universe and channel
|
||||||
|
# topic = f"{universe}/{channel}"
|
||||||
|
|
||||||
# # Publish the DMX value to the MQTT topic
|
# # Publish the DMX value to the MQTT topic
|
||||||
# mqtt_client.publish(topic, value)
|
# mqtt_client.publish(topic, value)
|
||||||
print(dmxPacket[i-1], end=" ")
|
print(dmxPacket[i-1], end=" ")
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error in universe {universe}: {e}")
|
print(f"Error in universe {universe}: {e}")
|
||||||
|
|
Loading…
Reference in New Issue