please
This commit is contained in:
@@ -26,7 +26,7 @@ class MQTTForwarder:
|
||||
print(f"An error occurred while forwarding from {src_topic} to {dst_topic}: {e}")
|
||||
|
||||
def __wrap_data(self, msg : str):
|
||||
print(msg)
|
||||
print(repr(msg))
|
||||
result = {}
|
||||
data = json.loads(msg)
|
||||
result["timestamp"] = int(time.time())
|
||||
@@ -34,4 +34,4 @@ class MQTTForwarder:
|
||||
result["data"] = {}
|
||||
for keys in data:
|
||||
result["data"][keys] = data[keys]
|
||||
return result
|
||||
return json.dumps(result)
|
||||
Reference in New Issue
Block a user