CPU temperature in windows

Hi,
I want to read the CPU temperature of my PC that it have windows 10 installed inside.
How can do this by a python script?

Is possible?
I have find this library “psutil” but it do not work.

1 Like

You could perhaps use SNMP?

Someone made a simple module for free that you might be able to use:

You could also use:
Kymera Systems Inc | IIoT Solutions - Kymera SNMP Driver , but that one is not free.

You might have to do a bit of research to find the right OID etc. This post could be a good start:

Another technique could be to run a batch file with system.util.execute(). This post might be a good start:

You can use this power shell function, but it has to be run with admin privileges, which i think ignition do have

function Get-Temperature {
    $t = Get-WmiObject MSAcpi_ThermalZoneTemperature -Namespace "root/wmi"
    $returntemp = @()

    foreach ($temp in $t.CurrentTemperature)
    {


    $currentTempKelvin = $temp / 10
    $currentTempCelsius = $currentTempKelvin - 273.15

    $currentTempFahrenheit = (9/5) * $currentTempCelsius + 32

    $returntemp += $currentTempCelsius.ToString() + " C : " + $currentTempFahrenheit.ToString() + " F : " + $currentTempKelvin + "K"  
    }
    return $returntemp
}

Get-Temperature