Perform action based on a computers temperature

is there a way to make a computer trigger a home assistant acton based on the computers temperature? maybe run a command line tool at a certian temperature? not really sure how i would access and use those values to do anything… trying to trigger a zigbee outlet to turn on when it goes over a certian temperature to activate a hvac fan pointing directly at a server. and turn off after it goes under a certian temperature.

Here is an example to report the CPU temperature from Proxmox (Debian) to Home Assistant. I take no credit for this, just found it in the web.

You will need to add a service to the server that will report out the temp via mqtt or some other method. Here is a project for widows.

I am using open hardware monitor.

Besides the temp, it also exposes many other sensors.
For example,

.

Huh. I actually have open hardware monitor. How do you do that?

Have you followed the instructions on the integration page ?
When you have your sensors available just make an automation, for example

alias: PC high temp
description: ''
mode: single
trigger:
  - platform: numeric_state
    entity_id: sensor.nvr_intel_core_i5_2400_temperatures_cpu_package
    above: '70'
condition: []
action:
  - service: switch.turn_on
    data:
      entity_id: switch.pc_fan

The integration instructions won’t work…

Have you enabled the remote server?

ohm1

Yes. I even started Openhardwaremonitor as admin after restarting my server and then made sure it was on. Same local network.


sensor:
  - platform: openhardwaremonitor
    host: 192.168.1.202

So for realsies did I format something wrong? Am I missing something?


It’s on port 8085

The network is set to private. Theirs no firewall. I do not understand what I have done wrong but it’s driving me up a wall…

I’m not familiar with open hardware monitor but if it’s setting up a web server, I’d assume that you could open the address with port on a web browser of another machine. Have you tried any other way to see if it’s not getting out of your machine vs HA not seeing it.

Oh ya it’s getting out. Tested it from the os that home assistant is running on. The data.json url displays data too. I’m at a loss.

It doesn’t even show up anywhere in logs I can see

Have you tried switching ports? Seems to have worked for some. Just make sure you make a firewall rule for the new port.

No bueno. Idk man.

It’s on port 9883 and not working.