Skip to content
diqezitPublic

About

monitor your APC UPS in real-time. View battery voltage, load, runtime, and AVR status in overlay window

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

UPS Monitor

Platform Language GUI Graphics

Lightweight Windows app for real-time monitoring of APC UPS devices via USB HID. Built with C++20, Dear ImGui and DirectX 11

Features

  • Real-time monitoring of battery and input voltage, load, charge and runtime
  • Output voltage only when exposed by device descriptor
  • AVR status for Automatic Voltage Regulation modes
  • Hardware low-battery and imminent-shutdown warnings when exposed by descriptor
  • Read-only Details page with rated power, nominal voltages, manufacture dates, runtime limit and last transfer reason
  • Configurable beeper, transfer sensitivity, low and high transfer voltages
  • Modern dark-themed always-on-top draggable UI
  • Low resource usage with bundled runtime DLLs
  • Auto-reconnect on USB disconnect

Screenshot

Monitor Settings

Supported Devices

APC USB HID devices, vendor ID 0x051D Tested with Back-UPS XS 650CI; available readings and settings depend on descriptor

Reverse Engineering

Uses HID descriptor fields and mappings checked against official APC PowerChute software

Build Requirements

Visual Studio 2022, CMake 3.20+ and Windows SDK 10.0+ HIDAPI and ImGui headers, import libraries and runtime DLLs are included

git clone https://github.com/diqezit/CustomUPC
cd CustomUPC
cmake -B build
cmake --build build --config Release

Source files

Module Purpose
src/headers/UpsState.h Plain UPS data and setting codes
src/headers/UpsDevice.h Device interface and descriptor field types
src/UpsDevice.cpp HID parsing, polling and existing settings
src/headers/MainWindow.h Three UI entry points
src/MainWindow.cpp Formatting, display cache and ImGui rendering
src/main.cpp Win32 window, DirectX 11 and message loop
src/headers/Logger.h and src/Logger.c Small C logging API

Data flow: USB HID -> UpsDevice -> UpsState -> UI

Usage

  1. Connect your UPS via USB
  2. Run CustomUPC.exe
  3. Monitor real-time status

Click and drag the header area to move the window Open Details for values reported by UPS. Manufacture dates are not replacement dates, and rated power is not measured load

Runtime limit is shown read-only in Details in minutes and represents a warning threshold, not a power-off delay Use Tab, arrow keys and Enter for native keyboard navigation

Status indicators:

  • ONLINE: Normal operation on AC power
  • CHARGING: Battery charging
  • ON BATTERY: Running on battery power
  • AVR BOOST/TRIM: Voltage regulation active
  • OVERLOAD: UPS overloaded
  • REPLACE BATTERY: Battery needs replacement
  • DISCONNECTED: No UPS detected
  • LOW BATTERY: UPS reports charge below its capacity limit
  • UPS SHUTDOWN SOON: UPS reports imminent shutdown

Troubleshooting

  • UPS not detected: Check USB cable/port, verify in Device Manager, run as Administrator
  • Incorrect readings: Wait for initial calibration, ensure battery is healthy
  • Application won't start: Install Visual C++ Redistributable and update DirectX 11

Logs are written to ups_monitor.log in the application directory

About

monitor your APC UPS in real-time. View battery voltage, load, runtime, and AVR status in overlay window

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages