Full Hardware Monitoring - no matter the platform

What about snmp?

I use that one to get cpu temp, as well as some other values from my NAS (stand alone)

And now that i think of it, i should do the same for my VMware hosting HassOS :thinking:

image

image

So you can see - under the HASS OS, there is nothing.

I looked at that as well. I should not have to go down that ‘rabbit hole’ - as finding an OID for specific things is like pulling teeth from an angry crocodile. LOL

The OS - depending on which one - sees it. I have even booted with a LIVE ALPINE LINUX USB - and it will also have the needed info - just in another file. Under that OS - it stores it here:

/sys/class/thermal/thermal_zone0/temp

Using the following in sersors.yaml - I can pull it.

#  - platform: command_line
    name: CPU Temp
    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) }}"

The point I am making is that the developers have STRIPPED OUT key features of the ALPINE LINUX they built HASS OS from, and they need to put it back. :crazy_face: :face_with_symbols_over_mouth:

Thought I would throw this into the mix as well. I tried PROXMOX on this same box. Simple enough, used this: Installing Home Assistant OS using Proxmox 7

When I looked at the “Host” shell, it also had the CPU TEMP in a location where I could find it - but inside the HA, no such luck. I was soooo happy, then THOR Slammed his axe into my head. :disappointed_relieved:

Well proxmox is debian, so no surprises there :slight_smile:

I don’t think I have seen the list of modules recommended by sensors-detect on debian.

Thanks @bearhntr for the detailed posts in response to my questions.

I am pretty sure as a result I can say that the k10temp kernel driver is what is needed in the case of your motherboard. Time for a little kernel education (forgive me if you know this).

Drivers are optionally compiled when a kernel is compiled. For example the kernel for a x86 machine would not bother compiling drivers that were only intended for a rpi.

The drivers that are compiled can either be compiled into the kernel, or compiled as modules. On debian the kernel is heavily modularised, as you can see from the number of modules that are loaded from your lsmod output. (lsmod lists the modules presently loaded in the kernel.)

HAOS has less modules loaded. It does not have the k10temp module loaded. This could be because

  1. HAOS compiles the k10temp driver into the kernel as opposed to as a module; or

  2. HAOS simply doesn’t compile k10temp into the kernel or as a module; or

  3. HAOS doesn’t correctly read the hardware and therefore does not load the k10temp module or driver

TL;DR - Now we are pretty sure what we are looking for, post an issue on the HAOS github,

1 Like

I appreciate your’s and everyone else’s assistance.

a) I have partial understand of what you mentioned - as I am a computer nut, just not a LINUX guru. :slight_smile:

b) No Idea how to report this, as I have multiple times addressed this as a BUG - only to be told the following (from one of the developers):

*Thank you for reaching out.*

*This is not a bug report for development, this is a support question and is not related to the function of command_line, but is related to how you use the command line integration itself.*

*We use GitHub for tracking issues, not for providing support.*

