parent
81e5fcc334
commit
c4e662ee94
|
@ -118,19 +118,17 @@ def mqtt_publisher(universe, artnetPacket):
|
||||||
mqtt_client = connect_mqtt()
|
mqtt_client = connect_mqtt()
|
||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
print(str(artnetPacket))
|
|
||||||
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
|
||||||
if dmxPacket is not None:
|
if dmxPacket is not None:
|
||||||
print(str(dmxPacket))
|
for i in len(512):
|
||||||
# for i in dmxPacket:
|
# # Create MQTT topic based on the universe and channel
|
||||||
# # # Create MQTT topic based on the universe and channel
|
# topic = f"{universe}/{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