Skip to content

energyawareOS/adpower

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AdPower PSU-level Power Logger

A simple Python-based tool to log power consumption data from AdPower Wattman measurement devices via serial communication. This utility enables PSU-level power monitoring and logging for energy profiling and diagnostics.

Features

  • Collects real-time power usage (in Watts) and power factor (PF) via serial input
  • Supports logging at configurable time intervals and durations
  • Compatible with AdPower devices using /dev/ttyUSB0 serial interface

Requirements

  • Python 3.6+
  • AdPower power measurement device connected via USB serial
  • pyserial

Install dependencies:

pip install -r requirements.txt

Usage

The monitoring start time is adjusted so that the first measurement aligns with the next full-minute boundary based on the interval.

python powerlog.py [-i INTERVAL] [-t TIMEOUT]
  • -i: Logging interval in seconds (default: 5 seconds)
  • -t: Total monitoring duration in seconds (default: 120 seconds)

Output

Each log entry contains 4 columns:

  • Date and time (MM-DD HH:mm:ss)
  • Average power (Watt)
  • Accumulated energy during the interval (joules)

Example output:

07-17 15:24:54 153.6000 304.8745
07-17 15:24:56 153.2000 306.4358
07-17 15:24:58 153.3861 306.8286

Notes

  • By default, this script assumes the device is connected to /dev/ttyUSB0. Modify adpower.py if your serial port differs.
  • Ensure your user has permission to access the serial device (e.g., add to dialout group on Linux).

About

PSU-level power monitoring via serial logging from AdPower devices.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published