parent
c4e662ee94
commit
caf26b9a7f
|
@ -118,6 +118,7 @@ def mqtt_publisher(universe, artnetPacket):
|
||||||
mqtt_client = connect_mqtt()
|
mqtt_client = connect_mqtt()
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
|
try:
|
||||||
if artnetPacket is not None and artnetPacket.data is not None:
|
if artnetPacket is not None and artnetPacket.data is not None:
|
||||||
if artnetPacket.universe == universe:
|
if artnetPacket.universe == universe:
|
||||||
dmxPacket = artnetPacket.data
|
dmxPacket = artnetPacket.data
|
||||||
|
@ -129,7 +130,8 @@ def mqtt_publisher(universe, artnetPacket):
|
||||||
# # 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 KeyboardInterrupt:
|
||||||
|
break
|
||||||
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