Skip to content

Commit b6da79b

Browse files
authored
Merge pull request #59 from jimklimov/issue-58
protocols/megatec.txt: "Additional information from 21st century"
2 parents 0c4a208 + 78d18eb commit b6da79b

File tree

2 files changed

+190
-2
lines changed

2 files changed

+190
-2
lines changed

nut-website.dict.addon

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,10 @@ DeepTstFail
9494
DeltaUPSv
9595
DiSplay
9696
Dly
97+
Drobot
9798
EAGAIN
99+
EB
100+
EBnn
98101
EE
99102
EEPROM
100103
EG
@@ -104,6 +107,7 @@ EPO
104107
EPS
105108
ESXi
106109
EmmmmDnnnnn
110+
EpbraDokc
107111
EpbrashcDoegfl
108112
Eqls
109113
EqlzInvl
@@ -120,10 +124,12 @@ FREHn
120124
FRELn
121125
FTS
122126
FV
127+
FW
123128
FaltSens
124129
Fosshost
125130
FreqSens
126131
FullLoad
132+
GASV
127133
GKrellM
128134
GND
129135
GPG
@@ -162,7 +168,10 @@ INSTCMD
162168
INV
163169
IPBX
164170
IPC
171+
IPG
165172
IPM
173+
IPN
174+
IPW
166175
ITy
167176
IZ
168177
InvCDly
@@ -319,6 +328,7 @@ PyGTK
319328
PyNUT
320329
PyNUTClient
321330
QBDR
331+
QBL
322332
QBT
323333
QBV
324334
QBYF
@@ -328,11 +338,13 @@ QFLAG
328338
QFRE
329339
QGR
330340
QHE
341+
QI
331342
QID
332343
QLDL
333344
QMD
334345
QMF
335346
QMOD
347+
QOF
336348
QPAR
337349
QPD
338350
QQ
@@ -368,6 +380,7 @@ Runtime
368380
RuntimeWarning
369381
RxD
370382
RxHs
383+
SASV
371384
SCR
372385
SDA
373386
SDE
@@ -467,6 +480,7 @@ VVV
467480
Vdc
468481
Voltronic
469482
Vout
483+
WH
470484
WHAD
471485
WMNut
472486
WS

protocols/megatec.txt

Lines changed: 176 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,12 +431,186 @@ The failure mode is that the UPS turns off and never returns.
431431
The fix is to push the return value up by 2, i.e. *+S01R0003+*, and it will return online properly.
432432

433433

