Files
odroid-power-mate/example/logger
2025-12-10 10:01:26 +09:00
..
2025-11-20 09:08:32 +09:00
2025-12-10 10:00:27 +09:00
2025-12-09 15:05:23 +09:00

Power Consumption Logger Example

Based on this script, you can monitor power consumption and implement graph plotting.

How to Run the Script

Install Python Virtual Environment

git clone https://github.com/hardkernel/odroid-powermate.git
cd odroid-powermate/example/logger
sudo apt install virtualenv
virtualenv venv
source venv/bin/activate

Install require package

pip install grpcio-tools requests websockets protobuf pandas matplotlib

Build status_pb2.py

python -m grpc_tools.protoc -I ../../proto --python_out=. status.proto

Execute script

Power consumption collection

# python3 logger.py -u <username> -o <name.csv> -p <password> <address>
python3 logger.py -u admin -p password -o test.csv 192.168.30.5 

Plot data

python3 csv_2_plot.py test.csv plot.png [--type power voltage current] [--source vin main usb]

plot.png