From 8eaa5243ded787a55e229989900152629755db70 Mon Sep 17 00:00:00 2001 From: Stephen Horvath Date: Fri, 3 Jul 2026 17:25:49 +1000 Subject: [PATCH 1/4] nutdrv_qx: Voltronic-QS: Add QI command This command adds battery charge, runtime, input frequency, output current, and input transfer low/high values to the Voltronic-QS driver. Tested on a PowerShield PSDR800. Signed-off-by: Stephen Horvath --- drivers/nutdrv_qx_voltronic-qs.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/nutdrv_qx_voltronic-qs.c b/drivers/nutdrv_qx_voltronic-qs.c index 2732f13d2c..60fb6be926 100644 --- a/drivers/nutdrv_qx_voltronic-qs.c +++ b/drivers/nutdrv_qx_voltronic-qs.c @@ -100,6 +100,20 @@ static item_t voltronic_qs_qx2nut[] = { { "battery.voltage.nominal", 0, NULL, "F\r", "", 22, '#', "", 11, 15, "%.1f", QX_FLAG_STATIC, NULL, NULL, NULL }, { "output.frequency.nominal", 0, NULL, "F\r", "", 22, '#', "", 17, 20, "%.0f", QX_FLAG_STATIC, NULL, NULL, NULL }, + /* Query UPS for charge and runtime + * > [QI\r] + * < [(100 00979 50.0 000.3 177 290 0 0000010000112000\r] + * 0123456789012345678901234567890123456789012345678 + * 0 1 2 3 4 + */ + + { "battery.charge", 0, NULL, "QI\r", "", 49, '(', "", 1, 3, "%.0f", 0, NULL, NULL, NULL }, + { "battery.runtime", 0, NULL, "QI\r", "", 49, '(', "", 5, 9, "%.0f", 0, NULL, NULL, NULL }, + { "input.frequency", 0, NULL, "QI\r", "", 49, '(', "", 11, 14, "%.1f", 0, NULL, NULL, NULL }, + { "output.current", 0, NULL, "QI\r", "", 49, '(', "", 16, 20, "%.1f", 0, NULL, NULL, NULL }, + { "input.transfer.low", 0, NULL, "QI\r", "", 49, '(', "", 22, 24, "%.0f", QX_FLAG_STATIC, NULL, NULL, NULL }, + { "input.transfer.high", 0, NULL, "QI\r", "", 49, '(', "", 26, 28, "%.0f", QX_FLAG_STATIC, NULL, NULL, NULL }, + /* Instant commands */ { "beeper.toggle", 0, NULL, "Q\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL, NULL }, { "load.off", 0, NULL, "S00R0000\r", "", 0, 0, "", 1, 3, NULL, QX_FLAG_CMD, NULL, NULL, NULL }, @@ -123,6 +137,7 @@ static item_t voltronic_qs_qx2nut[] = { static testing_t voltronic_qs_testing[] = { { "QS\r", "(215.0 195.0 230.0 014 49.0 22.7 30.0 00000000\r", -1 }, { "F\r", "#220.0 003 12.00 50.0\r", -1 }, + { "QI\r", "(100 00979 50.0 000.3 177 290 0 0000010000112000\r", -1} { "M\r", "V\r", -1 }, { "Q\r", "", -1 }, { "C\r", "", -1 }, From 8425abb83088e72458314f4ebce2e7a20ff06d34 Mon Sep 17 00:00:00 2001 From: Stephen Horvath Date: Fri, 3 Jul 2026 18:20:05 +1000 Subject: [PATCH 2/4] NEWS.adoc, driver.list.in: Update for voltronic-qs & PSDR800 Signed-off-by: Stephen Horvath --- NEWS.adoc | 3 +++ data/driver.list.in | 1 + 2 files changed, 4 insertions(+) diff --git a/NEWS.adoc b/NEWS.adoc index a21c28629c..d556bc70c2 100644 --- a/NEWS.adoc +++ b/NEWS.adoc @@ -81,6 +81,9 @@ https://github.com/networkupstools/nut/milestone/13 allowing the Megatec payload to be successfully reconstructed. [PR #3485] * In `Voltronic-QS-Hex` subdriver, the format string sanity check added in recent NUT releases caught a mismatch in `ups.load` reading. [issue #3532] + * Modified `voltronic-qs` subdriver to request the QI command, supplying + NUT with battery charge, runtime, input frequency, output current, and + input transfer low/high values. - Introduced a new NUT driver named `ragtech` which provides support for the Ragtech "Easy Pro" family of line-interactive UPS units (also sold under diff --git a/data/driver.list.in b/data/driver.list.in index 52cb8cc4f8..f023d6cd5b 100644 --- a/data/driver.list.in +++ b/data/driver.list.in @@ -1233,6 +1233,7 @@ "Powermatic" "ups" "2" "Cleanline L-1000C" "USB" "nutdrv_qx" # https://alioth-lists.debian.net/pipermail/nut-upsdev/2024-September/008015.html "PowerShield" "ups" "2" "Defender 1200VA" "USB" "blazer_usb" +"PowerShield" "ups" "2" "PSDR800" "USB" "nutdrv_qx protocol=voltronic-qs" "PowerTech" "ups" "1" "Comp1000" "DTR cable power" "genericups upstype=3" "PowerTech" "ups" "2" "SMK-800" "" "blazer_ser" From d8864796698b4a83e40ba8e4e7766f97478e1bbb Mon Sep 17 00:00:00 2001 From: Stephen Horvath Date: Fri, 3 Jul 2026 23:09:21 +1000 Subject: [PATCH 3/4] docs/nut.dict: Add voltronic-qs 'QI' command Signed-off-by: Stephen Horvath --- docs/nut.dict | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/nut.dict b/docs/nut.dict index 67aaca7031..892cf48c00 100644 --- a/docs/nut.dict +++ b/docs/nut.dict @@ -1,4 +1,4 @@ -personal_ws-1.1 en 3789 utf-8 +personal_ws-1.1 en 3790 utf-8 AAC AAS ABI @@ -1088,6 +1088,7 @@ QFRE QGR QGS QHE +QI QID QLDL QMD From 81455d1ca1eaaeb27c060669bef304022366bf37 Mon Sep 17 00:00:00 2001 From: Jim Klimov Date: Mon, 20 Jul 2026 12:01:28 +0200 Subject: [PATCH 4/4] drivers/nutdrv_qx_voltronic-qs.c, NEWS.adoc: bump VOLTRONIC_QS_VERSION and reword the news entry [#3521] Signed-off-by: Jim Klimov --- NEWS.adoc | 3 ++- docs/nut.dict | 4 +++- drivers/nutdrv_qx_voltronic-qs.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/NEWS.adoc b/NEWS.adoc index d556bc70c2..1eddf53ac3 100644 --- a/NEWS.adoc +++ b/NEWS.adoc @@ -83,7 +83,8 @@ https://github.com/networkupstools/nut/milestone/13 recent NUT releases caught a mismatch in `ups.load` reading. [issue #3532] * Modified `voltronic-qs` subdriver to request the QI command, supplying NUT with battery charge, runtime, input frequency, output current, and - input transfer low/high values. + input transfer low/high values on devices which support it (`H`, `I`, `J` + protocols, e.g. Powershield PSDR800). [#3521] - Introduced a new NUT driver named `ragtech` which provides support for the Ragtech "Easy Pro" family of line-interactive UPS units (also sold under diff --git a/docs/nut.dict b/docs/nut.dict index 892cf48c00..658b687eb9 100644 --- a/docs/nut.dict +++ b/docs/nut.dict @@ -1,4 +1,4 @@ -personal_ws-1.1 en 3790 utf-8 +personal_ws-1.1 en 3792 utf-8 AAC AAS ABI @@ -984,6 +984,7 @@ PROTVER PRs PSA PSD +PSDR PSF PSFn PSGPSER @@ -1057,6 +1058,7 @@ PowerWalker PowerWare Powerchute Powercool +Powershield Powervar Powervar's Powerwell diff --git a/drivers/nutdrv_qx_voltronic-qs.c b/drivers/nutdrv_qx_voltronic-qs.c index 60fb6be926..7ae7f6a7be 100644 --- a/drivers/nutdrv_qx_voltronic-qs.c +++ b/drivers/nutdrv_qx_voltronic-qs.c @@ -25,7 +25,7 @@ #include "nutdrv_qx_voltronic-qs.h" -#define VOLTRONIC_QS_VERSION "Voltronic-QS 0.10" +#define VOLTRONIC_QS_VERSION "Voltronic-QS 0.11" /* Support functions */ static int voltronic_qs_claim(void);