oshi: Sensors (temperature, fan speeds, voltage) don't return values on RPi2
I am using OSHI with Systeminfo binding for openHAB2. My Setup of openHAB2 framework is on a RPi2 with raspian operating system. The OSHI library returns no values for Sensors (temperature, fan speeds, voltage) - fan speed is obvious because my RPi2 has no fan.
It is possible to read those values on my raspbian with the following two shell commands. I am really sure that they can be read somehow by the OSHI library too.
pi@raspberry-openhab:~ $ vcgencmd measure_temp
temp=37.9'C
and
pi@raspberry-openhab:~ $ vcgencmd measure_volts
volt=1.3125V
More info can be found here: RPI vcgencmd usage.
Some further research shows that cpu temperature can be found in this file:
pi@raspberry-openhab:~ $ cat /sys/class/thermal/thermal_zone0/temp
37932
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 17 (14 by maintainers)
We merged a solution for reading the CPU temperature on Linux devices. We updated the oshi version of the systeminfo binding to 3.4.3 afterwards. This version includes the new feature (See https://github.com/openhab/openhab2-addons/pull/2449). This version is available in the OH2 snapshot.
It looks like we merge the temperature but not the other sensors, so if you can submit a PR for those it would be great.