Lightweight Windows app for real-time monitoring of APC UPS devices via USB HID. Built with C++20, Dear ImGui and DirectX 11
- 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
APC USB HID devices, vendor ID 0x051D Tested with Back-UPS XS 650CI; available readings and settings depend on descriptor
Uses HID descriptor fields and mappings checked against official APC PowerChute software
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| 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
- Connect your UPS via USB
- Run CustomUPC.exe
- 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
- 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

