Skip to content

Commit

Permalink
drivers/cps-hid.c, NEWS.adoc: add ups.temperature [#2711]
Browse files Browse the repository at this point in the history
Kudos to Cyber Energy (affiliate of CPS) per
https://alioth-lists.debian.net/pipermail/nut-upsdev/2024-December/008069.html

Signed-off-by: Jim Klimov <[email protected]>
  • Loading branch information
jimklimov committed Dec 4, 2024
1 parent 10ad271 commit a2b2427
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ https://github.com/networkupstools/nut/milestone/11
the old behavior (if some devices do need it), while a fix is applied
by default: `powercom_sdcmd_byte_order_fallback`. [PR #2480]
* `cps-hid` subdriver now supports more variables, as available on e.g.
CP1350EPFCLCD model. [PR #2540]
CP1350EPFCLCD model, including temperature. [PRs #2540, #2711]
* USB parameters (per `usb_communication_subdriver_t`) are now set back to
their default values during enumeration after probing each subdriver.
Having an unrelated device connected with a VID:PID matching the
Expand Down
3 changes: 2 additions & 1 deletion drivers/cps-hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "cps-hid.h"
#include "usb-common.h"

#define CPS_HID_VERSION "CyberPower HID 0.81"
#define CPS_HID_VERSION "CyberPower HID 0.82"

/* Cyber Power Systems */
#define CPS_VENDORID 0x0764
Expand Down Expand Up @@ -234,6 +234,7 @@ static hid_info_t cps_hid2nut[] = {
{ "ups.timer.shutdown", 0, 0, "UPS.Output.DelayBeforeShutdown", NULL, "%.0f", HU_FLAG_QUICK_POLL, NULL},
{ "ups.timer.reboot", 0, 0, "UPS.Output.DelayBeforeReboot", NULL, "%.0f", HU_FLAG_QUICK_POLL, NULL},
{ "ups.firmware", 0, 0, "UPS.PowerSummary.CPSFirmwareVersion", NULL, "%s", HU_FLAG_STATIC, stringid_conversion },
{ "ups.temperature", 0, 0, "UPS.PowerSummary.Temperature", NULL, "%s", 0, kelvin_celsius_conversion },

/* Special case: ups.status & ups.alarm */
{ "BOOL", 0, 0, "UPS.PowerSummary.PresentStatus.ACPresent", NULL, NULL, HU_FLAG_QUICK_POLL, online_info },
Expand Down

0 comments on commit a2b2427

Please sign in to comment.