Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers/cps-hid.c, NEWS.adoc: add ups.temperature [#2711] #2711

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading