Skip to content
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: 2 additions & 0 deletions NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion docs/nut.dict
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
personal_ws-1.1 en 3645 utf-8
personal_ws-1.1 en 3646 utf-8
AAC
AAS
ABI
Expand Down Expand Up @@ -1434,6 +1434,7 @@ UUU
UUUU
UX
Ubuntu
Ugreen
Ulf
Ulfat
Uncomment
Expand Down
6 changes: 5 additions & 1 deletion drivers/arduino-hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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
*/
Expand Down
Loading