*If you are in need of support, you should try our [Community Forum](https://community.home-assistant.io/) or join our [Discord chat server](https://discord.gg/c5DvZ4e).*

*You are more likely to get the answer you are looking for in those places.*

c) What I do not understand - and I would fix on my own - is how to get those drivers/modules/firmware into the HASS OS (and make them stick). I have tested this hardware with a UBUNTU Live, DEBIAN 11 Live and even an ALPINE Live bootable USB (this is what HASS OS is based on) — all of them pull the CPU Temp (while not always into the same ‘path’, but I can track it down.

This is Interesting:

Just not sure why I would want to put HA in a VM - not sure what else I would do with the box.

Created a new Alpine Linux LIVE USB – Thought I would share some images:

image

Here is lsmod

alpine:~# lsmod
Module                  Size  Used by
nls_utf8               16384  1
nls_cp437              20480  1
vfat                   24576  1
fat                    90112  1 vfat
ipv6                  643072  18
af_packet              53248  0
btusb                  49152  0
btrtl                  24576  1 btusb
btbcm                  24576  1 btusb
btintel                40960  1 btusb
bluetooth             520192  5 btrtl,btintel,btbcm,btusb
ecdh_generic           16384  1 bluetooth
ecc                    40960  1 ecdh_generic
psmouse               155648  0
serio_raw              16384  0
pcspkr                 16384  0
efi_pstore             16384  0
r8169                 102400  0
realtek                28672  1
mdio_devres            16384  1 r8169
snd_hda_codec_realtek   159744  1
libphy                163840  3 r8169,mdio_devres,realtek
snd_hda_codec_generic    94208  1 snd_hda_codec_realtek
snd_hda_codec_hdmi     69632  1
sp5100_tco             16384  0
ledtrig_audio          16384  1 snd_hda_codec_generic
i2c_piix4              24576  0
fam15h_power           16384  0
k10temp                16384  0
snd_hda_intel          53248  0
snd_intel_dspcfg       24576  1 snd_hda_intel
snd_intel_sdw_acpi     16384  1 snd_intel_dspcfg
snd_hda_codec         167936  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core          114688  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_hwdep              20480  1 snd_hda_codec
snd_pcm               139264  4 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
snd_timer              45056  1 snd_pcm
snd                   114688  8 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm
soundcore              16384  1 snd
amdgpu               7393280  0
mfd_core               16384  1 amdgpu
iommu_v2               24576  1 amdgpu
gpu_sched              45056  1 amdgpu
radeon               1708032  1
hwmon                  32768  4 k10temp,amdgpu,radeon,fam15h_power
i2c_algo_bit           16384  2 amdgpu,radeon
drm_ttm_helper         16384  2 amdgpu,radeon
ttm                    81920  3 amdgpu,radeon,drm_ttm_helper
input_leds             16384  0
mousedev               24576  0
amd_freq_sensitivity    16384  0
kvm_amd               143360  0
ccp                   102400  1 kvm_amd
kvm                  1069056  1 kvm_amd
irqbypass              16384  1 kvm
crct10dif_pclmul       16384  1
ghash_clmulni_intel    16384  0
aesni_intel           380928  0
hp_wmi                 20480  0
platform_profile       16384  1 hp_wmi
sparse_keymap          16384  1 hp_wmi
rfkill                 28672  2 hp_wmi,bluetooth
wmi_bmof               16384  0
crypto_simd            16384  1 aesni_intel
cryptd                 24576  2 crypto_simd,ghash_clmulni_intel
wmi                    32768  2 hp_wmi,wmi_bmof
evdev                  28672  15
button                 20480  0
acpi_cpufreq           20480  0
tpm_infineon           20480  0
tpm_tis                16384  0
tpm_tis_core           24576  1 tpm_tis
tpm                    90112  3 tpm_tis,tpm_infineon,tpm_tis_core
rng_core               16384  2 ccp,tpm
efivarfs               16384  1
uas                    28672  0
hid_generic            16384  0
usbhid                 45056  0
hid                   147456  2 usbhid,hid_generic
crc32_pclmul           16384  0
ahci                   45056  0
libahci                45056  1 ahci
libata                299008  2 libahci,ahci
ohci_pci               16384  0
ohci_hcd               49152  1 ohci_pci
xhci_pci               20480  0
xhci_pci_renesas       16384  1 xhci_pci
xhci_hcd              278528  1 xhci_pci
ehci_pci               16384  0
ehci_hcd               69632  1 ehci_pci
simpledrm              16384  0
drm_kms_helper        319488  3 amdgpu,radeon,simpledrm
cfbfillrect            16384  1 drm_kms_helper
syscopyarea            16384  1 drm_kms_helper
cfbimgblt              16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
fb_sys_fops            16384  1 drm_kms_helper
cfbcopyarea            16384  1 drm_kms_helper
cec                    53248  1 drm_kms_helper
drm                   647168  8 gpu_sched,drm_kms_helper,amdgpu,radeon,drm_ttm_helper,simpledrm,ttm
i2c_core              106496  7 drm_kms_helper,i2c_algo_bit,amdgpu,radeon,psmouse,i2c_piix4,drm
drm_panel_orientation_quirks    24576  1 drm
agpgart                49152  3 radeon,ttm,drm
loop                   40960  0
ext4                  954368  1
crc32c_generic         16384  0
crc32c_intel           24576  2
crc16                  16384  2 bluetooth,ext4
mbcache                16384  1 ext4
jbd2                  167936  1 ext4
usb_storage            77824  4 uas
usbcore               303104  10 xhci_hcd,ohci_hcd,ehci_pci,usbhid,usb_storage,ehci_hcd,btusb,xhci_pci,ohci_pci,uas
usb_common             16384  3 xhci_hcd,ohci_hcd,usbcore
sd_mod                 53248  4
t10_pi                 16384  1 sd_mod
scsi_mod              221184  4 sd_mod,usb_storage,uas,libata
alpine:~# uname -a
Linux alpine 5.15.62-1-lts #2-Alpine SMP Thu, 25 Aug 2022 06:18:18 +0000 x86_64 Linux

and

alpine:~# find /sys | grep temp1_input
/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon1/temp1_input
/sys/devices/pci0000:00/0000:00:01.0/hwmon/hwmon0/temp1_input

and

alpine:~# find /sys | grep temp
/sys/kernel/debug/kvm/directed_yield_attempted
/sys/kernel/debug/kvm/halt_attempted_poll
/sys/kernel/debug/tracing/events/amdgpu_dm/amdgpu_dm_atomic_state_template
/sys/kernel/debug/tracing/events/amdgpu_dm/amdgpu_dm_atomic_state_template/format
/sys/kernel/debug/tracing/events/amdgpu_dm/amdgpu_dm_atomic_state_template/trigger
/sys/kernel/debug/tracing/events/amdgpu_dm/amdgpu_dm_atomic_state_template/filter
/sys/kernel/debug/tracing/events/amdgpu_dm/amdgpu_dm_atomic_state_template/id
/sys/kernel/debug/tracing/events/amdgpu_dm/amdgpu_dm_atomic_state_template/enable
/sys/kernel/debug/tracing/events/thermal/thermal_temperature
/sys/kernel/debug/tracing/events/thermal/thermal_temperature/format
/sys/kernel/debug/tracing/events/thermal/thermal_temperature/trigger
/sys/kernel/debug/tracing/events/thermal/thermal_temperature/filter
/sys/kernel/debug/tracing/events/thermal/thermal_temperature/id
/sys/kernel/debug/tracing/events/thermal/thermal_temperature/enable
/sys/devices/pnp0/00:08/temp_deactivated
/sys/devices/pnp0/00:08/tpm/tpm0/temp_deactivated
/sys/devices/platform/hp-wmi/hddtemp
/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon1/temp1_crit
/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon1/temp1_crit_hyst
/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon1/temp1_input
/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon1/temp1_max
/sys/devices/pci0000:00/0000:00:01.0/hwmon/hwmon0/temp1_crit
/sys/devices/pci0000:00/0000:00:01.0/hwmon/hwmon0/temp1_crit_hyst
/sys/devices/pci0000:00/0000:00:01.0/hwmon/hwmon0/temp1_input
/sys/bus/pci/drivers/k10temp
/sys/bus/pci/drivers/k10temp/uevent
/sys/bus/pci/drivers/k10temp/0000:00:18.3
/sys/bus/pci/drivers/k10temp/bind
/sys/bus/pci/drivers/k10temp/new_id
/sys/bus/pci/drivers/k10temp/remove_id
/sys/bus/pci/drivers/k10temp/unbind
/sys/bus/pci/drivers/k10temp/module
/sys/firmware/efi/esrt/entries/entry0/last_attempt_version
/sys/firmware/efi/esrt/entries/entry0/last_attempt_status
/sys/module/k10temp
/sys/module/k10temp/initsize
/sys/module/k10temp/uevent
/sys/module/k10temp/notes
/sys/module/k10temp/notes/.note.Linux
/sys/module/k10temp/notes/.note.gnu.build-id
/sys/module/k10temp/notes/.note.gnu.property
/sys/module/k10temp/taint
/sys/module/k10temp/parameters
/sys/module/k10temp/parameters/force
/sys/module/k10temp/holders
/sys/module/k10temp/refcnt
/sys/module/k10temp/coresize
/sys/module/k10temp/drivers
/sys/module/k10temp/drivers/pci:k10temp
/sys/module/k10temp/initstate
/sys/module/k10temp/sections
/sys/module/k10temp/sections/.orc_unwind
/sys/module/k10temp/sections/__param
/sys/module/k10temp/sections/.note.Linux
/sys/module/k10temp/sections/.strtab
/sys/module/k10temp/sections/__mcount_loc
/sys/module/k10temp/sections/.exit.text
/sys/module/k10temp/sections/.bss
/sys/module/k10temp/sections/.orc_unwind_ip
/sys/module/k10temp/sections/.return_sites
/sys/module/k10temp/sections/.gnu.linkonce.this_module
/sys/module/k10temp/sections/.symtab
/sys/module/k10temp/sections/.rodata
/sys/module/k10temp/sections/.init.text
/sys/module/k10temp/sections/.note.gnu.build-id
/sys/module/k10temp/sections/.text
/sys/module/k10temp/sections/.data
/sys/module/k10temp/sections/__bug_table
/sys/module/k10temp/sections/.rodata.str1.1
/sys/module/k10temp/sections/.parainstructions
/sys/module/k10temp/sections/.text.unlikely
/sys/module/k10temp/sections/.note.gnu.property
/sys/module/k10temp/sections/.retpoline_sites
/sys/module/k10temp/sections/.rodata.str1.8
/sys/module/hwmon/holders/k10temp

Haos is not based on alpine. It is based on buildroot.

I beg to differ with you. This just pulled from my HASS OS installation…only IPs blanked:

What you are seeing is the ssh addon, which is Docker container based on alpine.

All you need to do is read the docs which state

Home Assistant Operating System is not based on a regular Linux distribution like Ubuntu. It is built using Buildroot and it is optimized to run Home Assistant. It targets single board compute (SBC) devices like the Raspberry Pi or ODROID but also supports x86-64 systems with UEFI.

ummmmm…ok. know nothing about Docker containers

Where is this HAOS gitHub you reference. I think I have posted this problem just about everywhere.

Sorry to be ‘daft’ and I appreciate all your help. I just really would like to get this CPU temp thing working in a true-blue HASS OS install. :frowning:

The link is in my last post.

tl;dr

I think the problem is that every processor and even every motherboard measure temperature differently.

I have three Intel NUCS here, one of them running Home Assistant OS generic x-86. I cannot find anywhere that describes where on the NUC are the three thermal_zones except that Zone3 is at the base of the CPU socket. And even that information is anecdotal. It is eventually the same as hwmon/temp1_input.

For my ‘home’ page in Home Assistant, I made a sensor in sensors.yaml:

  - platform: command_line
    name: CPU temp1 input
    command: "cat /sys/class/hwmon/hwmon1/temp1_input"
    unit_of_measurement: "°C"
    value_template: "{{ value | multiply(0.001) | round(1) }}"

I didn’t have to install anything, this was all in generic X-86 HAOS.

2 Likes

Needless. Your local network credentials are completely useless to a hacker unless they are ON your local network. There are probably thousands of Home Assistant installations on 192.168.10.6.