Skip to content

Commit

Permalink
added add debugs
Browse files Browse the repository at this point in the history
  • Loading branch information
EricAndrechek committed Apr 11, 2024
1 parent 05222bb commit 91346ac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tracking-dashboard/backend/mqtt-syncer.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ def on_message(client, userdata, message):
if key in old_messages[id] and src['data']['telemetry'][key] == old_messages[id][key]:
continue
client.publish(topic + "/" + key, json.dumps(src['data']['telemetry'][key]), retain=True, qos=0)
print("Sent telemetry data to mqtt: ", topic + "/" + key, src['data']['telemetry'][key])
message_building[id]['ss'] = payload
return

Expand Down Expand Up @@ -227,6 +228,7 @@ def on_message(client, userdata, message):
# send telemetry data to mqtt
topic = "TELEMETRY/" + message_building[id]['name'] + "-" + str(message_building[id]['ssid'])
client.publish(topic + "/" + key, json.dumps(payload), retain=True, qos=0)
print("Sent telemetry data to mqtt: ", topic + "/" + key, payload)
try:
old_messages[id][key] = payload
except:
Expand Down

0 comments on commit 91346ac

Please sign in to comment.