bkbilly/lnxlink

Raspberry Pi temperatures

globebourgeois opened this issue · 3 comments

Describe the solution you'd like

It would be great if the raspberry pi CPU and GPU temperatures could be exposed as sensors in lnxlink.

Additional context

Eg CPU temperature can be obtained with:

cat #/sys/class/thermal/thermal_zone0/temp

Eg GPU temperature can be obtained with:

/opt/vc/bin/vcgencmd measure_temp

I've added a module for creating temperature sensors from the psutil library, but also adding the GPU temperature from RaspberryPI, though I haven't tested that.
You can try it out by uninstalling LNXlink and installing it as a developer.

I've made some changes and now it works as expected.
Most likely tomorrow I'll release the next version.

I tried it for some hours and I found out that the GPU and CPU temperatures on the raspberry are about the same.
With a bit of a research I found out that there is only one temperature sensor with two different interfaces that get the current value.
Both GPU and CPU exist inside the same Broadcom Processor, so there is no need to use both interfaces.
I've removed the vcgencmd measure_temp and I left the other interface which is more generic and can be used on any OS.