mqtt
parent
9f24b72c5f
commit
a35c542fa8
|
@ -195,7 +195,12 @@ class meas_data:
|
|||
if (len(self.mqtt_topic)>0) and self.mqtt_bool:
|
||||
print(self.mqtt_topic)
|
||||
print(self.mqtt_broker)
|
||||
publish.single(self.mqtt_topic,self.value,hostname=self.mqtt_broker,port=self.mqtt_port)
|
||||
print(self.value)
|
||||
print(self.mqtt_port)
|
||||
try:
|
||||
publish.single(self.mqtt_topic,self.value,hostname=self.mqtt_broker,port=self.mqtt_port)
|
||||
except:
|
||||
print("could not send mqtt")
|
||||
|
||||
|
||||
#test=meas_data("temp",5)
|
||||
|
|
Loading…
Reference in New Issue