Reverse engineered Computer / Powerwise L900 communications

Last Updated 8/27/2000

The Powerwise UPS communicates with the host computer at 2400 baud, 8 bits, no parity, 1 stop bit. The pinout for the DB9 port is documented on the communications port page. The data exchange with the UPS is not foolproof, so it's a good idea to poll a second or third time if you get responses that are illogical.

I've created a unix shell script that can be used to talk to the Powerwise UPS. I've only tested it with the L900, but it should work with its siblings. Change the TTY variable to match the actual place where you've connected the UPS.

A few words about the information below. The utility mentioned is the power company. The Load is the output of the UPS. The Battery is the battery string. I'm still deciphering the status strings.

All prompts and responses are followed by CR/NL (carriage return and new line). This makes it very easy to parse from a Unix script.

The data exchange looks like this...

First we have some initialization settings. I'm not sure what they do, as I've copied them from the Powerwise Assistant
Host sends 		UPS Response
Z
Z
Ax 1			OK
Sg 65535		OK
Sx 7			OK
Sx 1			OK
Si 			3000 01 2
At this point, we can start querying the UPS. These are the strings and meanings that I've found so far. In each case the query string is followed by a carriage return and new line.
Query	Meaning			Response 	Meaning
from 				from UPS
Computer
====	======================	======= 	==============
Uv	Utility Voltage xxx.xx	12190		121.90 v
Uf	Utility Frequency	60		60 Hz
Lv	Load Voltage		12133		121.33 v
Lc	Load Current		145		1.45 amps
Ll	Load % of possible load 16		16% of capacity
Bl	Battery % charged    	99		99 %
Bn	Battery time remaining 	5040		50.40 minutes
Bs	Battery Status		XX00XXXX XXX0XXXX
Bv	Battery Voltage		5475		54.75 Volts
Ss	Some status		0XX00000
Us	Utility Status?		XXXXXX00
Bx 1	Run Self test		OK

Ls 	load status?		XXX0XXXX XXX11000
Ss = 0XX00100 while self test is running if the self test is initiated from the front panel.
Ss = 1XX00100 if power fails and the battery is supplying the load.
Us = XXXXXX11 if power fails.