UART & Sensors
Build, push image, and notify Watchtower / build-image (push) Successful in 1m39s
Build, push image, and notify Watchtower / notify (push) Successful in 1m43s

This commit is contained in:
2026-07-23 15:50:43 +02:00
parent 1ec3ee7abf
commit 2dd664c4b4
25 changed files with 2333 additions and 71 deletions
+23
View File
@@ -0,0 +1,23 @@
try:
import ujson as json
except ImportError:
import json
def as_json(data):
"""Convert a dictionary to a JSON string."""
try:
return json.dumps(data)
except Exception as e:
print("[Payloads] Error converting to JSON:", e)
return "{}" # Return an empty JSON object on error
def mqtt_hello(id_microwave):
return as_json({
"id_microwave": id_microwave
})
def mqtt_hello_ack(id_orchestrator, id_microwave):
return as_json({
"id_microwave": id_microwave,
"id_orchestrator": id_orchestrator
})