From bf6d8c5a0ca1c6aa36bdf944fee0333440bfc119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ebbe=20Ba=C3=9F?= Date: Fri, 16 Feb 2024 00:02:51 +0100 Subject: [PATCH] added sleeper and removed print MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ebbe Baß --- server/app.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/server/app.py b/server/app.py index 30c66ad..f89e565 100644 --- a/server/app.py +++ b/server/app.py @@ -83,7 +83,7 @@ def get_assigned_params(tube_unique_id): return jsonify({'success': False, 'message': f'Error: {e}'}) def flask_api(): - app.run(host='0.0.0.0', port=5000) + app.run(host='192.168.0.1', port=5000) def get_eth0_ip(): try: @@ -124,15 +124,14 @@ def start_mqtt_publishers(): dmxPacket = artNetPacket.data for i in range(512): try: - print(str(i)) - print(str(artNetPacket.universe)) # Create MQTT topic based on the universe and channel topic = f"{str(artNetPacket.universe)}/{str(i)}" # Publish the DMX value to the MQTT topic mqtt_client.publish(topic, str(dmxPacket[i-1])) except KeyboardInterrupt: - break + break + time.sleep(0.01) except Exception as e: print(e) except KeyboardInterrupt: