diff --git a/README.md b/README.md index 33aa399..72ffa70 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ # Rapsberry Pi MQTT monitor -Python 2 script to check cpu load, cpu temperature and free space, +Python 2 script to check cpu load, cpu temperature, free space, voltage and system clock speed on a Raspberry Pi computer and publish the data to a MQTT server. +I wrote this so I can monitor my raspberries at home with home assistant. The script is writen for python 2 +as when I wrote it one of the used python modules was not available for python 3. (if the modules are available for python 3 now the script shuold have no problems running on python 3 - plan to check that in the near feature) + # Installation: Install these two modules needed for the script diff --git a/cpu_mqtt.py b/cpu_mqtt.py index 9072599..3cca7fb 100644 --- a/cpu_mqtt.py +++ b/cpu_mqtt.py @@ -60,6 +60,7 @@ def publish_to_mqtt (cpu_load, cpu_temp, used_space, voltage, sys_clock_speed): time.sleep(1) client.publish(mqtt_topic_prefix+"/"+hostname+"/voltage", voltage, qos=1) time.sleep(1) + client.publish(mqtt_topic_prefix+"/"+hostname+"/sys_clock_speed", sys_clock_speed, qos=1) #disconect from mqtt server client.disconnect()