Hi,
Recently I moved from a Pi to a Fujitsu ESPRIMO E5730 Intel Core2 Duo E8400 server, and I fould like to expose the CPU temperature. With the Pi I had the following:
# CPU temp:
- platform: command_line
name: CPU Temp
command: "cat /sys/class/thermal/thermal_zone0/temp"
unit_of_measurement: "°C"
value_template: '{{ value | multiply(0.001) | round(0) }}'
but this is not working now (file not found).
It would be nice also if I can expose CPU fan speed
Did you check whats inside this path?
/sys/class/thermal/
I assume you just need to change the path.
1 Like
> @HomeAssistant:/$ cd /sys/class/thermal/
> @HomeAssistant:/sys/class/thermal$
> @HomeAssistant:/sys/class/thermal$ ls -l
> total 0
> lrwxrwxrwx 1 root root 0 Jun 24 10:32 cooling_device0 -> ../../devices/virtual/thermal/cooling_device0
> lrwxrwxrwx 1 root root 0 Jun 24 10:32 cooling_device1 -> ../../devices/virtual/thermal/cooling_device1
> @HomeAssistant:/sys/class/thermal$ cd cooling_device0
> @HomeAssistant:/sys/class/thermal/cooling_device0$
> @HomeAssistant:/sys/class/thermal/cooling_device0$ ls -l
> total 0
> -rw-r--r-- 1 root root 4096 Jun 24 14:05 cur_state
> lrwxrwxrwx 1 root root 0 Jun 24 14:05 device -> ../../../LNXSYSTM:00/LNXCPU:00
> -r--r--r-- 1 root root 4096 Jun 24 14:05 max_state
> drwxr-xr-x 2 root root 0 Jun 24 14:05 power
> drwxr-xr-x 2 root root 0 Jun 24 14:05 stats
> lrwxrwxrwx 1 root root 0 Jun 24 10:32 subsystem -> ../../../../class/thermal
> -r--r--r-- 1 root root 4096 Jun 24 14:05 type
> -rw-r--r-- 1 root root 4096 Jun 24 10:32 uevent
Alternatively, have you looked at the glances integration? It fetches temperature and more.
1 Like
Another alternative, which I use, is the OHM integration. Its a bit slow to update, about every minute, but works OK
Did you check of the twmperature is in any of these folders/files?
do you know of a sample config to export HA server stats?
Not sure what you mean, I just installed it on my PC, chose a Port and turned on Remote Web Server in OHM and added the config to configuration.yaml
i want to monitor the temp on which HA is running … is that possible?
Yes, and lots of others like HDD, RAM, CPU load, GPU etc