Monitor an Older UPS Status With a Raspberry Pi




Here is a small mod I made for an OPTI-UPS VS575C.

The ups has a serial port and works well with Windows, along with a serial to USB adapter and the Opti-UPS ‘Sentry’ software, the UPS can tell Windows when it has switched to battery mode on an AC power failure. This allows Windows to shut down properly if needed.

The Sentry software is not available for Linux and the serial data is non-standard and not easy to decipher. It’s not even supported by NUT (

So I decided to use the front LED’s on the device to ascertain the current state of the UPS, the green LED means the UPS is on AC mode, orange means battery mode.
I took the UPS apart and soldered two wires to the battery mode LED, fed these outside of the UPS and hooked them up to a Raspberry Pi’s GPIO port and ground.

Now when the AC power fails, the UPS sends 1.8v to the front LED and the Raspberry Pi reads a logic 1 on it’s GPIO pin (pin 5 set as an input).

This means I can monitor that pin with a BASH script, and have the script shutdown my NAS, and other networked devices all being powered by the UPS - over SSH.

The example script I've made checks the GPIO pin every few seconds, and if it reads a "1" then the AC power is down, It then sends me a push notification to my iPhone using Prowl/Growl.  If the AC power remains off for longer than 30 seconds the script issues a shutdown command to my NAS drive.  The GPIO pin is then monitored again, until the power is restored, then it sends a WakeOnLan packet to the NAS to power it up again.

You'll need to enable passwordless ssh logins to your own devices if you use this same method.




    • Tape Contest

      Tape Contest
    • Arduino Contest 2019

      Arduino Contest 2019
    • Trash to Treasure

      Trash to Treasure

    4 Discussions


    2 years ago

    This is so cool! I've been researching how to do this (except I was thinking of using the piezo buzzer not the LED).

    I even asked whether it was a good idea to do so on Most people seem dead-set against it. (

    1 reply

    Reply 2 years ago

    Thanks for the comment. This is a simple solution.


    5 years ago on Introduction

    Hi, es possible to use these device for repalce my disck drive from and old Apple II ?


    5 years ago

    You will of course need to install "wiringPi" to use the gpio commands. I forgot to mention it earlier.