Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SENSOR] Add corsairpsu-hid power sensors #369

Open
freakontrol opened this issue Dec 17, 2024 · 2 comments
Open

[SENSOR] Add corsairpsu-hid power sensors #369

freakontrol opened this issue Dec 17, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@freakontrol
Copy link

Using the 'sensors' command I get:

$ sensors
nct6687-isa-0a20
Adapter: ISA adapter
+12V:           12.19 V  (min = +12.14 V, max = +12.19 V)
+5V:             5.04 V  (min =  +5.03 V, max =  +5.05 V)
+3.3V:           3.36 V  (min =  +0.00 V, max =  +3.36 V)
CPU Soc:       742.00 mV (min =  +0.73 V, max =  +1.32 V)
CPU Vcore:     602.00 mV (min =  +0.60 V, max =  +0.60 V)
CPU 1P8:         0.00 V  (min =  +0.00 V, max =  +0.00 V)
CPU VDDP:        0.00 V  (min =  +0.00 V, max =  +0.00 V)
DRAM:            1.49 V  (min =  +1.47 V, max =  +2.67 V)
Chipset:         1.24 V  (min =  +1.24 V, max =  +1.25 V)
CPU SA:        906.00 mV (min =  +0.90 V, max =  +0.91 V)
Voltage #2:      1.52 V  (min =  +1.51 V, max =  +1.52 V)
AVCC3:           3.31 V  (min =  +3.29 V, max =  +3.31 V)
AVSB:            3.36 V  (min =  +0.00 V, max =  +3.36 V)
VBat:            1.06 V  (min =  +0.00 V, max =  +1.06 V)
CPU Fan:       1204 RPM  (min = 1181 RPM, max = 1791 RPM)
Pump Fan:      3418 RPM  (min = 3389 RPM, max = 3488 RPM)
System Fan #1: 1247 RPM  (min = 1149 RPM, max = 1267 RPM)
System Fan #2:    0 RPM  (min =    0 RPM, max =    0 RPM)
System Fan #3:    0 RPM  (min =    0 RPM, max =    0 RPM)
System Fan #4:    0 RPM  (min =    0 RPM, max =    0 RPM)
System Fan #5:    0 RPM  (min =    0 RPM, max =    0 RPM)
System Fan #6:    0 RPM  (min =    0 RPM, max =    0 RPM)
CPU:            +28.5°C  (low  = +24.0°C, high = +59.0°C)
System:         +37.5°C  (low  = +31.0°C, high = +39.0°C)
VRM MOS:        +33.5°C  (low  = +27.0°C, high = +34.5°C)
PCH:            +49.0°C  (low  = +35.0°C, high = +50.0°C)
CPU Socket:     +33.0°C  (low  = +28.0°C, high = +34.5°C)
PCIe x1:        +13.5°C  (low  = +13.0°C, high = +13.5°C)
M2_1:           +31.5°C  (low  = +31.0°C, high = +31.5°C)

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +28.0°C  (high = +80.0°C, crit = +100.0°C)
Core 0:        +28.0°C  (high = +80.0°C, crit = +100.0°C)
Core 4:        +28.0°C  (high = +80.0°C, crit = +100.0°C)
Core 8:        +26.0°C  (high = +80.0°C, crit = +100.0°C)
Core 12:       +28.0°C  (high = +80.0°C, crit = +100.0°C)
Core 16:       +25.0°C  (high = +80.0°C, crit = +100.0°C)
Core 20:       +25.0°C  (high = +80.0°C, crit = +100.0°C)
Core 24:       +26.0°C  (high = +80.0°C, crit = +100.0°C)
Core 28:       +25.0°C  (high = +80.0°C, crit = +100.0°C)
Core 32:       +27.0°C  (high = +80.0°C, crit = +100.0°C)
Core 33:       +27.0°C  (high = +80.0°C, crit = +100.0°C)
Core 34:       +27.0°C  (high = +80.0°C, crit = +100.0°C)
Core 35:       +27.0°C  (high = +80.0°C, crit = +100.0°C)
Core 36:       +28.0°C  (high = +80.0°C, crit = +100.0°C)
Core 37:       +28.0°C  (high = +80.0°C, crit = +100.0°C)
Core 38:       +28.0°C  (high = +80.0°C, crit = +100.0°C)
Core 39:       +28.0°C  (high = +80.0°C, crit = +100.0°C)

acpitz-acpi-0
Adapter: ACPI interface
temp1:        +27.8°C  (crit = +105.0°C)

corsairpsu-hid-3-2
Adapter: HID adapter
voltage supply: 230.00 V  
voltage 12v:     11.94 V  (min =  +8.41 V, max = +15.59 V)
voltage 5v:       5.03 V  (min =  +3.50 V, max =  +7.00 V)
voltage 3.3v:     3.28 V  (min =  +2.31 V, max =  +4.30 V)
fan rpm:           0 RPM
temp1:           +45.8°C  (high = +70.0°C)
temp2:           +51.0°C  (high = +70.0°C)
power total:     64.00 W  
power 12v:       56.00 W  
power 5v:        10.00 W  
power 3.3v:       2.50 W  
current 12v:      5.25 A  (max = +135.00 A)
current 5v:       2.06 A  (max = +40.00 A)
current 3.3v:   875.00 mA (max = +40.00 A)

nvme-pci-0200
Adapter: PCI adapter
Composite:    +34.9°C  (low  = -20.1°C, high = +83.8°C)
                       (crit = +88.8°C)

but in home assistant I only see (related to Corsair PSU):

Corsair MP600 PRO Composite 34.85 °C
Corsair MP600 PRO Temp1 Alarm OK
Hardware Sensor Corsairpsu Current 12V 2,000 A (wrong separator)
Hardware Sensor Corsairpsu Fan Rpm 0 rpm
Hardware Sensor Corsairpsu Power 3.3V 2,000W (wrong separator)
Hardware Sensor Corsairpsu Voltage 3.3V 3.281 V

Despite the 12v Current and 3.3v Power have wrong separator (should be '.' instead of ','), I cannot see all the other values like total power that is interesting for me.

Thank you for the fantastic job done so far!

@freakontrol freakontrol added the enhancement New feature or request label Dec 17, 2024
@freakontrol
Copy link
Author

freakontrol commented Dec 17, 2024

After some time all sensors become available, only the wrong separators persist.

@joshuar
Copy link
Owner

joshuar commented Dec 21, 2024

Hey thanks for trying out Go Hass Agent and reporting this issue!

I believe the issue here is that Go Hass Agent is sending the raw sensor data without any chip-dependent scaling/transformation. If you are comparing the values to, say, the output of sensors from lm-sensors, there will be discrepancies; lm-sensors has a database of chips with scaling/transformation information for their values and applies those as required before displaying the values.

So I'm guessing that for this chip, those current and power values should be scaled down by 1000 as per the lm-sensors database. So the separator is correct but the value is wrong, it's 1000x too high :)

I've been meaning to look into how I can parse/use the lm-sensors database before sending sensor values. But the format of the lm-sensors database is, somewhat "esoteric"...

Until I can decipher the format or otherwise use it, a workaround would be to create a template sensor that scales/transforms any values as appropriate. In most cases, it's probably easy to just compare the values between lm-sensors and Go Hass Agent as most sensors are probably just some scale factor (a few do have some formula transformations).

I'll leave this issue open to track that I need to look into this and I'll update it when I get the chance to apply a fix.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants