Skip to content

prabhatrm23git/Battery-Monitor-Pro

Repository files navigation

Battery Monitor Pro - Installation & Setup Guide

πŸ“‹ Prerequisites

  • Windows 10 or later
  • Python 3.8 or higher installed
  • Administrator access for installation

πŸ”§ Step-by-Step Installation

1. Install Python Dependencies

Open Command Prompt (cmd) and run:

pip install psutil pyttsx3 win10toast

Or install all at once:

pip install psutil pyttsx3 win10toast pypiwin32

2. Verify Installation

Run this command to ensure all packages are installed:

python -c "import psutil, pyttsx3, win10toast; print('All packages installed successfully!')"

3. Place Files in Project Directory

Create a folder named BatteryMonitor and place:

  • battery_monitor.py (main application)
  • battery_indicator.ico (optional - battery icon file)
  • run_battery_monitor.bat (launcher file)

4. Create Battery Icon (Optional but Recommended)

You can either:

Option A: Use a pre-made icon

Option B: Use your own icon

  • Convert any PNG/JPG image to ICO format using an online converter
  • Ensure filename is battery_indicator.ico

πŸš€ Running the Application

Method 1: Batch File (Recommended)

  1. Double-click run_battery_monitor.bat
  2. The application will launch automatically

Method 2: Command Prompt

  1. Open Command Prompt
  2. Navigate to the project folder:
    cd path\to\BatteryMonitor
  3. Run the application:
    python battery_monitor.py

Method 3: Python IDE

  • Open battery_monitor.py in your favorite IDE (PyCharm, VS Code, etc.)
  • Click "Run" or press F5

βš™οΈ Configuration

The application creates a battery_config.json file on first run.

Default Settings:

  • Low Battery Threshold: 30%
  • Full Battery Threshold: 100%
  • Warning Threshold: 90%
  • Check Interval: 10 seconds
  • Notifications: Enabled
  • Voice Alerts: Enabled
  • Dark Mode: Enabled

You can customize these settings through the GUI or edit battery_config.json directly.

πŸ“± Features

βœ… Real-time battery percentage display
βœ… Plugged/unplugged status
βœ… Time remaining calculation
βœ… Windows toast notifications
βœ… Text-to-speech alerts
βœ… Customizable thresholds
βœ… Activity log
βœ… Dark/Light mode
βœ… System tray integration ready
βœ… JSON-based configuration

πŸ”§ Customization

Modify Alert Thresholds

Open Settings (βš™οΈ button) in the application to adjust:

  • When to alert at low battery
  • When to alert when fully charged
  • When to warn at high battery percentage
  • Check interval frequency

Enable/Disable Features

Toggle in Settings:

  • Notifications (Toast popups)
  • Voice alerts (Text-to-speech)
  • Dark mode theme

πŸ› Troubleshooting

"psutil not found" error

pip install --upgrade psutil

"pyttsx3 not found" error

pip install pyttsx3

"win10toast not found" error

pip install win10toast

No icon displayed

  • Ensure battery_indicator.ico is in the same folder as the script
  • Or comment out the icon line in the code

No sound notifications

  • Check Windows sound settings
  • Ensure volume is not muted
  • Run Command Prompt as Administrator and retry

Notifications not showing

  • Check Windows Notification Center settings
  • Ensure "Do Not Disturb" mode is off
  • Restart the application

πŸ–₯️ System Requirements

Component Requirement
OS Windows 10/11
Python 3.8+
RAM 100 MB minimum
Disk Space 50 MB
Architecture 32-bit or 64-bit

πŸ“ Configuration File Example

The battery_config.json file looks like:

{
    "low_battery_threshold": 30,
    "full_battery_threshold": 100,
    "warning_battery_threshold": 90,
    "notification_enabled": true,
    "speech_enabled": true,
    "dark_mode": true,
    "check_interval": 10,
    "auto_start": false
}

🌟 Advanced Features

Auto-Start on Boot (Future Enhancement)

To make the app start automatically:

  1. Press Win + R
  2. Type: shell:startup
  3. Create a shortcut to run_battery_monitor.bat in this folder

Build Executable

To create a standalone EXE file (no Python needed):

pip install pyinstaller
pyinstaller --onefile --windowed --icon=battery_indicator.ico battery_monitor.py

The executable will be in the dist folder.

πŸ“ž Support

If you encounter issues:

  1. Check Python is installed: python --version
  2. Verify all dependencies: pip list
  3. Run from Command Prompt to see error messages
  4. Check Windows Event Viewer for system errors

πŸ“„ License

This software is provided as-is for personal use.

🎯 Roadmap

Future enhancements planned:

  • System tray minimization
  • Email notifications
  • Battery health report
  • Historical data graphs
  • Custom alert sounds
  • Smart charging mode
  • Multi-language support

Version: 1.0
Last Updated: 2026-01-28
Author: Prabhat R Mohanta

About

Battery monitoring

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages