A system tray application for monitoring wireless game controller battery levels on Windows.
- Real-time Controller Monitoring: Automatically detects connected controllers (Xbox, PlayStation, Nintendo, etc.)
- Battery Status: Shows battery levels for wireless controllers in the system tray
- Controller Events Viewer: Click on any controller to open a detailed events window showing:
- Button presses and releases
- Analog stick movements (left/right stick)
- Trigger positions (LT/RT)
- D-pad input
- Real-time visual indicators for all inputs
app/
├── main.py
├── tray/
│ ├── tray_icon.py
│ └── menu_builder.py
├── ui/
│ └── events_window.py
├── controllers/
│ ├── batteryprovider.py
│ └── detector.py
├── platform/
│ ├── windows.py
│ ├── linux.py
│ └── macos.py
├── workers/
│ ├── poller.py
│ └── input_monitor.py
└── models/
└── controller.py
- Clone the repository
- Install dependencies:
pip install -r requirements.txtpython main.py- Install PyInstaller:
pip install pyinstaller- Build using the existing spec file:
pyinstaller main.spec- The generated executable will be available in:
dist/main/main.exe
- (Optional) Build directly from
main.pywithout the spec file:
pyinstaller --name gamepad-manager --noconfirm --windowed main.py- To remove previous build artifacts before rebuilding:
rmdir /s /q build dist- Run the application - it will appear in the system tray
- Connected controllers will be listed in the tray menu with their battery status
- Click on any controller to open the Events Viewer window
- In the Events Viewer:
- Click "Start Monitoring" to begin capturing controller inputs
- View real-time button presses, stick movements, and trigger positions
- See visual indicators for all analog inputs
- Monitor the events log for detailed input history
- Click "Clear Log" to reset the events display
- Click "Stop Monitoring" when done
Error message:
ImportError: Unable to load any of the following libraries:libhidapi-hidraw.so libhidapi-hidraw.so.0 libhidapi-libusb.so libhidapi-libusb.so.0 libhidapi-iohidmanager.so libhidapi-iohidmanager.so.0 libhidapi.dylib hidapi.dll libhidapi-0.dll
Solution:
This error occurs when the hidapi package is not properly installed with the native Windows DLL. To fix it:
- Uninstall conflicting packages:
pip uninstall -y hid hidapi- Reinstall
hidapiwith fresh download to ensure the Windows wheel is installed:
pip install --no-cache-dir hidapi- Verify the installation:
python -c "import hid; print('hidapi loaded successfully!')"The Windows wheel (.whl) includes the necessary hidapi.dll file. Using --no-cache-dir ensures you download the correct version for your platform