networkupstools / nut

The Network UPS Tools repository. UPS management protocol Informational RFC 9271 published by IETF at https://www.rfc-editor.org/info/rfc9271 Please star NUT on GitHub, this helps with sponsorships!
https://networkupstools.org/
Other
1.84k stars 340 forks source link

bcmxcp_usb reporting false alarms for Eaton Powerware 3105 #769

Open bradtpt opened 4 years ago

bradtpt commented 4 years ago

I have found the bcmxcp_usb driver reporting invalid / implausible values plus alarms that don't exist for the two Eaton Powerware 3105 UPSs I have.

I have two of these UPS units on different systems, one as per the default package install of pfsense-2.4.4, (nut version 2.7.4) and the second on a raspberry pi I setup for testing with Raspbian Buster Lite running nut 2.7.4 installed from the package repository (ie just apt install nut), I'm getting similar results from both.

I have highlighted the values which I believe are incorrect in the rest of this post.

Here's the output from upsc ups on the pfsense machine:

/root: upsc ups ambient.temperature.high: 200 battery.charge.restart: 204 battery.runtime.low: 1 device.mfr: Eaton device.model: POWERWARE UPS 700i device.part: 103004254-5591 device.serial: device.type: ups driver.name: bcmxcp_usb driver.parameter.pollinterval: 2 driver.parameter.port: auto driver.parameter.synchronous: no driver.version: 2.7.4 driver.version.internal: 0.31 input.frequency.high: 55 input.frequency.low: 45 input.frequency.nominal: 50 input.quality: 0 input.transfer.high: 32767 input.transfer.low: 65535 input.voltage.nominal: 240 output.frequency.nominal: 50 output.phases: 1 output.voltage.nominal: 240 ups.alarm: RECTIFIER_EPROM_FAIL POWER_SUPPLY_5V_FAIL POWER_SUPPLY_12V_FAIL RECTIFIER_POWER_CAPASITOR_FAIL OUTPUT_BREAKER_OPEN ups.beeper.status: disabled ups.description: Off-line switcher, Single Phase ups.firmware: Cont:00.80 Inve:00.60 ups.mfr: Eaton ups.model: POWERWARE UPS 700i ups.power.nominal: 700 ups.serial: ups.status: ALARM OL

and from the pi we see this:

/# upsc ups Init SSL without certificate database ambient.temperature.high: 255 ambient.temperature.low: 255 battery.charge.restart: 255 battery.runtime.low: 1 device.mfr: Eaton device.model: POWERWARE UPS 700i device.part: 103004254-5591 device.type: ups driver.name: bcmxcp_usb driver.parameter.pollinterval: 2 driver.parameter.port: auto driver.parameter.synchronous: no driver.version: 2.7.4 driver.version.internal: 0.31 input.frequency.high: 55 input.frequency.low: 45 input.frequency.nominal: 50 input.quality: 0 input.transfer.low: 46847 input.voltage.nominal: 240 output.frequency.nominal: 50 output.phases: 1 output.voltage.nominal: 240 ups.alarm: BUILDING_ALARM_5 BUILDING_ALARM_3 BUILDING_ALARM_2 CHARGER_OVER_TEMP OUTPUT_UNCALIBRATED RECTIFIER_SELFTEST_FAIL TO_BYPASS_COMMAND INVERTER_OVER_TEMP_TRIP INVERTER_VOLTAGE_FEEDBACK_ERROR DC_UNDER_VOLTAGE_TIMEOUT AC_UNDER_VOLTAGE_TIMEOUT DC_UNDER_VOLTAGE_W ups.beeper.status: disabled ups.description: Off-line switcher, Single Phase ups.firmware: Cont:00.80 Inve:00.60 ups.mfr: Eaton ups.model: POWERWARE UPS 700i ups.power.nominal: 700 ups.status: ALARM OL OB

This last one is clearly incorrect as it's reporting the UPS status as OL and OB simultaneously! This same UPS plugged into Eaton's own Lansafe software on a windows box reports no issues, plus the UPS behaves as it should and will support the load when power is removed quite happily.

image

Debug level 5 output from the driver shows us further details of the alarms that are allegedly active. Is this something I'm likely to be able to fix if I could get into the driver and make some changes? I'd be happy to start looking at the code but I have limited time and experience with nut for my time to be effective I think.

