Network UPS Tools
Power Devices support
Table of Contents

General

This document specifies the RS232C communication protocol of the Advance-Intelligent UPS.

The protocol provided the following features:

  • Monitor charger status.

  • Monitor battery status and condition.

  • Monitor the utility status.

  • Provide the power switch function for computer to turn on and off the utility on schedule for power saving.

Computer will control information exchange by a query followed by <cr>.

UPS will respond with information followed by a <cr> or action.

Hardware

BAUD RATE

2400 bps

DATA LENGTH

8 bits

STOP BIT

1 bit

PARITY

NONE

CABLING

9 pins female D-type connector

COMPUTER           UPS
==========================
   RX    <---  TX  (pin 9)
   TX     ---> RX  (pin 6)
   GND   <---  GND (pin 7)

Communication protocol

Status Inquiry

Computer:

Q1<cr>

UPS:

UPS status data stream, such as (MMM.M NNN.N PPP.P QQQ RR.R S.SS TT.T b7b6b5b4b3b2b1b0<cr>

UPS status data stream

There should be a space character between every field for data separation.

The meaning of each field is list as followed:

(

Start byte

MMM.M

I/P voltage

M is and integer number ranging from 0 to 9. The unit is Volt.

NNN.N

I/P fault voltage

N is and integer number ranging from 0 to 9. The unit is Volt.

For OFF LINE UPS

Its purpose is to identify a short duration voltage glitch which cause OFF line UPS to go to Invter mode. If this occurs input voltage will appear normal at query prior to glitch and will still appear normal at next query.

The I/P fault voltage will hold glitch voltage till next query. After query, the I/P fault voltage will be same as I/P voltage until next glitch occurs.

For ON LINE UPS

Its purpose is to identify a short duration utility fail which cause ON line UPS to go to battery mode. If this occurs input voltage will appear normal at query prior to fail and will still appear normal at next query.

The I/P fault voltage will hold utility fail voltage till next query. After query, the I/P voltage will be same as I/P voltage until next utility fail occurs.

PPP.P

O/P voltage

P is an integer number ranging form 0 to 9. The unit is Volt.

QQQ

O/P current

QQQ is a percent of maximum current, not an absolute value.

RR.R

I/P frequency

R is an integer number ranging from 0 to 9. The unit is HZ.

SS.S or S.SS

Battery voltage

S is an integer number ranging from 0 to 9.

For on-line units battery voltage/cell is provided in the form S.SS.

For standby units actual battery voltage is provided in the form SS.S.

UPS type in UPS status will determine which reading was obtained.

TT.T

Temperature

T is an integer number ranging form 0 to 9. The unit is degree of centigrade.

<U>

UPS Status

<U> is one byte of binary information such as <b7b6b5b4b3b2b1b0>. Where bn is a ASCII character 0 or 1.

1 means:

Bit# Description

7

Utility Fail (Immediate)

6

Battery Low

5

Bypass/Boost or Buck Active

4

UPS Failed

3

UPS Type is Standby

0 is On_line

2

Test in Progress

1

Shutdown Active

0

Beeper On

<cr>

Stop Byte

Example

Computer:

Q1<cr>

UPS:

(208.4 140.0 208.4 034 59.9 2.05 35.0 00110000<cr>

Means:

  • I/P voltage is 208.4V.

  • I/P fault voltage is 140.0V.

  • O/P voltage is 208.4V.

  • O/P current is 34 %.

  • I/P frequency is 59.9 HZ.

  • Battery voltage is 2.05V.

  • Temperature is 35.0 degrees of centigrade.

  • UPS type is on-line, UPS failed.

  • Bypass active, and shutdown not active.

Test for 10 seconds

Computer:

T<cr>

UPS:

Test for 10 seconds and return to utility.

If battery low occur during testing, UPS will return to utility immediately.

Test until battery low

Computer:

TL<cr>

UPS:

Test until battery low and return to utility.

Test for specified time period

Computer:

T<n><cr>

UPS:

Test for <n> minutes.

During testing, UPS returns to utility immediately, if battery low occur.

<n> is a number ranging from 01 to 99.

Turn On/Off beep - Toggle the UPS beeper

Computer:

Q<cr>

When the AC power failed, UPS will generate a warning beep to inform the manager. Manager could toggle the warning beep by sending this command.

Shutdown Command

Computer:

S<n><cr>

UPS:

Shut UPS output off in <n> minutes.

The UPS output will be off in <n> minutes, even if the utility power is present. If the battery low occurs before <n> minutes, the output is turned off immediately.

After UPS shutdown, the controller of UPS monitors the utility power. If the utility is recovered, the UPS will wait for 10 seconds and connect the utility to output.

<n> is a number ranging form .2, .3, …, 01, 02, …, up to 10.

Example

Computer:

S.3<cr>

UPS:

Shut output off in (.3) minutes

Shutdown and Restore Command

Computer:

S<n>R<m><cr>

UPS:

Shut UPS output off in <n> minutes, and waiting for <m> minutes then turn on UPS output again.

The shutdown sequence is the same as the previous command. When the <m> minutes expired, the utility do not restore, the UPS will wait until utility restore.

If UPS is in shutdown waiting state, the "C" command can let the shutdown procedure cancelled.

If UPS is in restore waiting state, the "C" command can let the UPS output turned on, but UPS must be hold off at least 10 seconds. (if utility is present)

<n> is a number ranging from .2, .3, …, 01, 02, …, up to 10.

<m> is a number ranging from 0001 to 9999.

Cancel Shutdown Command

Computer:

C<cr>

UPS:

Cancel the SN<n><cr> and SN<n>R<m><cr> command.

If UPS is in shut down waiting state, the shut down command is cancelled.

If UPS is in restore waiting state, the UPS output is turned on, but UPS must be hold off at least 10 seconds. (if utility is present)

Cancel Test Command

Computer:

CT<cr>

UPS:

Cancel all test activity and connect the utility to output immediately.

UPS Information Command

Computer:

I<cr>

UPS:

#Company_Name UPS_Model Version<cr>

This function will make the UPS respond with the basic information about the company who manufacture the UPS, the model name of the UPS and the version number of the UPS firmware.

The length of every field is listed as follows:

Company_Name

15 characters, leave space if less than 15 characters

UPS_Model

10 characters, leave space if less than 10 characters

Version

10 characters, leave space if less than 10 characters

There should be a space character between every field for separation.

UPS Rating Information

Computer:

F<cr>

UPS:

#MMM.M QQQ SS.SS RR.R<cr>

This function makes the UPS answer the rating value of UPS.

There should be a space character between every field for separation.

The UPS’s response contains the following information field:

MMM.M

Rating Voltage

QQQ

Rating Current

SS.SS or SSS.S

Battery Voltage

RR.R

Frequency

Command summary

D

Status Inquiry *disable

Q1

Status Inquiry

T

10 Seconds Test

TL

Test until Battery Low

T<n>

Test for Specified Time Period

Q

Turn On/Off beep

S<n>

Shut Down Command

S<n>R<m>

Shut Down and Restore Command

C

Cancel Shut Down Command

CT

Cancel Test Command

I

UPS Information Command

F

UPS Rating Information

Invalid Command/Information Handling

If the UPS receives any command that it could not handle, the UPS should echo the received command back to the computer. The host should check if the command send to UPS been echo or not.

If there is any information field in the UPS’s response which is unavailable or not supported, the UPS should fill the field with @.

Implementation notes

S01R0001 and S01R0002 may not work on early firmware versions.

The failure mode is that the UPS turns off and never returns.

The fix is to push the return value up by 2, i.e. S01R0003, and it will return online properly.

Additional information from 21st century

Some of the information below originates from research published at f2065’s UPS LM project page, whose sources included NUT documentation and more, and kindly curated (picking entries new for NUT) and translated by Viktor Drobot. Another part was obtained by his RS232 sniffer as well, during development of sub-driver updates for Ippon Innova RT 3/1 series.

Note not all UPSes are able to answer/consume some or all of these commands!
Command Description

AR?, AR0, AR1

Querying/disabling/enabling auto power-on feature (known as auto restart for some Ippon UPSes).

Enabled by default (AR1).

If option is off (AR0) then UPS will stay powered "off" even after mains return, and should be switched "on" manually by using the power button.

AT?, AT0, AT1

Querying/disabling/enabling auto test feature.

BL?, BL

Battery level (in percents), usually represented as a 3-digit number with leading zero where needed.

BPS

Query bypass status. Typical answer:

(230.4 000.0 000.0 49.9
  • Fields 1..3 should be L1-N, L2-N and L3-N input bypass voltages;

  • field 4 is input bypass frequency.

EB?, EBnn

Query/set number of external battery packs.

EF?

Acceptable frequency deviations for HE/ECO mode (in percents).

EV?

Acceptable voltage deviations for HE/ECO mode (in percents).

FW?

Firmware version.

GR?, GR0, GR1

Query/disable/enable green mode (WinPower provides "Energy Saving" feature to control this mode).

Some UPS models switch themselves off after 5 minutes without load.

IP?, IPN, IPW, IPG

Query/set acceptable deviations for different modes:

  • normal (IPN);

  • wide (IPW);

  • generator (IPG).

Corresponding LEDs will be toggled for Smart Winner UPS models.

M

Query protocol type: the answer is usually P, T, V, C and some others rarely.

Q2

Query UPS status (analogous to Q1). Typical answer:

(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

As far as I was able to decipher this:

  • first three fields correspond to the L1-N, L2-N and L3-N input voltages;

  • fifth field is output voltage (3/1 Ippon UPS was tested though, maybe, fields 5..7 correspond to the L1-N, L2-N and L3-N output voltages generally);

  • eleventh field seems to be frequency (don’t know, input or output);

  • twelfth field is battery voltage;

  • thirteenth field is temperature;

  • 15th field may be estimated runtime (in minutes?) and

  • 16th field is battery level (in percents, with leading zero).

However, I’m not sure about fields 4, 6..11, 14..23.

Q4

Yet another UPS status query. Typical answer:

(MMM.M ???.? ???.? NNN.N PPP.P ??? QQQ RR.R ??? ??? SS.S TT.T flags

Some flags:

  • E — test in progress;

  • A — mains fault, on battery;

  • C — bypass/AVR mode

Q6

Query UPS status, especially useful for three-phase models. Typical answer:

(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
  • Fields 1..3 are L1-N, L2-N and L3-N input voltages,

  • field 4 is input frequency,

  • fields 5..7 should be L1-N, L2-N and L3-N output voltages,

  • field 8 is output frequency,

  • field 9 is load (in percents, with leading zero),

  • field 12 is battery voltage,

  • field 14 is temperature,

  • field 15 is estimated runtime (in seconds),

  • field 16 is battery level (in percents, with leading zero).

QBL

Query battery stats. Typical answer:

(026.5 02 01 068 255
  • Field 1 is battery voltage;

  • field 2 is a number of batteries connected in series;

  • field 3 is a number of batteries connected in parallel;

  • field 4 is battery level (in percents, with leading zero);

  • field 5 is estimated runtime (in minutes?).

QI

Query serial number info.

QLDL

Query min and max load stats.

QMD

Query nominal UPS stats such as power capacity, number of batteries, etc.

QMF

Query manufacturer info.

QMOD

Query current status code.

QOF

Query output frequency info.

QP

Query acceptable bypass limits. Typical answer:

(45.0 55.0 176 264 EpbraDokc
  • Fields 1 and 2 are low and high limits for input bypass frequency;

  • fields 3 and 4 are the same but for the voltage;

  • field 5 is flags.

QRI

Yet another query for nominal UPS stats.

QVFW

Yet another firmware version query.

SASV07?

Query for serial number. Typical answer starts with GASV07D string.

TC?

Query for temperature.

V

Query for AVR mode settings. Typical answer:

165 200 220 240 275
  • Note: example is from the notes "as is", but probably the answer should start with parenthesis

  • Field 1 is low limit for battery transition;

  • field 2 is low limit for engaging AVR boost;

  • field 3 is nominal voltage;

  • field 4 is high limit for engaging AVR buck;

  • field 5 is high limit for battery transition.

V?

Query for output voltage mode.

V220, V230, V240

Set output voltage mode (corresponding LED may be toggled).

WH

Query for model info and nominal specs. Typical answer:

(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

Seems to be:

  • model code (field 4);

  • topology (field 6);

  • nominal voltage (field 8);

  • nominal frequency (field 9);

  • number of batteries (field 10).

WA

Query for power/load stats. Typical answer:

(001.4 000.0 000.0 001.4 000.0 000.0 001.4 001.4 006.5 000.0 000.0 007 00000000
  • Fields 1 and 7 seem to be real power measurements on output, while

  • fields 4 and 8 — the full one.

    Note

    This example a bit clumsy because in that case cos(phi) was about 1, but in other measurements I was able to get differing readings.

    Not sure why these fields are in pairs (maybe rolling average?).

  • Field 9 is current (amps), field 12 is load (percents).

Revision History

Rev. Date Description Modify by

2.6

1995-09-30

UPDATE "D" COMMAND (SS.SSSSS.SS)

Kevin Chiou

2.7

1996-08-01

Disable "D" COMMAND

Kevin Chiou

2.8

2024-12-17

Additional chapter from 21st century

"f2065", Viktor Drobot