434+
Additional information from 21st century
435+
----------------------------------------
436+
437+
Some of the information below originates from research published at
438+
link:https://f2065.ru/soft/ups_lm_ru/#spravochnaja-informacija-po-protokolam-ups[f2065's
439+
UPS LM project page], whose sources included NUT documentation and more, and
440+
kindly curated (picking entries new for NUT) and translated by Viktor Drobot.
441+
Another part was obtained by his RS232 sniffer as well, during development
442+
of sub-driver updates for Ippon Innova RT 3/1 series.
443+
444+
NOTE: not all UPSes are able to answer/consume some or all of these commands!
445+
446+
/////////////////
447+
Maintainer note about table markup: "Command" cells ending with `a|` and
448+
followed by next cell content WITHOUT LEADING WHITE-SPACE allows those cells
449+
to be formatted as asciidoc sub-documents, and so define bullet lists.
450+
Blank lines before/around a paragraph allow it to be separate in cell;
451+
for paragraphs inside a sub-document, avoid leading space (text would be
452+
treated as a code block then).
453+
/////////////////
454+
455+
[cols="^.^1m,.^9",options="header,autowidth",frame="topbot",grid="rows"]
456+
|=============================================================================
457+
| Command | Description
458+
| `AR?`, `AR0`, `AR1` | Querying/disabling/enabling auto power-on feature
459+
(known as auto restart for some Ippon UPSes).
460+
461+
Enabled by default (`AR1`).
462+
463+
If option is off (`AR0`) then UPS will stay powered
464+
"off" even after mains return, and should be switched
465+
"on" manually by using the power button.
466+
| `AT?`, `AT0`, `AT1` | Querying/disabling/enabling auto test feature.
467+
| `BL?`, `BL` | Battery level (in percents), usually represented as
468+
a 3-digit number with leading zero where needed.
469+
| `BPS` a|Query bypass status. Typical answer:
470+
----
471+
(230.4 000.0 000.0 49.9
472+
----
473+
474+
* Fields 1..3 should be `L1-N`, `L2-N` and `L3-N` input bypass
475+
voltages;
476+
* field 4 is input bypass frequency.
477+
| `EB?`, `EBnn` | Query/set number of external battery packs.
478+
| `EF?` | Acceptable frequency deviations for HE/ECO mode (in percents).
479+
| `EV?` | Acceptable voltage deviations for HE/ECO mode (in percents).
480+
| `FW?` | Firmware version.
481+
| `GR?`, `GR0`, `GR1` | Query/disable/enable green mode
482+
(WinPower provides "Energy Saving" feature to control
483+
this mode).
484+
485+
Some UPS models switch themselves off after 5 minutes
486+
without load.
487+
| `IP?`, `IPN`, `IPW`, `IPG` a|Query/set acceptable deviations for different
488+
modes:
489+
490+
* normal (`IPN`);
491+
* wide (`IPW`);
492+
* generator (`IPG`).
493+
494+
Corresponding LEDs will be toggled for Smart Winner UPS models.
495+
| `M` | Query protocol type: the answer is usually `P`, `T`, `V`, `C`
496+
and some others rarely.
497+
| `Q2` a|Query UPS status (analogous to `Q1`). Typical answer:
498+
----
499+
(226.6 224.3 228.0 226.6 229.9 000.0 000.0 000 000 000 49.9 327.6 18.0 00000000 999.24 100 02 00 00 00 00 00000000 11
500+
----
501+
502+
As far as I was able to decipher this:
503+
504+
* first three fields correspond to the `L1-N`, `L2-N` and `L3-N`
505+
input voltages;
506+
* fifth field is output voltage (3/1 Ippon UPS was tested though,
507+
maybe, fields 5..7 correspond to the `L1-N`, `L2-N` and `L3-N`
508+
output voltages generally);
509+
* eleventh field seems to be frequency (don't know, input or output);
510+
* twelfth field is battery voltage;
511+
* thirteenth field is temperature;
512+
* 15th field may be estimated runtime (in minutes?) and
513+
* 16th field is battery level (in percents, with leading zero).
514+
515+
However, I'm not sure about fields 4, 6..11, 14..23.
516+
| `Q4` a|Yet another UPS status query. Typical answer:
517+
----
518+
(MMM.M ???.? ???.? NNN.N PPP.P ??? QQQ RR.R ??? ??? SS.S TT.T flags
519+
----
520+
Some flags:
521+
522+
* `E` -- test in progress;
523+
* `A` -- mains fault, on battery;
524+
* `C` -- bypass/AVR mode
525+
| `Q6` a|Query UPS status, especially useful for three-phase models.
526+
Typical answer:
527+
----
528+
(227.0 225.6 230.0 50.0 229.9 000.0 000.0 49.9 007 000 000 327.8 000.0 23.0 06932 100 32 00000000 00000000 11
529+
----
530+
* Fields 1..3 are `L1-N`, `L2-N` and `L3-N` input voltages,
531+
* field 4 is input frequency,
532+
* fields 5..7 should be `L1-N`, `L2-N` and `L3-N` output voltages,
533+
* field 8 is output frequency,
534+
* field 9 is load (in percents, with leading zero),
535+
* field 12 is battery voltage,
536+
* field 14 is temperature,
537+
* field 15 is estimated runtime (in seconds),
538+
* field 16 is battery level (in percents, with leading zero).
539+
| `QBL` a|Query battery stats. Typical answer:
540+
----
541+
(026.5 02 01 068 255
542+
----
543+
* Field 1 is battery voltage;
544+
* field 2 is a number of batteries connected in series;
545+
* field 3 is a number of batteries connected in parallel;
546+
* field 4 is battery level (in percents, with leading zero);
547+
* field 5 is estimated runtime (in minutes?).
548+
| `QI` | Query serial number info.
549+
| `QLDL` | Query min and max load stats.
550+
| `QMD` | Query nominal UPS stats such as power capacity, number of batteries, etc.
551+
| `QMF` | Query manufacturer info.
552+
| `QMOD` | Query current status code.
553+
| `QOF` | Query output frequency info.
554+
| `QP` a|Query acceptable bypass limits. Typical answer:
555+
----
556+
(45.0 55.0 176 264 EpbraDokc
557+
----
558+
* Fields 1 and 2 are low and high limits for input bypass frequency;
559+
* fields 3 and 4 are the same but for the voltage;
560+
* field 5 is flags.
561+
| `QRI` | Yet another query for nominal UPS stats.
562+
| `QVFW` | Yet another firmware version query.
563+
| `SASV07?` | Query for serial number.
564+
Typical answer starts with `GASV07D` string.
565+
| `TC?` | Query for temperature.
566+
| `V` a|Query for AVR mode settings. Typical answer:
567+
----
568+
165 200 220 240 275
569+
----
570+
* Field 1 is low limit for battery transition;
571+
* field 2 is low limit for engaging AVR boost;
572+
* field 3 is nominal voltage;
573+
* field 4 is high limit for engaging AVR buck;
574+
* field 5 is high limit for battery transition.
575+
| `V?` | Query for output voltage mode.
576+
| `V220`, `V230`, `V240` | Set output voltage mode
577+
(corresponding LED may be toggled).
578+
| `WH` a|Query for model info and nominal specs. Typical answer:
579+
----
580+
(00 00.00 00.00 INN3T20K 2 3/1 6 230 50.00 024 02.00 005.00 015.00 005 00 40 110 276 45.00 55.00
581+
----
582+
Seems to be:
583+
584+
* model code (field 4);
585+
* topology (field 6);
586+
* nominal voltage (field 8);
587+
* nominal frequency (field 9);
588+
* number of batteries (field 10).
589+
| `WA` a|Query for power/load stats. Typical answer:
590+
----
591+
(001.4 000.0 000.0 001.4 000.0 000.0 001.4 001.4 006.5 000.0 000.0 007 00000000
592+
----
593+
* Fields 1 and 7 seem to be real power measurements on output, while
594+
* fields 4 and 8 -- the full one.
595+
+
596+
[NOTE]
597+
======
598+
This example a bit clumsy because in that case `cos(phi)` was about `1`,
599+
but in other measurements I was able to get differing readings.
600+
601+
Not sure why these fields are in pairs (maybe rolling average?).
602+
======
603+
* Field 9 is current (amps), field 12 is load (percents).
604+
|=============================================================================
605+
606+
434607
Revision History
435608
----------------
436609

437610
[cols="1^.^,2^.^,5.^,2.^",options="header,autowidth",frame="topbot",grid="rows",align="center"]
438611
|====
439612
|Rev. |Date |Description |Modify by
440-
|2.6 |95-9-30 |UPDATE "*+D+*" COMMAND (+SS.SS+ -> +SSS.SS+) |Kevin Chiou
441-
|2.7 |96-8-01 |Disable "*+D+*" COMMAND |Kevin Chiou
613+
|2.6 |1995-09-30 |UPDATE "*+D+*" COMMAND (+SS.SS+ -> +SSS.SS+) |Kevin Chiou
614+
|2.7 |1996-08-01 |Disable "*+D+*" COMMAND |Kevin Chiou
615+
|2.8 |2024-12-17 |Additional chapter from 21st century |"f2065", Viktor Drobot
442616
|====

0 commit comments

Comments
 (0)