A lightweight, modern Windows application for real-time monitoring of APC UPS devices via USB HID protocol.
Designed for minimal resource usage with zero external dependencies.
- Features
- Screenshots
- Supported Devices
- Reverse Engineering
- Building from Source
- Architecture
- Usage
- Configuration
- Troubleshooting
- License
- Battery Voltage: Real-time battery voltage with health indicators
- Input/Output Voltage: Monitor AC input and regulated output
- Load Percentage: Current power load on UPS
- Charge Level: Battery charge percentage with visual progress bar
- Runtime Estimate: Estimated remaining runtime on battery
- AVR Status: Automatic Voltage Regulation mode (Boost/Trim/Normal)
- Modern UI: Clean, dark-themed interface built with Dear ImGui
- Always-on-Top: Floating window stays visible over other applications
- Draggable: Click and drag header to reposition
- Health Indicators: Color-coded status (Green/Yellow/Red)
- Device Info: Manufacturer, product name, and serial number
- Extended Metrics: Frequency, sensitivity, beeper status
- Zero Dependencies: Single executable, no installation required
- Low Resource Usage: Minimal CPU and memory footprint
- USB HID Protocol: Direct communication without drivers
- Auto-Reconnect: Automatic device reconnection on disconnect
Main monitoring window showing real-time UPS status
| Vendor | Models |
|---|---|
| APC | Back-UPS, Back-UPS Pro, Smart-UPS series |
| MGE | Ellipse, Protection Station |
| Belkin | UPS devices with USB HID |
- APC: 0x051D
- MGE: 0x0463
- Belkin: 0x050D
Note: Any UPS device using standard USB HID Power Device class should work.
This project utilizes advanced reverse engineering techniques to ensure accurate data interpretation from the UPS HID interface.
- Tools Used: IDA Pro was used extensively to analyze the official APC monitoring software (PowerChute).
- Protocol Analysis: Decompiled routines helped uncover hidden HID report IDs and data scaling factors not publicly documented.
- Accuracy: Thanks to this analysis, voltage readings and status flags (AVR Boost/Trim, Overload) are decoded with 100% accuracy matching official specifications.
- Visual Studio 2022 with C++ Desktop Development workload
- CMake 3.20+
- Windows SDK 10.0+
The project includes header-only dependencies:
- hidapi-win: HID API headers
- imgui: Dear ImGui headers and backends
- Clone repository
- Create build directory
- Generate project files
- Build using CMake
- Minimum Version: 3.20
- Language: C++20
- Standard Required: ON
- src/main.cpp: Application entry point
- src/core/: Core logic (State, Monitor, Device)
- src/ui/: User Interface rendering
- src/utils/: Utility functions (Logger, Utf8)
- lib/: External libraries (hidapi, imgui)
- res/: Windows resources
| Module | Purpose |
|---|---|
| UpsState.h | Pure data structures, enums, constants |
| UpsMonitor.h | Data processing, validation, formatting |
| UpsDevice.h | USB HID communication, device management |
| MainWindow.h | UI rendering with ImGui/DirectX11 |
UpsDevice (HID Read) -> UpsMonitor (Process) -> UpsState (Data) -> MainWindow (Render)
- Connect your UPS via USB cable
- Run
UpsMonitor.exe - Monitor real-time UPS status
- Move window: Click and drag header area
- Close: Click
Xbutton - Minimize: Not applicable (always visible)
- ONLINE: Normal operation on AC power
- CHARGING: Battery charging
- ON BATTERY: Running on battery power
- AVR BOOST: Voltage regulation active (boosting)
- AVR TRIM: Voltage regulation active (trimming)
- OVERLOAD: UPS overloaded
- REPLACE BATTERY: Battery needs replacement
- DISCONNECTED: No UPS detected
- Battery Voltage: > 11.5V (Good), 10.6-11.5V (Warning), < 10.6V (Critical)
- Charge: > 50% (Good), 20-50% (Warning), < 20% (Critical)
- Load: < 50% (Good), 50-80% (Warning), > 80% (Critical)
- Runtime: > 15 min (Good), 5-15 min (Warning), < 5 min (Critical)
- Battery Full: 13.20V
- Battery Warning: 11.50V
- Battery Critical: 10.60V
- Charge Warning: 50%
- Charge Critical: 20%
- Load Warning: 50%
- Load Critical: 80%
- Runtime Warning: 15 min
- Runtime Critical: 5 min
Logs are written to ups_monitor.log in the application directory.
- Check USB connection: Try different cable/port
- Verify device: Open Device Manager -> Human Interface Devices
- Check permissions: Run as Administrator
- Restart: Disconnect/reconnect UPS
- Wait for calibration: Initial readings may take 5-10 seconds
- Check battery age: Old batteries may report inaccurate data
- Verify model: Some UPS models have limited HID support
- Install Visual C++ Runtime: Ensure VC++ Redistributable is installed
- Update DirectX: Ensure DirectX 11 is available
- Check antivirus: Add exception for UpsMonitor.exe
- Check GPU drivers: Update to latest version
- Verify DirectX: Run
dxdiagto check status
This project is provided as-is for educational and personal use.
- Dear ImGui β Immediate mode GUI library
- HIDAPI β Cross-platform HID library
- APC β UPS HID protocol documentation
Made with β€οΈ for UPS monitoring