root@ups-tv:~# /lib/nut/bcmxcp_usb -a ups -DDDDD Network UPS Tools - BCMXCP UPS driver 0.31 (2.7.4) USB communication subdriver 0.22 0.000000 debug level is '5' 0.008630 entering nutusb_open() 0.015235 device 004 opened successfully 0.020139 send_to_all: SETINFO device.type "ups" 0.023442 send_to_all: SETINFO driver.version "2.7.4" 0.023885 send_to_all: SETINFO driver.version.internal "0.31" 0.025056 send_to_all: SETINFO driver.name "bcmxcp_usb" 0.025457 send_read_command: (4 bytes) => ab 01 31 23 0.027266 entering get_answer(31) 0.268850 get_answer: (128 bytes) => ab 01 79 01 02 80 00 60 00 00 0e 00 01 00 10 50 0.272766 4f 57 45 52 57 41 52 45 20 55 50 53 20 20 20 5c 00 00 00 00 00 00 00 00 00 0.275005 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0.276355 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0.276760 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0.277101 00 00 00 00 00 00 00 f0 16 43 ab 01 0.278648 get_answer: block_number = 1 0.278964 get_answer: data length = 121 0.279249 get_answer: sequence number (1) is ok 0.279532 get_answer: checksum is ok 0.280670 get_answer: next sequence is 2 0.280980 get_answer: block_number = 1 0.281269 get_answer: data length = 121 0.281554 get_answer: need to read -2 more data 0.282931 get_answer: block_number = 1 0.283277 get_answer: data length = 121 0.283559 get_answer: need to read 119 more data 0.364873 get_answer: (43 bytes) => ab 01 26 82 00 00 00 00 00 00 00 03 00 00 00 00 0.369072 00 00 00 00 00 00 00 00 00 01 40 00 00 00 00 00 00 03 00 08 0e 00 00 00 03 0.371264 00 4c 5.036304 get_answer: (121 bytes) => 02 80 00 60 00 00 0e 00 01 00 10 50 4f 57 45 52 5.040517 57 41 52 45 20 55 50 53 20 20 20 5c 00 00 00 00 00 00 00 00 00 00 00 00 00 5.043456 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5.043891 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5.045378 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 5.045910 00 00 00 f0 16 5.047174 send_to_all: SETINFO ups.firmware "Cont:00.80 Inve:00.60" 5.047651 send_to_all: SETINFO ups.power.nominal "700" 5.047985 send_to_all: SETINFO output.phases "1" 5.048312 send_to_all: SETINFO ups.mfr "Eaton" 5.049853 send_to_all: SETINFO ups.model "POWERWARE UPS 700i" 5.050184 Length of meter map: 92 5.050519 Index Offset Format NUT 5.051908 0091 0000 f0 input.quality 5.052437 5.052719 Length of alarm map: 22 5.053033 Index Alarm Supported 5.054693 -001 INVERTER_AC_OVER_VOLTAGE No 5.055151 -001 INVERTER_AC_UNDER_VOLTAGE No 5.056534 -001 INVERTER_OVER_OR_UNDER_FREQ No 5.056988 0000 BYPASS_AC_OVER_VOLTAGE Yes 5.057412 -001 BYPASS_AC_UNDER_VOLTAGE No 5.057834 -001 BYPASS_OVER_OR_UNDER_FREQ No 5.059396 0001 INPUT_AC_OVER_VOLTAGE Yes 5.059852 0002 INPUT_AC_UNDER_VOLTAGE Yes 5.061050 0003 INPUT_UNDER_OR_OVER_FREQ Yes 5.061560 -001 OUTPUT_OVER_VOLTAGE No 5.062001 -001 OUTPUT_UNDER_VOLTAGE No 5.062538 -001 OUTPUT_UNDER_OR_OVER_FREQ No 5.064115 0004 REMOTE_EMERGENCY_PWR_OFF Yes 5.064567 -001 REMOTE_GO_TO_BYPASS No 5.065929 -001 BUILDING_ALARM_6 No 5.066393 0005 BUILDING_ALARM_5 Yes 5.066818 -001 BUILDING_ALARM_4 No 5.067245 -001 BUILDING_ALARM_3 No 5.068803 0006 BUILDING_ALARM_2 Yes 5.069274 0007 BUILDING_ALARM_1 Yes 5.069703 -001 STATIC_SWITCH_OVER_TEMP No 5.070999 0008 CHARGER_OVER_TEMP Yes 5.071460 0009 CHARGER_LOGIC_PWR_FAIL Yes 5.071890 -001 CHARGER_OVER_VOLTAGE_OR_CURRENT No *5.073389 0010 INVERTER_OVER_TEMP Yes 5.073859 0011 OUTPUT_OVERLOAD Yes 5.074280 -001 RECTIFIER_INPUT_OVER_CURRENT No 5.075496 -001 INVERTER_OUTPUT_OVER_CURRENT No 5.076070 0012 DC_LINK_OVER_VOLTAGE Yes 5.076493 -001 DC_LINK_UNDER_VOLTAGE No 5.078021 -001 RECTIFIER_FAILED No 5.078634 -001 INVERTER_FAULT No 5.079073 0013 BATTERY_CONNECTOR_FAIL Yes 5.080329 0014 BYPASS_BREAKER_FAIL Yes 5.080795 0015 CHARGER_FAIL Yes 5.081164 -001 RAMP_UP_FAILED No 5.081257 0016 STATIC_SWITCH_FAILED Yes 5.081332 0017 ANALOG_AD_REF_FAIL Yes 5.081408 0018 BYPASS_UNCALIBRATED Yes 5.081482 -001 RECTIFIER_UNCALIBRATED No 5.081552 -001 OUTPUT_UNCALIBRATED No 5.081628 0019 INVERTER_UNCALIBRATED Yes 5.081700 0020 DC_VOLT_UNCALIBRATED Yes 5.081772 0021 OUTPUT_CURRENT_UNCALIBRATED Yes 5.081846 -001 RECTIFIER_CURRENT_UNCALIBRATED No 5.081922 -001 BATTERY_CURRENT_UNCALIBRATED No 5.081995 -001 INVERTER_ON_OFF_STAT_FAIL No 5.082068 0022 BATTERY_CURRENT_LIMIT Yes 5.082141 -001 INVERTER_STARTUP_FAIL No 5.082213 0023 ANALOG_BOARD_AD_STAT_FAIL Yes 5.082288 0024 OUTPUT_CURRENT_OVER_100 Yes 5.082361 0025 BATTERY_GROUND_FAULT Yes 5.082437 0026 WAITING_FOR_CHARGER_SYNC Yes 5.082514 0027 NV_RAM_FAIL Yes 5.082586 -001 ANALOG_BOARD_AD_TIMEOUT No 5.082661 0028 SHUTDOWN_IMMINENT Yes 5.082732 0029 BATTERY_LOW Yes 5.082802 0030 UTILITY_FAIL Yes 5.082877 0031 OUTPUT_SHORT_CIRCUIT Yes 5.082947 0032 UTILITY_NOT_PRESENT Yes 5.083022 0033 FULL_TIME_CHARGING Yes 5.083091 0034 FAST_BYPASS_COMMAND Yes 5.083164 0035 AD_ERROR Yes 5.083236 0036 INTERNAL_COM_FAIL Yes 5.083306 0037 RECTIFIER_SELFTEST_FAIL Yes 5.083387 -001 RECTIFIER_EEPROM_FAIL No 5.083458 -001 RECTIFIER_EPROM_FAIL No 5.083533 -001 INPUT_LINE_VOLTAGE_LOSS No 5.083606 -001 BATTERY_DC_OVER_VOLTAGE No 5.083678 -001 POWER_SUPPLY_OVER_TEMP No 5.083750 -001 POWER_SUPPLY_FAIL No 5.083824 -001 POWER_SUPPLY_5V_FAIL No 5.083898 -001 POWER_SUPPLY_12V_FAIL No 5.083970 -001 HEATSINK_OVER_TEMP No 5.084041 -001 HEATSINK_TEMP_SENSOR_FAIL No 5.084115 -001 RECTIFIER_CURRENT_OVER_125 No 5.084187 -001 RECTIFIER_FAULT_INTERRUPT_FAIL No 5.084268 -001 RECTIFIER_POWER_CAPASITOR_FAIL No 5.084339 -001 INVERTER_PROGRAM_STACK_ERROR No 5.084412 -001 INVERTER_BOARD_SELFTEST_FAIL No 5.084486 -001 INVERTER_AD_SELFTEST_FAIL No 5.084557 -001 INVERTER_RAM_SELFTEST_FAIL No 5.084632 -001 NV_MEMORY_CHECKSUM_FAIL No 5.084703 -001 PROGRAM_CHECKSUM_FAIL No 5.084778 -001 INVERTER_CPU_SELFTEST_FAIL No 5.084851 -001 NETWORK_NOT_RESPONDING No 5.084921 -001 FRONT_PANEL_SELFTEST_FAIL No 5.084998 -001 NODE_EEPROM_VERIFICATION_ERROR No 5.085073 -001 OUTPUT_AC_OVER_VOLT_TEST_FAIL No 5.085148 -001 OUTPUT_DC_OVER_VOLTAGE No 5.085225 -001 INPUT_PHASE_ROTATION_ERROR No 5.085298 -001 INVERTER_RAMP_UP_TEST_FAILED No 5.085373 0038 INVERTER_OFF_COMMAND Yes 5.085445 0039 INVERTER_ON_COMMAND Yes 5.085520 0040 TO_BYPASS_COMMAND Yes 5.085590 0041 FROM_BYPASS_COMMAND Yes 5.093405 0042 AUTO_MODE_COMMAND Yes 5.095051 0043 EMERGENCY_SHUTDOWN_COMMAND Yes 5.095510 -001 SETUP_SWITCH_OPEN No 5.096892 -001 INVERTER_OVER_VOLT_INT No 5.097339 0044 INVERTER_UNDER_VOLT_INT Yes 5.097769 0045 ABSOLUTE_DCOV_ACOV Yes 5.098966 0046 PHASE_A_CURRENT_LIMIT Yes 5.100085 -001 PHASE_B_CURRENT_LIMIT No 5.100521 -001 PHASE_C_CURRENT_LIMIT No 5.102295 0047 BYPASS_NOT_AVAILABLE Yes 5.102860 0048 RECTIFIER_BREAKER_OPEN Yes 5.103295 0049 BATTERY_CONTACTOR_OPEN Yes 5.103726 -001 INVERTER_CONTACTOR_OPEN No 5.104154 -001 BYPASS_BREAKER_OPEN No 5.105861 -001 INV_BOARD_ACOV_INT_TEST_FAIL No 5.106317 0050 INVERTER_OVER_TEMP_TRIP Yes 5.106740 -001 INV_BOARD_ACUV_INT_TEST_FAIL No 5.107993 0051 INVERTER_VOLTAGE_FEEDBACK_ERROR Yes 5.108430 0052 DC_UNDER_VOLTAGE_TIMEOUT Yes 5.108851 0053 AC_UNDER_VOLTAGE_TIMEOUT Yes 5.110522 0054 DC_UNDER_VOLTAGE_WHILE_CHARGE Yes 5.110999 0055 INVERTER_VOLTAGE_BIAS_ERROR Yes 5.112268 -001 RECTIFIER_PHASE_ROTATION No 5.112720 0056 BYPASS_PHASER_ROTATION Yes 5.113149 -001 SYSTEM_INTERFACE_BOARD_FAIL No 5.114658 -001 PARALLEL_BOARD_FAIL No 5.115110 -001 LOST_LOAD_SHARING_PHASE_A No 5.116475 -001 LOST_LOAD_SHARING_PHASE_B No 5.116925 -001 LOST_LOAD_SHARING_PHASE_C No 5.117360 -001 DC_OVER_VOLTAGE_TIMEOUT No 5.118961 -001 BATTERY_TOTALLY_DISCHARGED No 5.119429 -001 INVERTER_PHASE_BIAS_ERROR No 5.119858 -001 INVERTER_VOLTAGE_BIAS_ERROR_2 No 5.120279 -001 DC_LINK_BLEED_COMPLETE No 5.120708 -001 LARGE_CHARGER_INPUT_CURRENT No 5.121989 -001 INV_VOLT_TOO_LOW_FOR_RAMP_LEVEL No 5.122449 -001 LOSS_OF_REDUNDANCY No 5.122881 -001 LOSS_OF_SYNC_BUS No 5.124421 -001 RECTIFIER_BREAKER_SHUNT_TRIP No 5.124880 -001 LOSS_OF_CHARGER_SYNC No 5.125294 -001 INVERTER_LOW_LEVEL_TEST_TIMEOUT No 5.126147 -001 OUTPUT_BREAKER_OPEN No 5.128100 -001 CONTROL_POWER_ON No 5.128548 -001 INVERTER_ON No 5.128975 -001 CHARGER_ON No 5.129397 -001 BYPASS_ON No 5.130671 -001 BYPASS_POWER_LOSS No 5.131125 -001 ON_MANUAL_BYPASS No 5.131558 -001 BYPASS_MANUAL_TURN_OFF No 5.133063 -001 INVERTER_BLEEDING_DC_LINK_VOLT No 5.133516 -001 CPU_ISR_ERROR No 5.134866 -001 SYSTEM_ISR_RESTART No 5.135307 -001 PARALLEL_DC No 5.136981 -001 BATTERY_NEEDS_SERVICE No 5.137473 -001 BATTERY_CHARGING No 5.137898 -001 BATTERY_NOT_CHARGED No 5.139162 -001 DISABLED_BATTERY_TIME No 5.139610 -001 SERIES_7000_ENABLE No 5.140029 0057 OTHER_UPS_ON Yes 5.141526 -001 PARALLEL_INVERTER No 5.141973 0058 UPS_IN_PARALLEL Yes 5.142455 -001 OUTPUT_BREAKER_REALY_FAIL No 5.143756 -001 CONTROL_POWER_OFF No 5.144200 -001 LEVEL_2_OVERLOAD_PHASE_A No 5.144635 0059 LEVEL_2_OVERLOAD_PHASE_B Yes 5.146318 -001 LEVEL_2_OVERLOAD_PHASE_C No 5.146768 0060 LEVEL_3_OVERLOAD_PHASE_A Yes 5.147194 -001 LEVEL_3_OVERLOAD_PHASE_B No 5.148485 0061 LEVEL_3_OVERLOAD_PHASE_C Yes 5.148934 0062 LEVEL_4_OVERLOAD_PHASE_A Yes 5.149364 0063 LEVEL_4_OVERLOAD_PHASE_B Yes 5.151018 -001 LEVEL_4_OVERLOAD_PHASE_C No 5.151480 -001 UPS_ON_BATTERY No 5.152754 0064 UPS_ON_BYPASS Yes 5.153212 0065 LOAD_DUMPED Yes 5.153642 0066 LOAD_ON_INVERTER Yes 5.155232 -001 UPS_ON_COMMAND No 5.155829 -001 UPS_OFF_COMMAND No 5.157086 -001 LOW_BATTERY_SHUTDOWN No 5.157542 0067 AUTO_ON_ENABLED Yes 5.157955 5.159298 Length of Config_block: 8382 5.159724 Length of statistics map: 29 5.160043 Length of alarm history log: 5371 5.161211 Length of topology block: 5310 5.161566 Length of max supported command length: 117 5.161879 Length of command list: 0 5.162189 Length of outlet_block: 0 5.163681 Length of alarm_block: 0 5.164066 send_read_command: (4 bytes) => ab 01 36 1e 5.165463 entering get_answer(36) 5.294858 get_answer: (69 bytes) => ab 06 40 81 c2 01 21 0c 00 00 f4 01 f0 00 32 00 5.299030 00 00 00 00 b8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 5.302039 00 60 00 00 00 00 00 00 00 00 11 31 30 33 30 30 34 32 35 34 2d 35 35 39 31 5.302427 20 20 da 5.302773 get_answer: block_number = 6 5.304175 get_answer: data length = 64 5.304481 get_answer: sequence number (1) is ok 5.304765 get_answer: checksum is ok 5.305044 get_answer: all data received 5.306357 get_answer: (64 bytes) => c2 01 21 0c 00 00 f4 01 f0 00 32 00 00 00 00 00 5.306758 b8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 60 00 00 5.307127 00 00 00 00 00 00 11 31 30 33 30 30 34 32 35 34 2d 35 35 39 31 20 20 5.308685 send_to_all: SETINFO output.voltage.nominal "240" 5.309048 send_to_all: SETINFO output.frequency.nominal "50" 5.310224 send_to_all: SETINFO device.part "103004254-5591 " 5.310720 send_read_command: (4 bytes) => ab 01 3c 18 5.312138 entering get_answer(3c) 5.342845 get_answer: (22 bytes) => ab 0c 11 81 f0 00 32 00 08 00 43 30 f4 01 00 00 5.345070 00 00 00 00 01 24 5.345383 get_answer: block_number = c 5.346567 get_answer: data length = 17 5.347236 get_answer: sequence number (1) is ok 5.348337 get_answer: checksum is ok 5.348666 get_answer: all data received 5.349028 get_answer: (17 bytes) => f0 00 32 00 08 00 43 30 f4 01 00 00 00 00 00 00 5.349328 01 5.350883 send_to_all: SETINFO input.voltage.nominal "240" 5.351255 send_to_all: SETINFO input.frequency.nominal "50" 5.352457 send_to_all: SETINFO input.frequency.low "45" 5.352826 send_to_all: SETINFO input.frequency.high "55" 5.353129 Shutdown delay longer than battery capacity when Low Battery warning is given. (max 60 seconds) 5.353454 send_to_all: SETINFO ups.beeper.status "disabled" 5.354985 send_to_all: SETINFO ambient.temperature.low "255" 5.355336 send_to_all: SETINFO ambient.temperature.high "255" 5.355778 send_to_all: SETINFO battery.runtime.low "1" 5.357014 send_to_all: SETINFO battery.charge.restart "255" 5.357349 send_to_all: ADDCMD shutdown.return 5.357646 send_to_all: ADDCMD shutdown.stayoff 5.357931 send_to_all: ADDCMD test.battery.start 5.359526 send_read_command: (4 bytes) => ab 01 43 11 5.360900 entering get_answer(43) 5.374823 get_answer: (9 bytes) => ab 13 03 81 10 00 00 ae 00 5.375202 get_answer: block_number = 13 5.375489 get_answer: data length = 3 5.376697 get_answer: sequence number (1) is ok 5.377000 get_answer: checksum is ok 5.377281 get_answer: all data received 5.377599 get_answer: (3 bytes) => 10 00 00 5.377895 nut_find_infoval: found Off-line switcher, Single Phase (value: 16) 5.379384 send_to_all: SETINFO ups.description "Off-line switcher, Single Phase" 5.379753 send_write_command: (7 bytes) => ab 04 cf 69 e8 d5 5c 7.381379 send_write_command: (7 bytes) => ab 04 95 ff 00 00 bd 9.382703 entering get_answer(95) 9.502838 get_answer: (10 bytes) => ab 09 05 81 32 95 ff 00 00 00 9.506841 get_answer: block_number = 9 9.509763 get_answer: data length = 5 9.510100 get_answer: sequence number (1) is ok 9.510441 get_answer: checksum is ok 9.511840 get_answer: all data received 9.512225 get_answer: (5 bytes) => 32 95 ff 00 00 9.512548 send_read_command: (4 bytes) => ab 01 34 20 9.513894 entering get_answer(34) 9.534817 get_answer: (9 bytes) => ab 04 04 81 00 00 00 00 cc 9.536069 get_answer: block_number = 4 9.536377 get_answer: data length = 4 9.536656 get_answer: sequence number (1) is ok 9.538144 get_answer: checksum is ok 9.538452 get_answer: all data received 9.538773 get_answer: (4 bytes) => 00 00 00 00 9.539961 send_to_all: SETINFO input.quality "0" 9.540334 send_read_command: (4 bytes) => ab 01 35 1f 9.541761 entering get_answer(35) 9.566829 get_answer: (9 bytes) => ab 05 03 81 00 00 00 cc 00 9.569042 get_answer: block_number = 5 9.569357 get_answer: data length = 3 9.569643 get_answer: sequence number (1) is ok 9.571035 get_answer: checksum is ok 9.571351 get_answer: all data received 9.571669 get_answer: (3 bytes) => 00 00 00 9.573047 send_to_all: SETINFO ups.alarm "BUILDING_ALARM_5 BUILDING_ALARM_2 BUILDING_ALARM_1 CHARGER_OVER_TEMP CHARGER_LOGIC_PWR_FAIL INVERTER_OVER_TEMP OUTPUT_OVERLOAD DC_LINK_OVER_VOLTAGE BATTERY_CONNECTOR_FAIL BYPASS_BREAKER_FAIL CHARGER_FAIL ANALOG_AD_REF_FAIL TO_BYPASS_COMMAND FROM_BYPASS_CO" 9.573440 send_read_command: (4 bytes) => ab 01 33 21 9.576874 entering get_answer(33) 9.598851 get_answer: (9 bytes) => ab 03 02 81 50 82 fd 00 00 9.599243 get_answer: block_number = 3 9.599535 get_answer: data length = 2 9.600669 get_answer: sequence number (1) is ok 9.601000 get_answer: checksum is ok 9.601281 get_answer: all data received 9.601590 get_answer: (2 bytes) => 50 82 9.602994 send_to_all: SETINFO ups.status "ALARM OL" 9.603431 send_read_command: (4 bytes) => ab 01 3b 19 9.605584 entering get_answer(3b) 9.614816 get_answer: (7 bytes) => ab 09 02 81 32 3b 5c 9.615202 get_answer: block_number = 9 9.615497 get_answer: data length = 2 9.615912 get_answer: sequence number (1) is ok 9.617379 get_answer: checksum is ok 9.617693 get_answer: all data received 9.618005 get_answer: (2 bytes) => 32 3b 9.618319 Battery Status: (2 bytes) => 32 3b 9.619501 nut_findinfoval: no matching INFO value for this XCP value (50) 9.619800 Failed to extract Battery Status from answer 9.620090 ABM Status = 0 9.620411 send_read_command: (4 bytes) => ab 01 3c 18 9.622944 entering get_answer(3c) 9.662839 get_answer: (22 bytes) => ab 0c 11 81 f0 00 32 00 08 00 43 30 f4 01 00 00 9.665989 00 00 00 00 01 24 9.666312 get_answer: block_number = c 9.666591 get_answer: data length = 17 9.668047 get_answer: sequence number (1) is ok 9.668358 get_answer: checksum is ok 9.668641 get_answer: all data received 9.669852 get_answer: (17 bytes) => f0 00 32 00 08 00 43 30 f4 01 00 00 00 00 00 00 9.670173 01 9.670629 send_read_command: (4 bytes) => ab 01 36 1e 9.673221 entering get_answer(36) 9.806867 get_answer: (69 bytes) => ab 06 40 81 c2 01 21 0c 00 00 f4 01 f0 00 32 00 9.810871 00 00 00 00 b8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 9.813841 00 60 00 00 00 00 00 00 00 00 11 31 30 33 30 30 34 32 35 34 2d 35 35 39 31 9.815304 20 20 da 9.815758 get_answer: block_number = 6 9.816064 get_answer: data length = 64 9.816345 get_answer: sequence number (1) is ok 9.817406 get_answer: checksum is ok 9.817775 get_answer: all data received 9.818147 get_answer: (64 bytes) => c2 01 21 0c 00 00 f4 01 f0 00 32 00 00 00 00 00 9.818534 b8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 60 00 00 9.820024 00 00 00 00 00 00 11 31 30 33 30 30 34 32 35 34 2d 35 35 39 31 20 20 9.820360 send_to_all: DATAOK 9.821047 dstate_init: sock /var/run/nut/bcmxcp_usb-ups open on fd 5 9.822428 send_to_all: SETINFO driver.parameter.pollinterval "2" 9.823997 send_to_all: SETINFO driver.parameter.synchronous "no" 9.824363 send_to_all: SETINFO device.mfr "Eaton" 9.825566 send_to_all: SETINFO device.model "POWERWARE UPS 700i" 9.826059 send_read_command: (4 bytes) => ab 01 34 20 9.827501 entering get_answer(34) 9.838838 get_answer: (9 bytes) => ab 04 04 81 00 00 00 00 cc 9.840337 get_answer: block_number = 4 9.840651 get_answer: data length = 4 9.840937 get_answer: sequence number (1) is ok 9.841227 get_answer: checksum is ok 9.842370 get_answer: all data received 9.842716 get_answer: (4 bytes) => 00 00 00 00 9.843071 send_read_command: (4 bytes) => ab 01 35 1f 9.844493 entering get_answer(35) 9.870823 get_answer: (9 bytes) => ab 05 03 81 00 00 00 cc 00 9.873084 get_answer: block_number = 5 9.873401 get_answer: data length = 3 9.873683 get_answer: sequence number (1) is ok 9.875045 get_answer: checksum is ok 9.875400 get_answer: all data received 9.875925 get_answer: (3 bytes) => 00 00 00 9.876556 send_to_all: SETINFO ups.alarm "REMOTE_EMERGENCY_PWR_OFF BUILDING_ALARM_5 BUILDING_ALARM_2 BUILDING_ALARM_1 CHARGER_OVER_TEMP CHARGER_LOGIC_PWR_FAIL INVERTER_OVER_TEMP OUTPUT_OVERLOAD DC_LINK_OVER_VOLTAGE BATTERY_CONNECTOR_FAIL BYPASS_BREAKER_FAIL CHARGER_FAIL STATIC_SWITCH_FAILED ANALO" 9.877790 send_read_command: (4 bytes) => ab 01 33 21 9.879291 entering get_answer(33) 9.902786 get_answer: (9 bytes) => ab 03 02 81 50 82 fd 00 00 9.905021 get_answer: block_number = 3 9.905343 get_answer: data length = 2 9.905741 get_answer: sequence number (1) is ok 9.907152 get_answer: checksum is ok 9.907499 get_answer: all data received 9.907809 get_answer: (2 bytes) => 50 82 9.908154 send_read_command: (4 bytes) => ab 01 3b 19 9.910261 entering get_answer(3b) 9.918828 get_answer: (7 bytes) => ab 09 02 81 32 3b 5c 9.919216 get_answer: block_number = 9 9.919511 get_answer: data length = 2 9.919798 get_answer: sequence number (1) is ok 9.921136 get_answer: checksum is ok 9.921533 get_answer: all data received 9.921852 get_answer: (2 bytes) => 32 3b 9.922999 Battery Status: (2 bytes) => 32 3b 9.923342 nut_findinfoval: no matching INFO value for this XCP value (50) 9.923628 Failed to extract Battery Status from answer 9.923922 ABM Status = 200 9.925413 send_read_command: (4 bytes) => ab 01 3c 18 9.926965 entering get_answer(3c) 9.966833 get_answer: (22 bytes) => ab 0c 11 81 f0 00 32 00 08 00 43 30 f4 01 00 00 9.969876 00 00 00 00 01 24 9.970204 get_answer: block_number = c 9.971641 get_answer: data length = 17 9.971960 get_answer: sequence number (1) is ok 9.972250 get_answer: checksum is ok 9.973385 get_answer: all data received 9.973778 get_answer: (17 bytes) => f0 00 32 00 08 00 43 30 f4 01 00 00 00 00 00 00 9.974083 01 9.975543 send_to_all: SETINFO input.transfer.low "20565" 9.976082 send_to_all: SETINFO input.transfer.high "8275"** 9.977275 send_to_all: SETINFO ambient.temperature.high "48" 9.977642 send_to_all: SETINFO input.transfer.delay "8224" 9.977967 send_to_all: SETINFO battery.charge.restart "32" 9.979413 send_read_command: (4 bytes) => ab 01 36 1e 9.980831 entering get_answer(36) 10.110860 get_answer: (69 bytes) => ab 06 40 81 c2 01 21 0c 00 00 f4 01 f0 00 32 00 10.114803 00 00 00 00 b8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 10.117944 00 60 00 00 00 00 00 00 00 00 11 31 30 33 30 30 34 32 35 34 2d 35 35 39 31 10.118295 20 20 da 10.119834 get_answer: block_number = 6 10.120168 get_answer: data length = 64 10.120454 get_answer: sequence number (1) is ok 10.121570 get_answer: checksum is ok 10.121887 get_answer: all data received 10.122261 get_answer: (64 bytes) => c2 01 21 0c 00 00 f4 01 f0 00 32 00 00 00 00 00 10.122651 b8 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 60 00 00 10.124177 00 00 00 00 00 00 11 31 30 33 30 30 34 32 35 34 2d 35 35 39 31 20 20

I find it surprising as this exact model has an entry on the supported hardware list yet both units are functionally ok, perhaps there's a different firmware version in the UPSs I have here compared to the ones used to validate the driver as per the link.

Any direction or input would be appreciated, I'd really like to be able to monitor and control these with nut and as stated earlier if I can be pointed to the relevant bits of the code I'll put in some effort myself if need be.

clepple commented 4 years ago

Thanks for gathering the debug logs, and taking the time to check against the vendor software.

I'm scratching my head on this one, too. From a quick glance at git diff -w v2.6.3.. -- drivers/bcmxcp*, it looks like the majority of the changes were enhancements to read and parse additional fields from the UPS. It is certainly possible that nobody scrutinized the output of the driver connected to a Powerware 3105 after those changes were made (and the changes seem oriented towards other models, including multi-phase UPSes).

There are a few different angles you can take. I think a lot of them involve being able to recompile the driver, so I would recommend picking one of the boxes as your development machine, and making sure you can rebuild from the latest code on the GitHub master branch. (I don't expect it will magically work; it just means we can debug the compilation and driver fixes in two independent steps.) For pfsense, I think you should be able to adapt the FreeBSD instructions on the wiki. I am less familiar with BSD in general, but I might be able to help you muddle through common problems. The Pi should work with the Debian instructions. Aside from the initial compilation, the speed of the Pi should not be too much of a limiting factor.

Note also that we have some protocol documents linked here: https://networkupstools.org/ups-protocols.html#_eaton

The workhorse of any driver is the upsdrv_updateinfo() function, which is in drivers/bcmxcp.c for your UPS. Since your UPS seems to be working well with the vendor software, we can probably assume that the received bytes are valid. (However, I don't know anything about LanSafe, so if there is another protocol besides XCP that LanSafe could be using, that assumption is not necessarily valid.) Either way, it might make sense to work through the parsing code, maybe inserting some extra debug statements as needed. I will say it is also possible that a combination of the underlying NUT and OS USB code is at fault, since OS distributions have been making subtle changes to the USB stack that NUT seems particularly sensitive to (see,, for instance, the fallout from issue #300).

bradtpt commented 4 years ago

@clepple thank you so much for the quick and detailed reply. Turns out I have a few of these Eaton x-slot series UPS laying around and as curiosity got the better of me I ducked into work and grabbed a couple of different models I had tucked away. I now have the following models as test subjects sitting under my home office desk to play with:

bcmxcp_usb reports false alarms and other inaccurate data with all 3 and I've confirmed that all 3 test and behave as they should using the vendor's Lansafe v6.06 software which is period accurate for these, I note Eaton don't even list the 5110 and 3105 series on their website any more for support. I've had intermittent results with ups.status simultaneously reporting OL & OB when the UPS has been mains powered and should be reporting OL only, after power cycling the UPS via its power switch a couple of times I've found this will report correctly albeit still with a persistent ALARM state due to the huge list that it always has. Another interesting 'feature' I found today with the 5110/500VA unit is when it's OL and I plug a small load into it (just a laptop) the UPS would for some reason report LB (low battery) and immediately nut would do its thing and initiate a system shutdown on my 'test pi' which I have powered independently. I had this happen multiple times so there's clearly something not right here. I won't worry at this stage with posting debug logs from the other models as it'll only serve to clutter the thread and not provide anything useful. If one of the 5110's had of worked correctly I think another log would be relevant so we could compare.

I had already started to follow the directions for compiling nut on my pi earlier today as I figured we'd have to go down this road so I'll finish doing that and start digging. Thank you again.

ssamjh commented 3 years ago

Would also like to confirm this issue on my POWERWARE UPS 1500i (5110)

Ressy66 commented 3 years ago

Hey Guys, Late to the party, but, what kernels are you using? 5.x? 32bit/64bit?

I recently upgraded a machine from slackware 14 to slackware -current (aka 14.2"plus" aka 15.0), I used the same 2.7.4 nut version built the same way I always have, that worked flawlessly, until the new OS/kernel was installed, so perhaps this is a compat issue somewhere with kernel?

Here, it runs on a 32bit using 5.10.3-smp - but this is a recent upgrade, it also had same false reports including the false "replace battery" alerts and false constant cycling on-battery to online with earlier 5.4.x kernel

Ressy66 commented 3 years ago

did anyone manage to resolve this issue?

Ressy66 commented 3 years ago

I guess no one ever got this fixed?

Evakron commented 3 years ago

Just to add another data point- running an Eaton Powerware 5110 with fresh batteries. No alarms reported by Intelligent Power Manager when connected over local USB. UPS supports load no problem, it's even kept my server and router up during actual power outages a number of times already. Nut is however reporting all the faults. UPSC dump below:

battery.charge.low: 22
battery.charge.restart: 244
battery.charger.status: charging
battery.energysave.delay: 76
battery.energysave.load: 204
battery.packs: 1
battery.runtime.low: 1
battery.voltage:  27.2
battery.voltage.low: 20
device.mfr: Eaton
device.model: POWERWARE UPS    1000i
device.part: 103004268-5591
device.type: ups
driver.name: bcmxcp_usb
driver.parameter.pollinterval: 2
driver.parameter.port: auto
driver.parameter.synchronous: no
driver.version: 2.7.4
driver.version.internal: 0.31
input.frequency:  49.9
input.frequency.high: 55
input.frequency.low: 45
input.frequency.nominal: 50
input.quality: 0
input.transfer.boost.high: 216
input.transfer.high: 280
input.transfer.low: 186
input.transfer.trim.low: 260
input.voltage: 244
input.voltage.nominal: 240
output.current:   0.0
output.current.nominal:   2.5
output.frequency:  49.9
output.frequency.nominal: 50
output.phases: 1
output.voltage: 242
output.voltage.nominal: 240
ups.alarm: STATIC_SWITCH_OVER_TEMP CHARGER_LOGIC_PWR_FAIL DC_LINK_UNDER_VOLTAGE STATIC_SWITCH_FAILED BATTERY_CURRENT_UNCALIBRATED INVERTER_AD_SELFTEST_FAIL INVERTER_RAM_SELFTEST_FAIL INVERTER_CPU_SELFTEST_FAIL INVERTER_PHASE_BIAS_ERROR DC_LINK_BLEED_COMPLETE LARGE_C
ups.beeper.status: enabled
ups.description: Line-Interactive UPS, Single Phase
ups.firmware: Cont:00.50 Inve:01.50
ups.load: 7
ups.mfr: Eaton
ups.model: POWERWARE UPS    1000i
ups.power.nominal: 1000
ups.status: ALARM OL RB
ups.test.result: Done and passed

Apart from the fault reporting, everything seems to work OK.

pcdeem commented 2 years ago

@clepple thank you so much for the quick and detailed reply. Turns out I have a few of these Eaton x-slot series UPS laying around and as curiosity got the better of me I ducked into work and grabbed a couple of different models I had tucked away. I now have the following models as test subjects sitting under my home office desk to play with:

  • Powerware 3105 700VA
  • Powerware 5110 500VA
  • Powerware 5110 1500VA

bcmxcp_usb reports false alarms and other inaccurate data with all 3 and I've confirmed that all 3 test and behave as they should using the vendor's Lansafe v6.06 software which is period accurate for these, I note Eaton don't even list the 5110 and 3105 series on their website any more for support. I've had intermittent results with ups.status simultaneously reporting OL & OB when the UPS has been mains powered and should be reporting OL only, after power cycling the UPS via its power switch a couple of times I've found this will report correctly albeit still with a persistent ALARM state due to the huge list that it always has. Another interesting 'feature' I found today with the 5110/500VA unit is when it's OL and I plug a small load into it (just a laptop) the UPS would for some reason report LB (low battery) and immediately nut would do its thing and initiate a system shutdown on my 'test pi' which I have powered independently. I had this happen multiple times so there's clearly something not right here. I won't worry at this stage with posting debug logs from the other models as it'll only serve to clutter the thread and not provide anything useful. If one of the 5110's had of worked correctly I think another log would be relevant so we could compare.

I had already started to follow the directions for compiling nut on my pi earlier today as I figured we'd have to go down this road so I'll finish doing that and start digging. Thank you again.

I've had intermittent results with ups.status simultaneously reporting OL & OB when the UPS has been mains powered and should be reporting OL only,

I would also like to confirm I am seeing this issue with a Powerware 5110 500VA but only on Raspberry Pi's. I have even gone back to Debian Stretch and see the same issue. Any other architectures have no issues. I am monitoring here using a Banana Pi R2 with Debian and Kernel 4.19 and have also tested on Debian installed on a desktop pc here and see no issues at all. Only on Raspberry Pi's Model A, 2, 3 and also 4 which I have here. I see OL & OB at the same time and also got OL OB RB and a bunch of others all at the same time. Sometimes everything is good but after restarting the driver it all falls over. usbhid-ups works fine on Raspberry Pi as we also have a Dell UPS1920W which we use a Pi to monitor. It seems to just be this driver. I have also compiled and tested up branch libusb1.0+0.1 thinking libusb might be the issue but there was no change with the ups.status showing ALARM OL OB RB all at the same time.

davidmonro commented 1 week ago

I am also seeing this on a 5110 500VA, on x86_64 ubuntu 24.04. Happy to do some debugging if needed since it isn't in a production state at the moment

jimklimov commented 1 week ago

I think something like this was addressed (or at least discussed) in the past couple of years, in some other ticket. IIRC @arnaudquette-eaton wanted to discuss it with the HW/FW team internally, whether it was a bug on that level.

FWIW, @davidmonro : can you check which NUT version you have? Distros tend to lag behind, you might want to try testing with current codebase (not necessarily installing it over the packaged binaries, unless you like the custom build better) - see https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests

Latest NUT release was 2.8.2 and some months of improvements have accumulated since then on master branch.

davidmonro commented 1 week ago

Looks like I currently have 2.8.1. I'll build from master and see what happens.

jimklimov commented 1 week ago

For kicks, I wonder if it is worth pointing other drivers at the device, e.g. if usbhid-ups or nutdrv_qx would find something they can understand. You may have to explicitly specify a set of options including vendorid, productid and subdriver (and/or protocol in QX) if the IDs are not hard-coded as "known" in any of those subdrivers.