Skip to content

USB HID UPS / APC HID UPS shutdown command attempted order #2670

@Dummy0815

Description

@Dummy0815

Hi we are using an APC USB UPS with an Try Contact I/O card (AP9613) with an external key switch, to switch the UPS and therefor the connected systems with this key ON/OFF.
The APC is "simulating" an LOW BAT with key position OFF and triggers a UPS ON with the other position.
Everything works fine with the 'old' generation of APC (SUA750RMI1U, SUA750I, ..) but with the newer generation (SMT1500RMI2U) we have the issue, that if key OFF (low bat) triggers the system shut down, but the last command "upsdrvctl shutdown -> driver -k" sends an "shutdown.reboot" to the UPS. This causes the UPS to turn the outlets delayed off (which is what we want), but issuing a restart, which causes the UPS to turn on the outlets again (as main power is on the the whole time).
Reason seems to be that the 'old' APC's support the shutdown commands:
"shutdown.reboot", "shutdown.return", "shutdown.stayoff" (and load.off.delay)
While the newer ones only support:
"shutdown.reboot" (and load.off.delay)

So according the NUT documentation the driver -k tries to issue in a fixed order "shutdown.return", "shutdown.reboot", "load.off.delay".
So old APC is shutdown with "shutdown.return" which is Ok as the UPS stays down as the main power doesn't change.
While the newer, as they down support the first command, are doing an "shutdown.reboot" causing the issue we have.

So my question is there any parameter which influences the attempted command sequence? So that we could configure try: 'load.off.delay' first than, "shutdown.return", than "shutdown.reboot"?
As an workaround is there any chance to send a 'load.off.delay' in the final system shutdown stage instead of "upsdrvctl shutdown"?

For reference the output of an old vs an newer APC:
########################
upsc shups
..
device.mfr: American Power Conversion
device.model: Smart-UPS 750
driver.name: usbhid-ups
driver.version.data: APC HID 0.95
driver.version.internal: 0.38

upscmd -l shups
..
load.off.delay - Turn off the load with a delay (seconds)
shutdown.reboot - Shut down the load briefly while rebooting the UPS
shutdown.return - Turn off the load and return when power is back
shutdown.stayoff - Turn off the load and remain off

########################
upsc shups
..
device.mfr: American Power Conversion
device.model: Smart-UPS 1500
driver.name: usbhid-ups
driver.version: 2.7.2
driver.version.data: APC HID 0.95

upscmd -l shups
..
load.off.delay - Turn off the load with a delay (seconds)
shutdown.reboot - Shut down the load briefly while rebooting the UPS

Metadata

Metadata

Assignees

No one assigned

    Labels

    APCShutdowns and overrides and battery level triggersIssues and PRs about system shutdown, especially if battery charge/runtime remaining is involvedUSBimpacts-release-2.7.3-or-olderIssues reported against NUT release 2.7.3 or older, packaged or custom builds of code from that eraquestion

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions