Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anfractuosity/usbmeter
Simple program for extracting data from UM25C bluetooth power meter and for generating real-time voltage, current and power graphs
https://github.com/anfractuosity/usbmeter
um24c um25c usb-meter
Last synced: 2 months ago
JSON representation
Simple program for extracting data from UM25C bluetooth power meter and for generating real-time voltage, current and power graphs
- Host: GitHub
- URL: https://github.com/anfractuosity/usbmeter
- Owner: anfractuosity
- Created: 2018-08-26T09:07:29.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-06-08T19:26:05.000Z (over 3 years ago)
- Last Synced: 2024-05-21T06:28:14.197Z (8 months ago)
- Topics: um24c, um25c, usb-meter
- Language: Python
- Homepage:
- Size: 45.9 KB
- Stars: 13
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](/images/graph.png)
# 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:```
--graph
usbmeter --addr
```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:
```
--graph --out out.dat
usbmeter --addr
```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:
breakfor x in objects:
print("%s,%f,%f" % (x['time'],x['Volts'],x['Amps']))
```# Licence
MIT