Skip to content

anfractuosity/usbmeter

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

usbmeter

Extracts and graphs data from UM25C etc. USB power meters in Linux.

Based on the excellent reverse engineering found here - https://sigrok.org/wiki/RDTech_UM24C.

graph

Install on arch

sudo pacman -S bluez
sudo pacman -S bluez-utils 
sudo pacman -S python-pybluez
pip3 install . --user

Run on arch

Start the bluetooth service:

sudo systemctl start bluetooth
echo "power on" | bluetoothctl

It is then recommended to do the following, to view a live graph of voltage, current and power:

usbmeter --addr <ADDRESS> --graph

You can also run without the --addr parameter, for the device to be detected automatically, however some people have told me that this gives 'No services found for address ....' for them.

Save data

To save the power data to a file:

usbmeter --addr <ADDRESS> --graph --out out.dat

To process this pickled data, you can do:

#!/usr/bin/python3
import pickle
objects = []

with open('out.dat', 'rb') as f:
    while True:
        try:
            objects.append(pickle.load(f))
        except EOFError:
            break

for x in objects:
    print("%s,%f,%f" % (x['time'],x['Volts'],x['Amps']))

Licence

MIT

About

Simple program for extracting data from UM25C bluetooth power meter and for generating real-time voltage, current and power graphs

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages