UART communication
Build, push image, and notify Watchtower / build-image (push) Successful in 2m4s
Build, push image, and notify Watchtower / notify (push) Successful in 1m54s

This commit is contained in:
2026-07-18 17:01:25 +02:00
parent 987067aa1e
commit 4366abba69
7 changed files with 161 additions and 35 deletions
+3 -1
View File
@@ -48,6 +48,8 @@ mqtt_client = get_mqtt_client(
keepalive=config.MQTT_KEEPALIVE,
)
mqtt_client.connect()
mqtt_client.subscribe(config.MQTT_TOPIC_SENSOR, qos=config.MQTT_QOS)
print(f"Subscribed to topic: {config.MQTT_TOPIC_SENSOR}")
# --- THE CRUCIAL PAHO FIX ---
# Start Paho's internal background thread. This handles all network packets,
@@ -93,7 +95,7 @@ while True:
# Publish debug telemetry message
print("[Main Loop] Envoi d'un message de debug sur MQTT...")
response = mqtt_client.publish(
config.MQTT_TOPIC,
config.MQTT_TOPIC_COOKING,
f"Orchestrateur actif, ID: {DEVICE_ID}",
qos=config.MQTT_QOS
)