ateodorescu / home-assistant-ipmi

IPMI connector for Home Assistant
MIT License
39 stars 10 forks source link

Feature request: add support for power current sensors #13

Closed chunkster29 closed 6 months ago

chunkster29 commented 1 year ago

ipmitool -I lanplus -H 192.168.1.XXX -U root -P XXXX sdr type Current Current | 94h | ns | 10.1 | No Reading Current | 95h | ok | 10.2 | 0.48 Amps System Level | 98h | ok | 7.1 | 105 Watts

sshalyminov commented 12 months ago

Same for Power sensors on IBM servers please

ipmitool -H 192.168.xxx.xxx -U root -P xxx sdr elist full|grep 'Power In' PS1 Power In | 52h | ok | 10.1 | 132 Watts PS2 Power In | 53h | ok | 10.2 | 160 Watts

sshalyminov commented 12 months ago

BTW on my Dell server Current sensors looks like this:

ipmitool -I lanplus -H 192.168.xxx.xxx -U iroot -P xxx sdr type Current Current 1 | 6Ah | ok | 10.1 | 0.40 Amps Current 2 | 6Bh | ok | 10.2 | 0 Amps Pwr Consumption | 77h | ok | 7.1 | 98 Watts

May be useful

sems commented 11 months ago

For my Supermicro server:

~ ipmitool -H 192.168.1.147 -U xxx -P xxx dcmi power reading

    Instantaneous power reading:                   109 Watts
    Minimum during sampling period:                 38 Watts
    Maximum during sampling period:                242 Watts
    Average power reading over sample period:      102 Watts
    IPMI timestamp:                           10/12/23 13:29:17 CEST    Sampling period:                          00065530 Seconds.
    Power reading state is:                   activated
ateodorescu commented 11 months ago

For my Supermicro server:

~ ipmitool -H 192.168.1.147 -U xxx -P xxx dcmi power reading

    Instantaneous power reading:                   109 Watts
    Minimum during sampling period:                 38 Watts
    Maximum during sampling period:                242 Watts
    Average power reading over sample period:      102 Watts
    IPMI timestamp:                           10/12/23 13:29:17 CEST    Sampling period:                          00065530 Seconds.
    Power reading state is:                   activated

This is already extracted by the addon. I'll see when I find the time to extract the others.

markusschloesser commented 11 months ago

For my Supermicro server:

~ ipmitool -H 192.168.1.147 -U xxx -P xxx dcmi power reading

    Instantaneous power reading:                   109 Watts
    Minimum during sampling period:                 38 Watts
    Maximum during sampling period:                242 Watts
    Average power reading over sample period:      102 Watts
    IPMI timestamp:                           10/12/23 13:29:17 CEST    Sampling period:                          00065530 Seconds.
    Power reading state is:                   activated

This is already extracted by the addon. I'll see when I find the time to extract the others.

first of all, thanks for the add-on and integration! I have a Supermicro X11SSH-CTF and unfortunately the power values are not shown in HA/are not available as sensors. 28 other sensors/ entities work fine, though. Also I am not able to reach the add-on via the command line you requite to see the values from the ipmitool itself.

sems commented 6 months ago

first of all, thanks for the add-on and integration! I have a Supermicro X11SSH-CTF and unfortunately the power values are not shown in HA/are not available as sensors. 28 other sensors/ entities work fine, though. Also I am not able to reach the add-on via the command line you requite to see the values from the ipmitool itself.

@ateodorescu To add to the above, I still do not see the values in the latest version of the addon.

Rather since the latest update all sensor data was lost: I now only see the "power on/soft shutdown" and "server state". Previously I had 47 available entities.

ateodorescu commented 6 months ago

So, power and current sensors are now supported. Try it on https://github.com/ateodorescu/home-assistant-ipmi/releases/tag/v1.5.0. Get the latest version of addon too.

markusschloesser commented 6 months ago

confirmed working for me, thank you! :-)

sems commented 6 months ago

Like @markusschloesser says above: all the entities are back for me. I still do not get a "power reading sensor" in HA in watts, I only see sensors in volts.

