fixed a but in memory reporting

This commit is contained in:
Hristo Jelev
2020-04-29 00:23:15 +03:00
parent f4f404f0c9
commit aea451e228
2 changed files with 14 additions and 3 deletions

View File

@@ -79,9 +79,10 @@ def publish_to_mqtt (cpu_load, cpu_temp, used_space, voltage, sys_clock_speed, s
time.sleep(1)
client.publish(mqtt_topic_prefix+"/"+hostname+"/swap", swap, qos=1)
time.sleep(1)
client.publish(mqtt_topic_prefix+"/"+hostname+"/swap", memory, qos=1)
client.publish(mqtt_topic_prefix+"/"+hostname+"/memory", memory, qos=1)
time.sleep(1)
client.publish(mqtt_topic_prefix+"/"+hostname+"/sys_clock_speed", sys_clock_speed, qos=1)
time.sleep(1)
#disconect from mqtt server
client.disconnect()