Skip to content

Commit 497cdc5

Browse files
authored
Merge pull request #3447 from juslex/feat/ragtech-driver
ragtech: new driver for Ragtech UPS (USB CDC-ACM, family 10)
2 parents e4cb123 + bab938e commit 497cdc5

8 files changed

Lines changed: 779 additions & 2 deletions

File tree

NEWS.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,16 @@ but the `nutshutdown` script would bail out quickly and quietly. [PR #3008]
386386
subdriver definition then). For consistency, these pointers are now
387387
assigned. [#1962]
388388
389+
- Introduced a new NUT driver named `ragtech` which provides support for the
390+
Ragtech "Easy Pro" family of line-interactive UPS units (also sold under
391+
the NEP, TORO, INNERGIE and OneUP brands in Brazil). Devices present a USB
392+
CDC-ACM serial interface (VID `0x04D8`, PID `0x000A`) and speak a proprietary
393+
6-byte register-access protocol with read/write/AND/OR opcodes; the driver
394+
covers the 20 models in the family-10 device table and was validated
395+
end-to-end against an Easy 2000 TI. Shutdown-related instant commands are
396+
opt-in via the `allow_shutdown` flag because the firmware does not
397+
auto-restart on mains return. [PR #3447]
398+
389399
- `riello_ser` and `riello_usb` driver updates:
390400
* Since the beginning, these drivers fenced availability of *either*
391401
`load.*` *or* `shutdown.return` instant commands based on current

data/driver.list.in

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,6 +1271,27 @@
12711271

12721272
"Phantom" "pdu" "1" "Rackable Systems" "1 outlets" "powerman-pdu (experimental)"
12731273

1274+
"Ragtech" "ups" "1" "Easy 600 TI" "" "ragtech (experimental)"
1275+
"Ragtech" "ups" "1" "Easy 600 M2" "" "ragtech (experimental)"
1276+
"Ragtech" "ups" "1" "Easy 700 TI" "" "ragtech (experimental)"
1277+
"Ragtech" "ups" "1" "Easy 700 M2" "" "ragtech (experimental)"
1278+
"Ragtech" "ups" "1" "Easy 900 TI" "" "ragtech (experimental)"
1279+
"Ragtech" "ups" "1" "Easy 900 M2" "" "ragtech (experimental)"
1280+
"Ragtech" "ups" "1" "Easy 1200 TI" "" "ragtech (experimental)"
1281+
"Ragtech" "ups" "1" "Easy 1200 M2" "" "ragtech (experimental)"
1282+
"Ragtech" "ups" "1" "Easy 1300 TI" "" "ragtech (experimental)"
1283+
"Ragtech" "ups" "1" "Easy 1300 M2" "" "ragtech (experimental)"
1284+
"Ragtech" "ups" "1" "Easy 1400 TI" "" "ragtech (experimental)"
1285+
"Ragtech" "ups" "1" "Easy 1400 M2" "" "ragtech (experimental)"
1286+
"Ragtech" "ups" "1" "Easy 1600 TI" "" "ragtech (experimental)"
1287+
"Ragtech" "ups" "1" "Easy 1600 M2" "" "ragtech (experimental)"
1288+
"Ragtech" "ups" "1" "Easy 1800 TI" "" "ragtech (experimental)"
1289+
"Ragtech" "ups" "1" "Easy 1800 M2" "" "ragtech (experimental)"
1290+
"Ragtech" "ups" "1" "Easy 2000 TI" "" "ragtech (experimental)"
1291+
"Ragtech" "ups" "1" "Easy 2000 M2" "" "ragtech (experimental)"
1292+
"Ragtech" "ups" "1" "Easy 2200 TI" "" "ragtech (experimental)"
1293+
"Ragtech" "ups" "1" "Easy 2200 M2" "" "ragtech (experimental)"
1294+
12741295
"Raritan" "pdu" "3" "Intelligent PDU - Dominion PX" "no report, but should be supported" "snmp-ups (experimental)"
12751296
"Raritan" "pdu" "3" "Metered PDU - Raritan PM" "no report, but should be supported" "snmp-ups (experimental)"
12761297
"Raritan" "pdu" "3" "Switched PDU - Raritan RPC" "no report, but should be supported" "snmp-ups (experimental)"

docs/man/Makefile.am

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,7 @@ SRC_SERIAL_PAGES = \
10241024
powercom.txt \
10251025
powerpanel.txt \
10261026
powervar_cx_ser.txt \
1027+
ragtech.txt \
10271028
rhino.txt \
10281029
riello_ser.txt \
10291030
sms_ser.txt \
@@ -1077,6 +1078,7 @@ INST_MAN_SERIAL_PAGES = \
10771078
powercom.$(MAN_SECTION_CMD_SYS) \
10781079
powerpanel.$(MAN_SECTION_CMD_SYS) \
10791080
powervar_cx_ser.$(MAN_SECTION_CMD_SYS) \
1081+
ragtech.$(MAN_SECTION_CMD_SYS) \
10801082
rhino.$(MAN_SECTION_CMD_SYS) \
10811083
riello_ser.$(MAN_SECTION_CMD_SYS) \
10821084
sms_ser.$(MAN_SECTION_CMD_SYS) \
@@ -1147,6 +1149,7 @@ INST_HTML_SERIAL_MANS = \
11471149
powercom.html \
11481150
powerpanel.html \
11491151
powervar_cx_ser.html \
1152+
ragtech.html \
11501153
rhino.html \
11511154
riello_ser.html \
11521155
sms_ser.html \

docs/man/ragtech.txt

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
RAGTECH(8)
2+
==========
3+
4+
NAME
5+
----
6+
7+
ragtech - Driver for Ragtech UPS units (USB CDC-ACM)
8+
9+
SYNOPSIS
10+
--------
11+
12+
*ragtech* -h
13+
14+
*ragtech* -a 'UPS_NAME' ['OPTIONS']
15+
16+
NOTE: This man page only documents the hardware-specific features of
17+
the ragtech driver. For information about the core driver, see
18+
linkman:nutupsdrv[8].
19+
20+
21+
SUPPORTED HARDWARE
22+
------------------
23+
24+
Targets Ragtech UPSes that expose a USB CDC-ACM serial interface
25+
(USB VID 0x04D8, PID 0x000A -- Microchip PIC with CDC firmware).
26+
The device shows up under Linux as `/dev/ttyACM*`.
27+
28+
Validated end-to-end against the Ragtech Easy 2000 TI (model id 16 in
29+
the family-10 device table). The other 19 models in the same table --
30+
Easy 600/700/900/1200/1300/1400/1600/1800/2000/2200 in both TI (115 V)
31+
and M2 (220 V) variants, also sold under the NEP, TORO, INNERGIE and
32+
OneUP brands in Brazil -- share the same wire protocol and register
33+
layout and are expected to work; please report results.
34+
35+
This driver is *experimental*. Polling, status decoding and the
36+
`shutdown.stayoff` / `shutdown.stop` instant commands have been
37+
verified on hardware; `shutdown.return` and `test.battery.start.deep`
38+
are implemented but not yet verified end-to-end (see the
39+
*allow_shutdown* note below). The beeper-control wire encoding has
40+
not been reverse-engineered yet.
41+
42+
43+
EXTRA ARGUMENTS
44+
---------------
45+
46+
This driver supports the following options in the *ups.conf*:
47+
48+
*iout_calib*='number';;
49+
Per-unit output current calibration constant. If omitted (default),
50+
the driver reads the value from register `0xF3` at startup. Set this
51+
only to override a wrong factory-stored calibration.
52+
53+
*allow_shutdown*;;
54+
Enable the `shutdown.return`, `shutdown.stayoff`, `shutdown.stop` and
55+
`test.battery.start.deep` instant commands. Disabled by default for
56+
safety: the Easy 2000 TI firmware does **not** auto-restart after a
57+
coordinated shutdown, so an `upsmon`-driven shutdown on low battery
58+
will leave the UPS (and everything plugged into it) powered off until
59+
someone presses the physical power button. Only set this flag if you
60+
have an out-of-band way to power the UPS back up, or if you are
61+
deliberately running a UPS that should stay off after a critical-
62+
battery event. With this flag unset, `upsdrv_shutdown` logs the
63+
refusal and exits with failure instead of cutting the output.
64+
65+
66+
CAVEATS
67+
-------
68+
69+
The serial control lines DTR and RTS are forced low by the driver
70+
immediately after opening the port. Non-zero levels on either line
71+
are interpreted by the UPS as a remote shutdown signal -- never run
72+
this driver alongside other software that toggles those lines on the
73+
same device node.
74+
75+
Replies are framed by a 0xAA start byte and have no checksum; the
76+
driver re-synchronizes by scanning for the start byte after any
77+
short read.
78+
79+
80+
AUTHOR
81+
------
82+
83+
juslex
84+
85+
86+
SEE ALSO
87+
--------
88+
89+
linkman:nutupsdrv[8],
90+
linkman:ups.conf[5]
91+
92+
Internet resources:
93+
~~~~~~~~~~~~~~~~~~~
94+
95+
* The NUT (Network UPS Tools) home page: https://www.networkupstools.org/
96+
97+
* Reverse-engineering reference:
98+
https://github.com/antunesls/UPS_ESP32_tinySrv

docs/nut.dict

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
personal_ws-1.1 en 3769 utf-8
1+
personal_ws-1.1 en 3780 utf-8
22
AAC
33
AAS
44
ABI
@@ -3768,3 +3768,14 @@ zwfa
37683768
zzz
37693769
Åstrand
37703770
Ørpetveit
3771+
INNERGIE
3772+
NEP
3773+
OneUP
3774+
Ragtech
3775+
TORO
3776+
calib
3777+
iout
3778+
juslex
3779+
ragtech
3780+
xAA
3781+
xF

drivers/Makefile.am

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,8 @@ SERIAL_DRIVERLIST = al175 apcmicrolink bcmxcp belkin belkinunv bestfcom \
152152
gamatronic genericups isbmex liebert liebert-esp2 liebert-gxe masterguard metasys \
153153
mge-utalk microdowell microsol-apc mge-shut nutdrv_hashx oneac optiups powercom powervar_cx_ser rhino \
154154
safenet nutdrv_siemens-sitop solis tripplite tripplitesu upscode2 victronups powerpanel \
155-
blazer_ser ivtscd apcsmart apcsmart-old riello_ser sms_ser bicker_ser ve-direct meanwell_ntu
155+
blazer_ser ivtscd apcsmart apcsmart-old riello_ser sms_ser bicker_ser ve-direct meanwell_ntu \
156+
ragtech
156157
if HAVE_LINUX_SERIAL_H
157158
# Temporary, until ported to more OSes
158159
SERIAL_DRIVERLIST += nhs_ser
@@ -246,6 +247,8 @@ bestfcom_SOURCES = bestfcom.c
246247
bestfortress_SOURCES = bestfortress.c
247248
bestuferrups_SOURCES = bestuferrups.c
248249
bestups_SOURCES = bestups.c
250+
ragtech_SOURCES = ragtech.c
251+
ragtech_LDADD = $(LDADD_DRIVERS_SERIAL)
249252
blazer_ser_SOURCES = blazer.c blazer_ser.c
250253
blazer_ser_LDADD = $(LDADD_DRIVERS_SERIAL) -lm
251254
etapro_SOURCES = etapro.c

0 commit comments

Comments
 (0)