Skip to content

About

Windows desktop power monitor with battery/CPU/GPU telemetry, energy logging, tested power-policy controls, and safe rollback.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

PowerMon Desktop

A Windows desktop utility for monitoring laptop power draw, battery discharge, CPU/GPU telemetry, temperature, and power-plan behavior.

PowerMon is built with Python + tkinter and keeps the hardware-facing layer separate from calculation, logging, configuration, and UI code. It can run as a normal battery monitor, or use LibreHardwareMonitor for richer CPU/GPU/fan telemetry.

Highlights

  • Real-time power estimation from battery discharge, CPU package power, GPU power, and calibrated fallbacks.
  • Battery-rate normalization and sensor cross-checking for common firmware scale errors.
  • CPU/GPU temperature, load, clock, fan and power telemetry.
  • CSV energy logging with daily aggregation and cost estimates.
  • Temporary GAME MAX AC power profile with verification and automatic rollback.
  • Eco/power-saving profile with restoration of the previous Windows power plan.
  • Portable JSON configuration, light/dark UI, temperature and currency preferences.
  • Crash-safe recovery for temporary power-plan state.
  • 69 unit tests covering power math, sensor fusion, battery normalization, config, logging and rollback behavior.

Safety model

PowerMon changes Windows power policy only through powercfg. It does not overclock, undervolt, edit BIOS settings, or directly change CPU/GPU voltage.

Performance mode is temporary: remember the active plan, create a temporary performance plan, apply and verify supported settings, and restore the previous plan on disable/exit or recovery.

Requirements

  • Windows 10/11
  • Python 3.11+
  • .NET runtime
  • Optional but recommended: LibreHardwareMonitor for detailed hardware telemetry

Install Python dependencies:

python -m pip install -r requirements.txt

Install LibreHardwareMonitor into the local LHM/ folder:

powershell -ExecutionPolicy Bypass -File .\scripts\setup_lhm.ps1

The helper downloads the official LibreHardwareMonitor release from its GitHub repository. Third-party binaries are intentionally not committed to this repository.

Run

python main.py
python do_dien.py

Windows launchers are also included: 00_MENU_POWERMON.bat, 01_MO_POWERMON.bat, and 02_DO_DIEN_CLI.bat.

Administrator rights improve access to hardware sensors and are required for changing Windows power-plan settings.

Tests

python -m unittest discover -s tests -v

The public export is designed so the test suite does not require bundled LibreHardwareMonitor binaries.

Architecture

main.py
do_dien.py
powerapp/
  config.py
  paths.py
  theme.py
  units.py
  services/
  system/
  ui/
tests/
scripts/setup_lhm.ps1

The calculation layer is intentionally separated from OS and sensor access so most behavior can be tested without privileged hardware access.

Third-party dependency

Detailed telemetry uses LibreHardwareMonitor, licensed under MPL-2.0. It is downloaded separately and is not vendored in this public repository.

Notes

Hardware sensor availability varies by laptop firmware, embedded controller, driver, and permissions. Unsupported values are treated as unavailable rather than fabricated.


Vietnamese project note: PowerMon là ứng dụng Windows theo dõi điện năng/nhiệt độ/tải phần cứng và quản lý power plan tạm có rollback an toàn.

About

Windows desktop power monitor with battery/CPU/GPU telemetry, energy logging, tested power-policy controls, and safe rollback.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages