Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU Temperature reported "unknown" in Homeassistant #158

Open
dado991 opened this issue Nov 18, 2024 · 5 comments
Open

CPU Temperature reported "unknown" in Homeassistant #158

dado991 opened this issue Nov 18, 2024 · 5 comments

Comments

@dado991
Copy link

dado991 commented Nov 18, 2024

output of rpi-mqtt-monitor -d

output:

:: rpi-mqtt-monitor
   Version: 0.11.0-4-g0490991

:: Device Information
   Model Name:  Intel(R) N100
   Manufacturer:  GenuineIntel
   OS: Debian GNU/Linux 12 (bookworm)
   Hostname: proxmox
   IP Address: 10.27.0.25
   MAC Address: D8-43-AE-92-E9-22
   Update Check Interval: 3600 seconds

:: Measured values
   CPU Load: 0.0 %
   CPU Temp: 34.05
34.00 °C
   Used Space: 9 %
   Voltage: False V
   CPU Clock Speed: False MHz
   Swap: False %
   Memory: 8 %
   Uptime: 0 days
   Wifi Signal: False %
   Wifi Signal dBm: False
   RPI5 Fan Speed: False RPM
   RPI Power Status: False
   Update: {"installed_ver": "0.11.0-4-g0490991", "new_ver": "0.11.0"}
   External Sensors: False

:: Installation directory:
   /root/rpi-mqtt-monitor/src

:: Release notes 0.11.0:
### What's Changed

* External sensors by @pallago in #153

sensor view in homeassistant:
Screenshot_18-11-2024_91637_ha ldhome it

mqtt topic:
image

The CPU Sensor is reported as "unknown"

@hjelev
Copy link
Owner

hjelev commented Nov 18, 2024

pls show me the output of these 2 commands uptime and nproc

@dado991
Copy link
Author

dado991 commented Nov 18, 2024

Uptime (rebooted few second ago):
17:13:06 up 0 min, 1 user, load average: 0.17, 0.06, 0.02

nproc:
4

this is the model of minipc -> https://it.msi.com/Business-Productivity-PC/Cubi-N-ADL

@hjelev
Copy link
Owner

hjelev commented Dec 1, 2024

most probably you need to adjust the cpu_thermal_zone configuration found in config.py, try replacing cpu with x86
If this don't help run this command and provide me the output (last time I asked for wrong commands)

for zone in /sys/class/thermal/thermal_zone*/; do
    type=$(cat "${zone}type")
    temp=$(awk '{printf ("%.2f\n", $1/1000); }' "${zone}temp")
    echo "Thermal Zone: $type, Temperature: $temp°C"
done

@smeegoan
Copy link

smeegoan commented Dec 9, 2024

Hi, I am not the original poster but I also get the same missing cpu temperature information issue on Proxmox.

If it helps this is the way to get the temperature on my system

root@pve:/home/rpi-mqtt-monitor# for zone in /sys/class/hwmon/hwmon*/ ; do
        echo $zone
    type=$(cat "${zone}name")
    temp=$(awk '{printf ("%.2f\n", $1/1000); }' "${zone}temp1_input")
    echo "Thermal Zone: $type, Temperature: $temp°C"
done
/sys/class/hwmon/hwmon0/
Thermal Zone: nvme, Temperature: 53.85°C
/sys/class/hwmon/hwmon1/
Thermal Zone: k10temp, Temperature: 69.12°C
/sys/class/hwmon/hwmon2/
awk: read error (No data available)
Thermal Zone: iwlwifi_1, Temperature: °C
/sys/class/hwmon/hwmon3/
Thermal Zone: amdgpu, Temperature: 57.00°C
root@pve:/home/rpi-mqtt-monitor# 

@hjelev
Copy link
Owner

hjelev commented Dec 9, 2024

@smeegoan change in config.py cpu_thermal_zone = 'cpu' to cpu_thermal_zone = 'k10temp'
You can also track your nvme temperature if you enable drive_temps = True
Looking at the posted output I can also create a gpu temp sensor.
Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants