Skip to content

Commit 68bbe9c

Browse files
authored
Merge branch 'master' into issue-1575
2 parents 125e3f9 + e17dc2e commit 68bbe9c

12 files changed

+440
-55
lines changed

NEWS.adoc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,11 @@ https://github.com/networkupstools/nut/milestone/11
152152
In fact, the driver should try fully reconnecting upon getting into
153153
a prolonged data stale condition. [issue #704, PR #2564]
154154
155-
- added Visench C1K (using serial port converter with USB ID `1a86:7523`)
156-
as known supported by `nutdrv_qx` (Megatec protocol) since at least
157-
NUT v2.7.4 release [#2395]
155+
- nutdrv_qx updates:
156+
* added Visench C1K (using serial port converter with USB ID `1a86:7523`)
157+
as known supported by `nutdrv_qx` (Megatec protocol) since at least
158+
NUT v2.7.4 release. [#2395]
159+
* introduced `innovart31` protocol support for Innova RT 3/1 UPSes. [#2712]
158160
159161
- bicker_ser: added new driver for Bicker 12/24Vdc UPS via RS-232 serial
160162
communication protocol, which supports any UPS shipped with the PSZ-1053
@@ -319,7 +321,7 @@ https://github.com/networkupstools/nut/milestone/11
319321
some of the devices supported by this driver. [#2427]
320322
321323
- phoenixcontact_modbus driver: Introduced Phoenix Contact QUINT4-UPS/24DC
322-
management (only new modbus addresses). [#2689]
324+
management (only new modbus addresses). [#2689, #2716]
323325
324326
- upsd:
325327
* `upsd_cleanup()` is now traced, to more easily see that the daemon is

data/driver.list.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,7 @@
590590
"Ippon" "ups" "2" "Smart Power Pro II Euro 1200/1600/2200" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/2702 https://github.com/networkupstools/nut/issues/701
591591
"Ippon" "ups" "2" "Pacific 1000/2000/3000" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/2702
592592
"Ippon" "ups" "2" "Ampere 1000/1500/2000/3000 bl" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/2702
593+
"Ippon" "ups" "2" "Innova RT 3/1 10K/10K compact/20K" "USB" "nutdrv_qx" # https://github.com/networkupstools/nut/issues/2712
593594
"Ippon" "ups" "2" "Innova RTB 1000/1500/2000/3000" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/2702
594595
"Ippon" "ups" "2" "Innova TBE 1000/2000/3000" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/2702
595596
"Ippon" "ups" "2" "Innova TB 1000/2000/3000" "USB" "usbhid-ups" # https://github.com/networkupstools/nut/issues/2702

docs/man/nutdrv_qx.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ If you set stayoff in linkman:ups.conf[5] when FSD arises the UPS will call a *s
6767

6868
*protocol =* 'string'::
6969
Skip autodetection of the protocol to use and only use the one specified.
70-
Supported values: 'bestups', 'hunnox', 'masterguard', 'mecer', 'megatec', 'megatec/old', 'mustek', 'q1', 'voltronic', 'voltronic-qs', 'voltronic-qs-hex' and 'zinto'.
70+
Supported values: 'bestups', 'hunnox', 'innovart31', 'masterguard', 'mecer', 'megatec', 'megatec/old', 'mustek', 'q1', 'voltronic', 'voltronic-qs', 'voltronic-qs-hex' and 'zinto'.
7171
+
7272
Run the driver program with the `--help` option to see the exact list of
7373
`protocol` values it would currently recognize.
@@ -147,8 +147,8 @@ If not specified, the driver defaults to 10%.
147147
Only used if *runtimecal* is also specified.
148148

149149

150-
BESTUPS, MECER, MEGATAEC, MEGATEC/OLD, MUSTEK, Q1, VOLTRONIC-QS, VOLTRONIC-QS-HEX, ZINTO PROTOCOLS
151-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
150+
BESTUPS, INNOVART31, MECER, MEGATEC, MEGATEC/OLD, MUSTEK, Q1, VOLTRONIC-QS, VOLTRONIC-QS-HEX, ZINTO PROTOCOLS
151+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
152152

153153
*ignoresab*::
154154
Some UPSes incorrectly report the `Shutdown Active' bit as always on, consequently making the driver believe the UPS is nearing a shutdown (and, as a result, ups.status always contains +FSD+... and you know what this means).
@@ -196,8 +196,8 @@ Safeguard against talking to the wrong one of several identical UPSes on the sam
196196
Note that when changing *ups.id* (through linkman:upsrw[8]) the driver will continue to talk to the UPS with the new 'slave address', but won't claim it again on restart until the *slave_addr* parameter is adjusted.
197197

198198

199-
Q1 PROTOCOL
200-
~~~~~~~~~~~
199+
INNOVART31, Q1 PROTOCOLS
200+
~~~~~~~~~~~~~~~~~~~~~~~~
201201

202202
*ondelay*::
203203
The acceptable range is +0..599940+ seconds.
@@ -439,8 +439,8 @@ Stop a running battery test.
439439
(Not available on some hardware)
440440

441441

442-
BESTUPS, MECER, MEGATEC, MEGATEC/OLD, MUSTEK, Q1, ZINTO PROTOCOLS
443-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
442+
BESTUPS, INNOVART31, MECER, MEGATEC, MEGATEC/OLD, MUSTEK, Q1, ZINTO PROTOCOLS
443+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
444444

445445
*test.battery.start* 'value'::
446446
Perform a battery test for the duration of 'value' seconds (truncated to 60 seconds) [+60..5940+].

docs/nut.dict

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
personal_ws-1.1 en 3264 utf-8
1+
personal_ws-1.1 en 3269 utf-8
22
AAC
33
AAS
44
ABI
@@ -2065,6 +2065,7 @@ iDialog
20652065
iDowell
20662066
iManufacturer
20672067
iPlug
2068+
iProduct
20682069
iSerial
20692070
iUSB
20702071
ib
@@ -2108,6 +2109,7 @@ initups
21082109
inline
21092110
inlined
21102111
innotech
2112+
innovart
21112113
inode
21122114
inplace
21132115
installable
@@ -2920,6 +2922,7 @@ subdirectories
29202922
subdirectory
29212923
subdriver
29222924
subdriver's
2925+
subdrivername
29232926
subdrivers
29242927
subdrv
29252928
sublicense
@@ -3129,6 +3132,8 @@ usbhid
31293132
usbif
31303133
usbinfo
31313134
usbmisc
3135+
usbsubdriver
3136+
usbsubdrvname
31323137
usbups
31333138
usbus
31343139
usd

docs/nutdrv_qx-subdrivers.txt

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,33 @@ It consists of a core driver that handles most of the work of talking to the har
1111

1212
Adding support for a new UPS device is easy, because it requires only the creation of a new sub-driver.
1313

14+
[NOTE]
15+
======
16+
Due to historic reasons, there is a bit of a mess with terminology here:
17+
among the set of driver parameters passed on command-line or via `ups.conf`,
18+
the `subdriver` value is for Serial-over-USB dialect ("usbsubdriver" in code),
19+
and the `protocol` value is for Qx dialect (but referred to as "subdriver"
20+
in most of the documentation, and variable names in the code itself)..
21+
22+
An additional set of source code files named `nutdrv_qx_subdrivername.{c,h}`
23+
defines a `subdriver_t` entry that is listed as in `subdrivers_list` array in
24+
the main `nutdrv_qx.c` file. However, in `ups.conf` this entity is referred
25+
to via the communication `protocol` keyword, if the end-user wants to pick
26+
one explicitly (bypassing auto-detection).
27+
28+
Confusingly, there *is* also an optional USB `subdriver` setting (available
29+
when the driver is built with USB support), for "Serial-over-USB subdriver
30+
selection", corresponding to entries in the `usbsubdriver` array and several
31+
`usbsubdrvname_command()` methods defined directly in `nutdrv_qx.c`.
32+
33+
There are also methods called `usbsubdrvname_subdriver()` which are called
34+
via `qx_usb_id[]` array for USB VendorID/ProductID/iManufacturer/iProduct
35+
based matching, and typically set the `subdriver_command` variable to point
36+
to the corresponding `usbsubdrvname_command()` method when auto-detection
37+
happens. Otherwise, this variable is set according to a text name requested
38+
in the `subdriver` driver parameter.
39+
======
40+
1441

1542
Creating a subdriver
1643
~~~~~~~~~~~~~~~~~~~~
@@ -1144,6 +1171,7 @@ You can then recompile +nutdrv_qx+, and start experimenting with the new subdriv
11441171
For more details, have a look at the currently available subdrivers:
11451172

11461173
- +nutdrv_qx_bestups.+{+c+,+h+}
1174+
- +nutdrv_qx_innovart31.+{+c+,+h+}
11471175
- +nutdrv_qx_masterguard.+{+c+,+h+}
11481176
- +nutdrv_qx_mecer.+{+c+,+h+}
11491177
- +nutdrv_qx_megatec.+{+c+,+h+}

drivers/Makefile.am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ nutdrv_qx_SOURCES += $(LIBUSB_IMPL) usb-common.c
379379
nutdrv_qx_LDADD += $(LIBUSB_LIBS)
380380
endif
381381
NUTDRV_QX_SUBDRIVERS = nutdrv_qx_bestups.c nutdrv_qx_blazer-common.c \
382+
nutdrv_qx_innovart31.c \
382383
nutdrv_qx_masterguard.c \
383384
nutdrv_qx_mecer.c nutdrv_qx_megatec.c nutdrv_qx_megatec-old.c \
384385
nutdrv_qx_mustek.c nutdrv_qx_q1.c nutdrv_qx_voltronic.c \
@@ -404,6 +405,7 @@ dist_noinst_HEADERS = \
404405
upshandler.h usb-common.h usbhid-ups.h powercom-hid.h compaq-mib.h idowell-hid.h \
405406
apcsmart.h apcsmart_tabs.h apcsmart-old.h apcupsd-ups.h cyberpower-mib.h riello.h openups-hid.h \
406407
delta_ups-mib.h nutdrv_qx.h nutdrv_qx_bestups.h nutdrv_qx_blazer-common.h \
408+
nutdrv_qx_innovart31.h \
407409
nutdrv_qx_masterguard.h \
408410
nutdrv_qx_mecer.h nutdrv_qx_ablerex.h \
409411
nutdrv_qx_megatec.h nutdrv_qx_megatec-old.h nutdrv_qx_mustek.h nutdrv_qx_q1.h nutdrv_qx_hunnox.h \

drivers/nutdrv_qx.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
# define DRIVER_NAME "Generic Q* Serial driver"
5959
#endif /* QX_USB */
6060

61-
#define DRIVER_VERSION "0.38"
61+
#define DRIVER_VERSION "0.39"
6262

6363
#ifdef QX_SERIAL
6464
# include "serial.h"
@@ -71,6 +71,7 @@
7171
/* Include all known subdrivers */
7272
#include "nutdrv_qx_bestups.h"
7373
#include "nutdrv_qx_hunnox.h"
74+
#include "nutdrv_qx_innovart31.h"
7475
#include "nutdrv_qx_mecer.h"
7576
#include "nutdrv_qx_megatec.h"
7677
#include "nutdrv_qx_megatec-old.h"
@@ -97,6 +98,7 @@ static subdriver_t *subdriver_list[] = {
9798
&masterguard_subdriver,
9899
&hunnox_subdriver,
99100
&ablerex_subdriver,
101+
&innovart31_subdriver,
100102
/* Fallback Q1 subdriver */
101103
&q1_subdriver,
102104
NULL
@@ -2913,7 +2915,7 @@ void upsdrv_help(void)
29132915
* are listed in usbsubdriver[] array (just above in this
29142916
* source file).
29152917
*/
2916-
printf("\nAcceptable values for 'subdriver' via -x or ups.conf in this driver: ");
2918+
printf("\nAcceptable values for USB 'subdriver' via -x or ups.conf in this driver: ");
29172919
for (i = 0; usbsubdriver[i].name != NULL; i++) {
29182920
if (i>0)
29192921
printf(", ");
@@ -3325,7 +3327,7 @@ void upsdrv_initups(void)
33253327

33263328
if (!regex_array[0] || !regex_array[1]) {
33273329
fatalx(EXIT_FAILURE,
3328-
"When specifying a subdriver, "
3330+
"When specifying a USB 'subdriver', "
33293331
"'vendorid' and 'productid' are mandatory.");
33303332
}
33313333

drivers/nutdrv_qx_blazer-common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* nutdrv_qx_blazer-common.c - Common functions/settings for nutdrv_qx_{mecer,megatec,megatec-old,mustek,q1,voltronic-qs,zinto}.{c,h}
1+
/* nutdrv_qx_blazer-common.c - Common functions/settings for nutdrv_qx_{innovart31,mecer,megatec,megatec-old,mustek,q1,voltronic-qs,zinto}.{c,h}
22
*
33
* Copyright (C)
44
* 2013 Daniele Pezzini <hyouko@gmail.com>

drivers/nutdrv_qx_blazer-common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* nutdrv_qx_blazer-common.h - Common functions/settings for nutdrv_qx_{mecer,megatec,megatec-old,mustek,q1,voltronic-qs,zinto}.{c,h}
1+
/* nutdrv_qx_blazer-common.h - Common functions/settings for nutdrv_qx_{innovart31,mecer,megatec,megatec-old,mustek,q1,voltronic-qs,zinto}.{c,h}
22
*
33
* Copyright (C)
44
* 2013 Daniele Pezzini <hyouko@gmail.com>

0 commit comments

Comments
 (0)