|
@@ -676,6 +676,9 @@ try:
|
|
|
mqttc.publish(mqtt_topic_prefix+"/"+ s_name +"/availability", "available", qos=0, retain=False)
|
|
|
mqttc.publish(mqtt_topic_prefix+"/"+ s_name +"/lastUpdate", strftime("%Y-%m-%d %H:%M:%S", localtime()), qos=0, retain=False)
|
|
|
|
|
|
+ # publish global lastUpdate for monitoring purposes
|
|
|
+ mqttc.publish(mqtt_topic_prefix+"/lastUpdate", strftime("%Y-%m-%d %H:%M:%S", localtime()), qos=0, retain=False)
|
|
|
+
|
|
|
# JSON output
|
|
|
lacrosse_json = "{\"temperature\":" + str(s_currAvgTemp) \
|
|
|
+ ", \"humidity\":" + str(s_currAvgHum) \
|