This commit is contained in:
2023-08-28 20:29:25 +02:00
parent f0653b2e96
commit 562d860dc1

View File

@@ -25,6 +25,7 @@ class Mqtt2ThingBoard:
#Sent message to MQTT ThingsBoard Gateway #Sent message to MQTT ThingsBoard Gateway
def publishTelemetryMsg(self,msg): def publishTelemetryMsg(self,msg):
#TODO: USE Python SDK from Github ThingsBoard !!!!!
if not self.tb_client.is_connected: if not self.tb_client.is_connected:
ret2 = self.tb_client.connect(self.host_name,self.tb_port) ret2 = self.tb_client.connect(self.host_name,self.tb_port)
self.tb_client.publish("v1/gateway/telemetry",msg,0,True) self.tb_client.publish("v1/gateway/telemetry",msg,0,True)