Skip to content

Huawei UPS missing load display #150

@gbakeman

Description

@gbakeman

@MaxMadcc (Link)

I took a look at the NUT (Network UPS Tools) driver source code.

https://github.com/networkupstools/nut/blob/9e029270d7914df27c9743c95aad219d7ea2e32e/drivers/huawei-ups2000.c#L552 https://github.com/networkupstools/nut/blob/9e029270d7914df27c9743c95aad219d7ea2e32e/drivers/huawei-ups2000.c#L553

.power is apparent power. .realpower is active power.

So .realpower is actually the amount of power my UPS is consuming.

UPS variables
battery.capacity (Battery capacity (Ah)) : 9
battery.charge (Battery charge (percent of full)) : 100.0
battery.charger.status (Battery charger status) : charging
battery.packs (Number of battery packs) : 4
battery.runtime (Battery runtime (seconds)) : 2418
battery.voltage (Battery voltage (V)) : 54.4
device.mfr (Description unavailable) : Huawei
device.model (Description unavailable) : UPS2000A
device.serial (Description unavailable) : 2102290503HGJ7000056
device.type (Description unavailable) : ups
driver.debug (Current debug verbosity level of the driver program) : 1
driver.flag.allow_killpower (Safety flip-switch to allow the driver daemon to send UPS shutdown command (accessible via driver.killpower)) : 0
driver.name (Driver name) : huawei-ups2000
driver.parameter.pollinterval (Description unavailable) : 3
driver.parameter.port (Description unavailable) : /dev/ttySVA100
driver.parameter.synchronous (Description unavailable) : no
driver.state (Description unavailable) : updateinfo
driver.version (Driver version - NUT release) : 2.8.1
driver.version.internal (Internal driver version) : 0.05
input.bypass.frequency (Description unavailable) : 50.0
input.bypass.voltage (Description unavailable) : 232.6
input.frequency (Input line frequency (Hz)) : 50.0
input.voltage (Input voltage (V)) : 232.6
output.current (Output current (A)) : 1.7
output.frequency (Output frequency (Hz)) : 50.0
output.power (Description unavailable) : 300.0
output.realpower (Description unavailable) : 200.0
output.voltage (Output voltage (V)) : 219.5
ups.beeper.status (UPS beeper status) : enabled
ups.delay.reboot (Interval to wait before rebooting the UPS (seconds)) : 60
ups.delay.shutdown (Interval to wait after shutdown with delay command (seconds)) : 60
ups.delay.start (Interval to wait before (re)starting the load (seconds)) : 60
ups.firmware (UPS firmware) : V2R1C1SPC40
ups.firmware.aux (Auxiliary device firmware) : P1.0-D1.0
ups.load (Load on UPS (percent of full)) : 18.0
ups.mfr (UPS manufacturer) : Huawei
ups.model (UPS model) : UPS2000A
ups.power.nominal (UPS power rating (VA)) : 2000
ups.serial (UPS serial number) : 21
ups.status (UPS status) : OL CHRG
ups.temperature (UPS temperature (degrees C)) : 28.4
ups.timer.reboot (Time before the load will be rebooted (seconds)) : -1
ups.timer.shutdown (Time before the load will be shutdown (seconds)) : -1
ups.timer.start (Time before the load will be started (seconds)) : -1
ups.type (UPS type) : online

The output power should be calculated according to the following.
P = I*V
It appears that my UPS variables include output.realpower and output.power, but the the load wattage graph show 0W and percentage of real power.

Log (part)
2024/4/28 23:06:08 [30336, Nut_Socket]: NUT server reports VER: 2.8.1 NETVER: 
2024/4/28 23:06:08 [30336, UPS_Device]: Retrieving basic UPS product information...
2024/4/28 23:06:08 [30336, UPS_Device]: Determining best method to calculate power usage...
2024/4/28 23:06:08 [30336, UPS_Device]: ups.realpower is not supported by server.
2024/4/28 23:06:08 [30336, UPS_Device]: ups.realpower.nominal is not supported by server.
2024/4/28 23:06:08 [30336, UPS_Device]: input.current.nominal is not supported by server.
2024/4/28 23:06:08 [30336, UPS_Device]: Unable to find a suitable method to calculate power usage.
2024/4/28 23:06:08 [30336, UPS_Device]: output.frequency.nominal is not supported by server.
2024/4/28 23:06:08 [30336, UPS_Device]: Apply Fallback Value when retrieving output.frequency.nominal
2024/4/28 23:06:08 [30336, UPS_Device]: Completed retrieval of basic UPS product information.
2024/4/28 23:06:08 [30336, WinNUT]: Connection to Nut Host Established
2024/4/28 23:06:09 [30336, UPS_Device]: UPS statuses have CHANGED...
2024/4/28 23:06:09 [30336, UPS_Device]: Current statuses: OL,CHRG
2024/4/28 23:06:59 [30336, UPS_Device]: UPS device updating status is now [False]
2024/4/28 23:06:59 [30336, UPS_Device]: UPS device updating status is now [True]
2024/4/28 23:28:29 [30336, UPS_Device]: UPS device updating status is now [False]
2024/4/28 23:28:29 [30336, UPS_Device]: UPS device updating status is now [True]
2024/4/28 23:37:27 [30336, Pref_Gui]: Opened UI window to log location.
2024/4/28 23:37:39 [30336, WinNUT]: Disconnected from Nut Host
2024/4/28 23:37:39 [30336, WinNUT]: Client UPS_Connect subroutine beginning.

Notes

We seem to be missing output.current, output.voltage, and output.realpower for load calculation. output.power doesn't immediately appear to have any utility.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions