Skip to content

mge-hid: suppress CHRG on CC-mode devices when battery is fully charged#3519

Open
strasharo wants to merge 1 commit into
networkupstools:masterfrom
strasharo:fix/eaton-5e-chrg-status-at-full-charge
Open

mge-hid: suppress CHRG on CC-mode devices when battery is fully charged#3519
strasharo wants to merge 1 commit into
networkupstools:masterfrom
strasharo:fix/eaton-5e-chrg-status-at-full-charge

Conversation

@strasharo

@strasharo strasharo commented Jul 1, 2026

Copy link
Copy Markdown

Fixes #3518

Problem

On constant-charge (CC-mode) devices such as the Eaton 5E series, UPS.PowerSummary.PresentStatus.Charging stays asserted at 1 in float/maintenance mode. These devices do not expose UPS.BatterySystem.Charger.ABMEnable, so advanced_battery_monitoring remains ABM_UNKNOWN throughout the driver lifetime.

eaton_abm_check_chrg_fun() maps any Charging=1 directly to "chrg" when ABM_UNKNOWN, with no mechanism to detect float mode. The result is ups.status stuck at OL CHRG indefinitely once the battery reaches 100%.

Fix

When ABM_UNKNOWN or ABM_DISABLED and the UPS asserts Charging=1, consult battery.charge before publishing CHRG. If the battery is at 100% the charger is in float/maintenance mode, not actively charging, so return !chrg instead.

Testing

Tested on:

  • Eaton 5E 650i (vendor 0463, product ffff, subdriver MGE HID 1.58, firmware 01.04.0016): ups.status now shows OL at full charge
  • Eaton 5E 650i (firmware 03.08.0018): same result

Both units previously showed persistent OL CHRG with battery.charge: 100. After this change both report OL as expected.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

A ZIP file with standard source tarball and another tarball with pre-built docs for commit 4bca788 is temporarily available: NUT-tarballs-PR-3519.zip.

UPS.PowerSummary.PresentStatus.Charging stays asserted in float/
maintenance mode on constant-charge (CC-mode) devices such as the
Eaton 5E series. These devices do not expose the ABM HID path
(UPS.BatterySystem.Charger.ABMEnable), so advanced_battery_monitoring
stays ABM_UNKNOWN. eaton_abm_check_chrg_fun() then maps any
Charging=1 report directly to CHRG with no distinction between
active charging and float mode. The result is ups.status stuck at
OL CHRG indefinitely, even when battery.charge is 100.

Fix: when ABM is UNKNOWN or DISABLED and the UPS asserts Charging=1,
check battery.charge before publishing CHRG. If the battery is at
100% the charger is in float/maintenance mode, not actively charging,
so return !chrg instead.

Tested on Eaton 5E 650i (vendor 0463, product ffff, subdriver
MGE HID 1.58, firmware 01.04.0016) where ups.status now correctly
shows OL at full charge instead of OL CHRG.

Signed-off-by: strasharo <3337997+strasharo@users.noreply.github.com>
@strasharo strasharo force-pushed the fix/eaton-5e-chrg-status-at-full-charge branch from 4bca788 to c095216 Compare July 1, 2026 16:53
@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4910-master completed (commit 5fb99f23b4 by @strasharo)

@AppVeyorBot

Copy link
Copy Markdown

Build nut 2.8.5.4911-master completed (commit 2b35312adc by @strasharo)

@jimklimov

Copy link
Copy Markdown
Member

FYI: I'll be mostly offline till mid-month, so will review later. Thanks!

@strasharo

Copy link
Copy Markdown
Author

Have a nice vacation, thank you. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mge-hid: Eaton 5E series stuck at OL CHRG when battery is fully charged

3 participants