Full Hardware Monitoring - no matter the platform

Just sensors.
Sensors detect was bad info in this case.
You need sudo for sensor-detect and you can’t sudo in HA container.

1 Like

I am not following. Please elaborate.

The command to use is

sensors

You need higher privileges to run sensors-detect. That is why it doesn’t show up when you tried it. Normally you would use

sudo sensors-detect

Which would raise your privileges to a root/admin user.

Sudo isn’t available inside the HA container.

You have multiple layers in HAOS. the OS which isn’t easily accessible and then you are working in the HA core container with terminal which is a different separate layer.

Neither one of them work:

image

Not sure what to tell you.
it works in either terminal addon for me. That’s on a HAOS pi
Probably best to take it to that earlier link I put on github about sysmonitor

sys mon issue

Cap2 ssh web apk install
Cap3 terminal std

Thanks for the help – I will keep trying. I am getting this error now. Did a search and see what I found (floated on image). I see nothing like that in the folder path mentioned:

It also appears that every time I reboot - I have to run the APK ADD LM-SENSORS ???

I just rebooted system, went to Terminal and typed sensors - and I get:

image

You will have to reinstall unless you use packages via terminal. Terminal will auto reinstall for you on boot.

You could try glances as a last ditch effort. Glances shows temp up in the bottom left of the screen without any config beyond what you need to get it to run.

or

stick with docker/supervisor

Explain – Packages, please.

I tried Glances, never got it working right. I basically want an Entity that has CPU TEMP that I can put on Dashboard along with some others which are working…and at some point maybe do an Automation to send a notification if the CPU Temp gets too high.

On the configuration page of either terminal addon there is a packages option. You add the package and hit SAVE.
You can add your desired apk packages there. It will install every time the addon starts up.

Capture

1 Like

If you’re using the “SSH & Web Terminal” Add-on (which what your screenshot suggests it is), it’s running in a docker container. So anything you may load in that container, via the shell, is lost when the container is restarted (like when the host is rebooted).

What HasQT is suggesting is a way of mitigating that issue by instructing the Add-on to load what you want when the container is started.

1 Like

@123 Taras and @HasQT

I sort of get this. So my questions are:

  1. How will this help me to be able to see the CPU Temp (always) in HA (like an Entity that I can use) ?

  2. I find it odd that when I use the DEBIAN 11 - HA Supervised installation, I can find the path to the CPU temp and then adjust these lines:

# 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) }}"  

and I get the CPU Temp in degrees C as an Entity. But when using full HASS OS installation - that value is no where to be found. That is what I am hoping to do.

In answer to Q1
Using lm-sensors was just for trouble shooting to see if an actual sensor value could be found.
It won’t help you any further as it’s not working on your system. No sensor was found.
Having to reinstall lm-sensors every time HAOS reboots is a feature of HAOS. It is very restricted.
The work around with packages in terminal just saves on having to apk add everytime. It is a way to make HAOS less restrictive… while limiting users to a strict “app store” to download things from.

Q2 is indeed the mystery. You will be better off posting somewhere (such as the sys mon link from earlier) in issues on github as a dev is more likely to see it. It’s mostly users here on the forum, not devs. Although it is open source… and free. so even posting an issue isn’t guaranteed to get a fix.

I realize you are currently running Home Assistant OS but in case you were wondering, the System Monitor integration works on Home Assistant Supervised (Debian 11) on an RPI3.

Unfortunately I don’t have an RPI4 so that’s the limit of what I can conveniently test.

I do not know anything about the RPi’s - the system that I am using is an HP t620 ThinClient (basically a micro-PC) with a quad-core AMD CPU.

When I install Debian 11 then HA Supervised. The SYSTEM MONITOR does not find it - but this does:

# 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) }}"

In my sensors.yaml file. I then get an entity like you are showing and I can use it.

If I do a full HASS OS install - nothing at all works. I cannot get the CPU temp at all -which is INSANITY, as I can do a full install of ALPINE LINUX (the base for HASS OS) and I can see the temp in the same path as above.

I want to get away from using a ‘supervised’ install, as eventually the base OS will need to be updated, and that is another install basically and a restore from backup to bring it all in. HASS OS keeps itself updated.

1 Like

Sorry, my mistake; for some inexplicable reason I thought the host machine was an RPI4. :man_facepalming:

That’s surprising. I have another instance of Home Assistant Supervised running on an old laptop (Core2 Duo) and System Monitor can get the CPU temperature. Not sure why your PC-compatible machine doesn’t get along with System Monitor even with the Home Assistant Supervised edition. :thinking:

I have posted this question everywhere I can think of - noone seems to know why or how to fix it. I have asked the GITHUB folks, the FB Community, the DISCORDs and other places.

I am going to keep asking until they FIX this. Every single installation of HA should be able to read the hardware it is installed. VMs it is understandable that it is not going to show it, but all others should. IMHO

1 Like

What cpu does that machine have?

What modules does the kernel load on debian cf haos

lsmod

On haos try

find /proc |grep temp1_input

I did a brand new install of the HASS OS to my HP t620 ThinClient using the Generic x86-x64 installation (no Debian) booted from UBUNTU Live USB and used Etcher to build the drive.

I always first install Add-On File Editor, then Studio Code Server, MariaDB then SSH & Web Terminal. That is where I am now.

Went to Terminal and typed: lsmod here is what I get:

The other command gives me:

image

Much Thanks to all of you for your assistance.