Created
October 11, 2015 14:15
-
-
Save ah01/449628a68d0a5ab4cfd5 to your computer and use it in GitHub Desktop.
Send CPU temperature to MQTT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while true | |
do | |
t=$(cat /sys/class/thermal/thermal_zone0/temp) | |
t=$(($t/1000)) | |
echo Teplota CPU $t | |
mosquitto_pub -h mqtt.sh.cvut.cz -t linuxdays/raspberry/temperature -m "$t °C" | |
sleep 5 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment