Difference between revisions of "APC Smart-UPS"

From TheBeard Science Project Wiki
Jump to: navigation, search
(Finding Your Console Port)
(Finding Your Serial Port)
Line 32: Line 32:
 
== Finding Your Serial Port ==
 
== Finding Your Serial Port ==
  
Before you can configure apcupsd, you will need to figure out what serial port you're connected to. This is easy if you have only one serial device. The device file will be named something like <code>/dev/ttySN</code> where N is a number.
+
Before you can configure apcupsd, you will need to figure out what serial port you're connected to. This is easy if you have only one serial device. The device file will be named something like <code>/dev/ttySN</code> where N is a number. Most likely you will have many serial ttys in the /dev directory, but most of them will not actually have a recognized UART device attached.
 +
 
 +
To find which serial devices have a UART, you can run to following command:
 +
 
 +
<source>
 +
sudo less /proc/tty/driver/serial
 +
</source>
 +
 
 +
You will see an output similar this:
 +
<pre class="output">
 +
0: uart:16550A port:000003F8 irq:4 tx:0 rx:0
 +
1: uart:unknown port:000002F8 irq:3
 +
2: uart:unknown port:000003E8 irq:4
 +
3: uart:unknown port:000002E8 irq:3
 +
4: uart:ST16650V2 port:0000E030 irq:16 tx:0 rx:0
 +
5: uart:ST16650V2 port:0000E020 irq:17 tx:121720 rx:670672 brk:4
 +
6: uart:unknown port:00000000 irq:0
 +
...
 +
</pre>
 +
 
 +
Ignore the ones that say "unknown." The ones that actually have a UART device will display the UART model. If you have more than one, you might need to use a process of elimination. I happen to know that my device is on line 5. The number on the far left corresponds to the device number N in the file name <code>/dev/ttySN</code>. So I will configure apcupsd to use the device <code>/dev/ttyS5</code>. If you're not sure which device is the right one, you go ahead and configure apcupsd as I've specified in the following steps, and then follow the steps in
  
 
== Configuring Apcupsd ==
 
== Configuring Apcupsd ==

Revision as of 02:27, 17 July 2020

The following information applies to all APC Smart-UPS models. Most of this I personally tested using a Smart-UPS SC 1500 and a Smart-UPS 2200 (both are rack mount units).

Console Cables

To configure a Smart-UPS, you need to connect via console cable. Depending on your model, the unit may have a USB port, serial port, or both.

USB to RJ50 Cable

The Smart-UPS uses a non-standard USB to RJ50 cable, which looks exactly like an RJ45 but has 10 pins instead of 8. You might need to order one directly from APC or find a used one. The model number I ordered was AP9827 940-0127E and I can confirm it works on both Smart-UPS SC 1500 and 2200.

If you happen to have an RJ50 connector and a spare USB cable, you could make your own with the following pinout:

Serial Cable

IMPORTANT: You CANNOT connect a normal serial cable to the Smart-UPS. If you do connect a normal serial cable and terminate both ends, the Smart-UPS will likely shut down or exhibit other strange behaviors.

The cable required for a serial port on a Smart-UPS is also proprietary and has a non-standard pinout. You need a "Smart Signalling" capable serial cable (RS-232). The model number I ordered was 940-1524C and I can confirm it works with the Smart-UPS SC 1500 and 2200. Note that the "15" in that model number is the length of the cable, so any model that varies in those digits will work the same.

If you want to create your own serial cable, you will need a male DB9 connector, and a female DB9 connector. Wire them up with the following pinout:

Monitoring Using PowerChute (Windows)

Monitoring Using Apcupsd (Linux)

Apcupsd is an open source alternative to APC's PowerChute software for monitoring and configuring APC UPS devices. You can install it using you package manager. Note: The following tutorials were performed on Debian-based Linux.

sudo apt-get install apcupsd

Finding Your Serial Port

Before you can configure apcupsd, you will need to figure out what serial port you're connected to. This is easy if you have only one serial device. The device file will be named something like /dev/ttySN where N is a number. Most likely you will have many serial ttys in the /dev directory, but most of them will not actually have a recognized UART device attached.

To find which serial devices have a UART, you can run to following command:

sudo less /proc/tty/driver/serial

You will see an output similar this:

0: uart:16550A port:000003F8 irq:4 tx:0 rx:0
1: uart:unknown port:000002F8 irq:3
2: uart:unknown port:000003E8 irq:4
3: uart:unknown port:000002E8 irq:3
4: uart:ST16650V2 port:0000E030 irq:16 tx:0 rx:0
5: uart:ST16650V2 port:0000E020 irq:17 tx:121720 rx:670672 brk:4
6: uart:unknown port:00000000 irq:0
...

Ignore the ones that say "unknown." The ones that actually have a UART device will display the UART model. If you have more than one, you might need to use a process of elimination. I happen to know that my device is on line 5. The number on the far left corresponds to the device number N in the file name /dev/ttySN. So I will configure apcupsd to use the device /dev/ttyS5. If you're not sure which device is the right one, you go ahead and configure apcupsd as I've specified in the following steps, and then follow the steps in

Configuring Apcupsd

Reading UPS Status

Accessing UPS Configuration Terminal

Calibration

Line Input Sensitivity

Shutdown Scripts

Converting A 2-Battery UPS to a 4-Battery UPS

Links And Files