diff --git a/NEWS.adoc b/NEWS.adoc index bc731f9339..a9059723ac 100644 --- a/NEWS.adoc +++ b/NEWS.adoc @@ -249,6 +249,8 @@ https://github.com/networkupstools/nut/milestone/12 continues polling rather than triggering expensive reconnection attempts. True disconnections are still detected via other error codes or when all polls fail. [issue #3116] + * `arduino-hid` subdriver enhanced with `ups.load`, `input.voltage` and + `output.voltage` readings where supported (e.g. Ugreen US3000). [#3281] - `nut-scanner` tool updates: * Fixed `nut-scanner` search for "simulation devices" to not use only the diff --git a/docs/nut.dict b/docs/nut.dict index ed5acfb1ff..e81d1fc663 100644 --- a/docs/nut.dict +++ b/docs/nut.dict @@ -1,4 +1,4 @@ -personal_ws-1.1 en 3645 utf-8 +personal_ws-1.1 en 3646 utf-8 AAC AAS ABI @@ -1434,6 +1434,7 @@ UUU UUUU UX Ubuntu +Ugreen Ulf Ulfat Uncomment diff --git a/drivers/arduino-hid.c b/drivers/arduino-hid.c index 4aa47c685d..1bf448cf5b 100644 --- a/drivers/arduino-hid.c +++ b/drivers/arduino-hid.c @@ -36,7 +36,7 @@ #include "main.h" /* for getval() */ #include "usb-common.h" -#define ARDUINO_HID_VERSION "Arduino HID 0.21" +#define ARDUINO_HID_VERSION "Arduino HID 0.22" /* FIXME: experimental flag to be put in upsdrv_info */ /* Arduino */ @@ -110,6 +110,10 @@ static hid_info_t arduino_hid2nut[] = { { "battery.charge.low", 0, 0, "UPS.PowerSummary.RemainingCapacityLimit", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL}, { "battery.charge.warning", 0, 0, "UPS.PowerSummary.WarningCapacityLimit", NULL, "%.0f", HU_FLAG_SEMI_STATIC, NULL}, + { "ups.load", 0, 0, "UPS.PowerSummary.PercentLoad", NULL, "%.0f", 0, NULL }, + { "input.voltage", 0, 0, "UPS.PowerConverter.Input.[1].Voltage", NULL, "%.1f", 0, NULL }, + { "output.voltage", 0, 0, "UPS.PowerConverter.Output.Voltage", NULL, "%.1f", 0, NULL }, + /* USB HID PresentStatus Flags TODO: Parse these into battery.charger.status */