Full Hardware Monitoring - no matter the platform

I have been posting and requesting in the Discord and the Community Forums - to no avail. I have done anout a dozen installs of the Generic x86-x64 HASS OS installation 8.4 to an HP ThinClient t620 and an Intel NUC (as well as other installed ‘Supervised on Debian 11’, 'VMWare" and ‘Proxmox attempted’). It has an AMD GX-415GA 1.5 GHz quad-core CPU. When I initially got started with HA - I built out the HA “Supervised” version on a DEBIAN 11 (HA 2022.7.6) load. It seemed to work fine - Wi-Fi was detected, and it appeared that everything else did as well. I then came to realize that at some point DEBIAN 11 would be to old, and opted to put the HASS OS installation on here. Now I cannot seem to get a CPU Temp reading using the same lines as I was using for DEBIAN (in fact the HWMON folders appear to be empty on HASS OS).

The installations that I am using now are HASS OS using the ‘Generic x86-x64 install’ from here: Generic x86-64 - Home Assistant

When I was using Debian - I used these: Installing Home Assistant Supervised on Debian 11

Is there someplace in HASS OS that I can see if ‘this value’ is actually being pulled from the CPU (in the OS)? I would not think the AMD CPU would be that different from an INTEL CPU. I have another one of these HP t620 that is running pfSense (FreeBSD) and it shows me the CPU temp and other things.

I have performed a test - I made a bootable Alpine 3.15.0 (from their Standard .ISO) to a USB device and I booted with it. I then followed the path listed in the CPU_TEMP (Command Line) page Command line Sensor - Home Assistant

– this path does not exist: /sys/class/thermal/thermal_zone0/temp

but I tracked it down to the following path and file: /sys/class/hwmon/hwmon1/temp1_input

I then shut down, and removed the Alpine Linux 3.15.0 LIVE USB and booted back to the HASS OS 8.4 installation - went looking for the same data…it is not there. Why? Why would it be different?

Please assist in getting this working - being able to monitor the TEMP of a small device which is basically headless and out-of-site - is CRITICAL.

Did you try this: System Monitor - Home Assistant

Yes… That one also…no matter the platform that I am on (Debian 11 - Supevised or HASS OS) works. Gives an error in the logs.

image

I would suggest a node exporter on the machine plus a Prometheus instance on it. You can then use the RESTful integration to fetch the data from Prometheus.

I have this in my config.yaml
The template is because the output is usually something like 42303
so after the template it’s 42.3c

sensor: 
  - platform: command_line
    name: CPU Temp - rpi4
    command: "cat /sys/class/thermal/thermal_zone0/temp"
    unit_of_measurement: "°C"
    value_template: '{{ value | multiply(0.001) | round(1) }}'

Does that work if you change the cat command to…

"cat  /sys/class/hwmon/hwmon1/temp1_input"

I couldn’t test it, couldn’t find a machine with that path.

I have no idea what either of those are. I ‘should not’ have to add something to the machine to see a “critical system value”. On this same system, if I install DEBIAN 11 and the supervised HA installation I can get the CPU TEMP but using the following:

# Lines added for Command Line Sensor (CPU Temp)
  - platform: command_line
    name: CPU Temperature
    command: "cat /sys/class/hwmon/hwmon1/temp1_input"
    # If errors occur, make sure configuration file is encoded as UTF-8
    unit_of_measurement: "°C"
    value_template: "{{ value | multiply(0.001) | round(1) }}"

In the sensors.yaml file I created. It then creates a value that is readable and reportable in “Developer Tools”. The key to using those lines is knowing the path.

HASS OS is based on ALPINE LINUX - and I have even done a full install of ALPINE to the same box, and I am able to locate the path with the CPU TEMP value (which would work the same as above). However, when installing the Generic x86-x64 HASS OS install, the same path does not exist and therefore cannot be reported. The developers have ‘striped’ something out that needs to be put back.

See my latest response. That is what I am using in DEBIAN 11 with HA Supervised installation. That is the only way I have found for this to work. I want to be on a true-blue Pure HASS OS setup, they need to fix this.

Those files aren’t “put” by anyone other than Linux kernel developers. If you don’t have the requisite hwmon drivers loaded in your kernel, they will not appear there. They only appear after the drivers have been loaded — which they should, on any system that ships a working udev setup.

Try installing the lm_sensors package and then running sensors-detect to see if files appear under /sys/class/hwmon.

Does the temperature show up in the Glances addon?

I do not have that installed. I tried it once, months ago, and could not get it working. I have reloaded the entire system 3-5 times since this. the HASS OS should see this value natively - it is a SUPER-CRITICAL value (imho) for a headless system.

Please explain how I do this under HASS OS installation of HA - I have tried many things in the past with this type of installation, and a reboot undoes anything that I have done.

Right now under a DEBIAN 11 supervised HA installation, and I can see it…but I want to run a true HASS OS installation.

you can use terminal to install packages in haos.

on config you add lm-sensors to pacakges. in the terminal you type sensors for the value

Capture1

Capture2

I will look into this. You are running HASS OS? On what platform (hardware)? Generic x86-x64?

I am sure that people think I am insane for ‘getting so worked up’ over this one little thing, but I know from personal experience what happens when you do not monitor CPU temp. :slight_smile:

That’s from a pi3b haos.
Pi4 docker/supervisor has similar results.
The couple of VMs I poked about with don’t show temp because they are VMs…

in theory if you can
cat /sys/class/hwmon/hwmon1/temp1_input from the docker/supervisor install you should also be able to do the same in HAOS

Might be worth adding some info to this issue too

Agreed - - but see my previous responses. That path, nor any other have the CPU Temp. The CAT command not gonna show what is not there.

I have used both of these with HASS OS – to no success.

# Lines added for Command Line Testing (CPU Temp)
#  - platform: command_line
#    name: CPU Temperature
#    command: "cat /sys/class/hwmon/hwmon1/temp1_input"
#    # If errors occur, make sure configuration file is encoded as UTF-8
#    unit_of_measurement: "°C"
#    value_template: "{{ value | multiply(0.001) | round(1) }}"

#  - platform: command_line
#    name: CPU Temp1
#    command: "cat /sys/class/thermal/thermal_zone0/temp"
#    # If errors occur, make sure configuration file is encoded as UTF-8
#    unit_of_measurement: "°C"
#    value_template: "{{ value | multiply(0.001) | round(1) }}"

Navigating to those paths, they are either non-existent or do not have the file needed.

“IF” I decide to go back to a full HASS OS installation (Generic x85-x64) on here…what are your suggestions to install ‘these drivers’ you mention? Is there a list of instructions for doing this?

apk add lm-sensors

Install web terminal & ssh addon, you can ensure it is always loaded.

Ah also after the apk command you must run sensors-detect and follow instructions onscreen.

You need sudo for sensor-detect.
I didn’t need sensor detect to find temp when I used it via package install on pi3 HAOS.

It crashed my pi4 when I tried sensor detect on docker/supervisor. Not sure why. Not really keen to try again.

OK - Team… I did as instructed. I get this:

image