Monitor Windows PC (temp, load, etc.)

Not me… I can barely get my Arduino code to work.

I’m happy to say my proof of concept was successful. I am able to display a “CPU core temperature” in as a Home Assistant sensor from my Windows 11 PC via HWinfo. Basically, anything HWINFO has access to, it can be displayed in Home Assistant. All sorts of interesting sensors, I.E., SSD Disk life % left, CPU wattage, fan speeds, etc.

I’ll post a complete “how-to” once I add all the sensors I want to add for myself. There really isn’t much to it.
test

configuration.yaml
Below, is the actual working code I’m using to extract the sensor value (updated every 6 seconds) for the sensor in the green rectangle above.

rest:
  - resource: http://192.168.1.249:55555/
    sensor:
      - name: "CPU Package Temperature"
        value_template: "{{value_json 
                          | selectattr('SensorClass', 'equalto', 'CPU [#0]: Intel Core i7-4790K: DTS') 
                          | selectattr('SensorName', 'equalto', 'CPU Package') 
                          | map(attribute='SensorValue') 
                          | first}}"
        unit_of_measurement: 'ºC'
    verify_ssl: false
    timeout: 30
    scan_interval: 6
``

Thank you @Holdestmade HASS.Agent looks nice! I wish I had known about it before I added my own custom desktop screenshot and Windows Update scripts to Home Assistant.

I did give it a shot, it looks like HASS.Agent has very limited builtin CPU sensor support… just basic CpuLoad and CurrentClockSpeed; at least, for my PCs.
image

I’m guessing in order for it to work, I would have to also install librehardwaremonitor, add these sensors to HASS.Agent via WMIQuery.

If that’s the case, I think I’ll stick with HWiNFO and its RESTful web server since RESTful API calls are significantly faster and less resource intensive than depending on librehardwaremonitor’s WMI classes. The WMI data has to be constantly written and read from the Windows registry AND that’s not including the time it takes to re-transmit this data via MQTT to Home Assistant.

Looking forward to it.

1 Like

I’m 99% done. All my HWiNFO sensors are now accessible in HA. I just added them really quick to an Entities card.

Note There are several sensors (many more than you see in the screenshot). However, they will only appear when relevant.

1 Like

Hi, are you running hwinfo as a service? So it would start without a user logging in?

I am not running it as a service. I don’t think it would work correctly since it needs to interact with the logged in user’s Windows desktop.

Having said that, I haven’t tried it myself… maybe you can let us know if you were able to make it work?

I too am using HASS Agent but ive been trying to figure out what in need to get MB temp sensors, Fan speeds & Disk Space(Used/Remaining) to configure in Hass agent to show up in HA
if someone can let me know what i need to do that would be greatly appreciated thanks