It would be really nice if we could read the temperatures from any RPi that RaspberryIO is running on. It seems that this should be relatively easy to include into the existing plugin. I would suggest that if you add this you also allow the user to specify either degrees F or C.
Reading temps is quite easy especially from the bash level but it's also easy to read directly from the hardware. Here is an example of the code to read the temps at the bash level.
For now I'm using MQTT to read this but for most users it would be much simpler to be able to get it through RaspberryIO if they are already using it.
Reading temps is quite easy especially from the bash level but it's also easy to read directly from the hardware. Here is an example of the code to read the temps at the bash level.
Code:
#!/bin/bash gpu=$(/opt/vc/bin/vcgencmd measure_temp | awk -F "[=\']" '{print $2}') cpu=$(</sys/class/thermal/thermal_zone0/temp) cpu=$(echo "$cpu / 100 * 0.1" | bc) cpuf=$(echo "(1.8 * $cpu) + 32" |bc) gpuf=$(echo "(1.8 * $gpu) + 32" |bc) echo "$(date) @ $(hostname)" echo "-------------------------------------------" echo "GPU => $gpu'C ($gpuf'F)" echo "CPU => $cpu'C ($cpuf'F)"
Comment