master
ademant 2019-07-02 16:58:34 +02:00
parent 9f24b72c5f
commit a35c542fa8
1 changed files with 6 additions and 1 deletions

View File

@ -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)