When I run: ipmitool -H 192.168.1.147 -U usr -P pwd sdr elist full I also do not any wattage sensor available, only through the usage of: ipmitool -H 192.168.1.147 -U usr -P pwd dcmi power reading (see https://github.com/ateodorescu/home-assistant-ipmi/issues/13#issuecomment-1759431682), like I previously stated.

Could I help you debug?

➜  ~ ipmitool -H 192.168.1.147 -U usr -P pwd sdr elist full
CPU1 Temp        | 01h | ok  |  3.1 | 46 degrees C
CPU2 Temp        | 02h | ok  |  3.2 | 42 degrees C
Inlet Temp       | 09h | ns  |  7.0 | No Reading
PCH Temp         | 0Ah | ok  |  7.1 | 58 degrees C
System Temp      | 0Bh | ok  |  7.2 | 39 degrees C
Peripheral Temp  | 0Ch | ok  |  7.3 | 48 degrees C
VRMCpu1 Temp     | 10h | ok  |  7.16 | 47 degrees C
VRMCpu2 Temp     | 11h | ok  |  7.17 | 44 degrees C
VRMP1ABC Temp    | 12h | ok  |  7.18 | 49 degrees C
VRMP1DEF Temp    | 13h | ok  |  7.19 | 48 degrees C
VRMP2ABC Temp    | 14h | ok  |  7.20 | 43 degrees C
VRMP2DEF Temp    | 15h | ok  |  7.21 | 41 degrees C
P1-DIMMA1 Temp   | B0h | ok  | 32.0 | 40 degrees C
P1-DIMMB1 Temp   | B2h | ns  | 32.2 | No Reading
P1-DIMMC1 Temp   | B4h | ns  | 32.4 | No Reading
P1-DIMMD1 Temp   | B6h | ns  | 32.6 | No Reading
P1-DIMME1 Temp   | B8h | ns  | 32.8 | No Reading
P1-DIMMF1 Temp   | BAh | ns  | 32.10 | No Reading
P2-DIMMA1 Temp   | D0h | ok  | 32.16 | 37 degrees C
P2-DIMMB1 Temp   | D2h | ns  | 32.18 | No Reading
P2-DIMMC1 Temp   | D4h | ns  | 32.20 | No Reading
P2-DIMMD1 Temp   | D6h | ns  | 32.22 | No Reading
P2-DIMME1 Temp   | D8h | ns  | 32.24 | No Reading
P2-DIMMF1 Temp   | DAh | ns  | 32.26 | No Reading
FAN1             | 41h | ok  | 29.1 | 2700 RPM
FAN2             | 42h | ns  | 29.2 | No Reading
FAN3             | 43h | ok  | 29.3 | 2300 RPM
FAN4             | 44h | ok  | 29.4 | 2400 RPM
FAN5             | 45h | ok  | 29.5 | 2300 RPM
FAN6             | 46h | ok  | 29.6 | 2400 RPM
12V              | 30h | ok  |  7.32 | 12.18 Volts
5VCC             | 31h | ok  |  7.33 | 5.10 Volts
3.3VCC           | 32h | ok  |  7.34 | 3.40 Volts
VBAT             | 33h | ok  | 40.0 | Presence Detected
Vcpu1            | 34h | ok  |  3.20 | 1.87 Volts
Vcpu2            | 35h | ok  |  3.21 | 1.87 Volts
VDimmP1ABC       | 36h | ok  |  8.38 | 1.20 Volts
VDimmP1DEF       | 37h | ok  |  8.39 | 1.20 Volts
VDimmP2ABC       | 38h | ok  |  8.40 | 1.20 Volts
VDimmP2DEF       | 39h | ok  |  8.41 | 1.20 Volts
5VSB             | 3Ah | ok  |  7.42 | 5.07 Volts
3.3VSB           | 3Bh | ok  |  7.43 | 3.37 Volts
1.8V PCH         | 3Ch | ok  |  7.44 | 1.84 Volts
PVNN PCH         | 3Dh | ok  |  7.45 | 1.03 Volts
1.05V PCH        | 3Eh | ok  |  7.46 | 1.08 Volts
Chassis Intru    | AAh | ok  | 23.0 | General Chassis intrusion
M2NVMeSSD Temp   | 4Bh | ns  |  7.48 | No Reading
markusschloesser commented 6 months ago

I do have all the power values from https://github.com/ateodorescu/home-assistant-ipmi/issues/13#issuecomment-1776315064 which were previously not recognized. So for me everything's working great! 😊

sems commented 6 months ago

I do have all the power values from https://github.com/ateodorescu/home-assistant-ipmi/issues/13#issuecomment-1776315064 which were previously not recognized. So for me everything's working great! 😊

Does it also return the power sensors when using the 'sdr elist full' command?

ateodorescu commented 6 months ago

@sems do you have the last versions of ipmi integration + addon? Your power sensors should be visible with the latest code.

sems commented 6 months ago

@sems do you have the last versions of ipmi integration + addon? Your power sensors should be visible with the latest code.

I noticed that the addon was not running anymore. It seems to work now! Thank you for the heads-up.