drivers/powercom-hid.c: add Output section shutdown for RPT/BNT-AP series#3324
Open
Vladdrako wants to merge 1 commit intonetworkupstools:masterfrom
Open
drivers/powercom-hid.c: add Output section shutdown for RPT/BNT-AP series#3324Vladdrako wants to merge 1 commit intonetworkupstools:masterfrom
Vladdrako wants to merge 1 commit intonetworkupstools:masterfrom
Conversation
…ries Some Powercom UPS models (e.g. RPT-800AP, BNT-AP) experience unreliable shutdown.return behavior when using the PowerSummary section (UPS.PowerSummary.DelayBeforeShutdown, ReportID 0x0f). While the initial shutdown command works, after several shutdown.return cycles the UPS fails to restart and remains in a powered-off state instead of turning back on. Comparison with the vendor's UPSMON PRO software behavior (by reading back register values via NUT debug mode) revealed that the vendor software uses the Output section register (UPS.Output.DelayBeforeShutdown, ReportID 0x23) instead. This 8-bit register accepts a discrete delay index (1-18) per the protocol specification: Index 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Value 12s 18s 24s 30s 36s 42s 48s 54s 1m 2m 3m 4m 5m 6m 7m 8m 9m 10m Using the Output section register provides reliable shutdown.return behavior across repeated cycles. This commit adds: - powercom_shutdown_output_nuf(): converts offdelay seconds to the nearest discrete delay index for the Output section register. - shutdown.return and shutdown.stayoff command mappings via UPS.Output.DelayBeforeShutdown, placed before the existing PowerSummary mappings so they take priority on affected models. The existing PowerSummary shutdown commands are preserved as fallback for models that use them (e.g. SKP, IMP, VGD series). Note: the Output section shutdown is silent, unlike the PowerSummary shutdown which produces audible warning beeps (double short beeps) during the countdown before powering off. Tested on: Powercom RPT-800AP (VendorID 0x0d9f, ProductID 0x0004) Signed-off-by: Vladysslv Andreichykov <vladdrako007@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some Powercom UPS models (e.g. RPT-800AP, BNT-AP) experience unreliable shutdown.return behavior when using the PowerSummary section (UPS.PowerSummary.DelayBeforeShutdown, ReportID 0x0f). While the initial shutdown command works, after several shutdown.return cycles the UPS fails to restart and remains in a powered-off state instead of turning back on.
Comparison with the vendor's UPSMON PRO software behavior (by reading back register values via NUT debug mode) revealed that the vendor software uses the Output section register (UPS.Output.DelayBeforeShutdown, ReportID 0x23) instead. This 8-bit register accepts a discrete delay index (1-18) per the protocol specification:
Index 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Value 12s 18s 24s 30s 36s 42s 48s 54s 1m 2m 3m 4m 5m 6m 7m 8m 9m 10m
Using the Output section register provides reliable shutdown.return behavior across repeated cycles.
This commit adds:
powercom_shutdown_output_nuf(): converts offdelay seconds to the nearest discrete delay index for the Output section register.
shutdown.return and shutdown.stayoff command mappings via UPS.Output.DelayBeforeShutdown, placed before the existing PowerSummary mappings so they take priority on affected models.
The existing PowerSummary shutdown commands are preserved as fallback for models that use them (e.g. SKP, IMP, VGD series).
Note: the Output section shutdown is silent, unlike the PowerSummary shutdown which produces audible warning beeps (double short beeps) during the countdown before powering off.
Tested on: Powercom RPT-800AP (VendorID 0x0d9f, ProductID 0x0004)