A high-level wrapper around Monsoon Power Monitor's Python API (PyMonsoon).
A pip install monsoon is probably all you need but you can also replicate the Conda environment I've used:
conda env create -f environment.yml
source activate powermonitorIf you're using a first generation Power Monitor (i.e. the white one) you'll probably need to upgrade its firmware before you can use the Python interface. The firmwares images are available in PyMonsoon's repository and are committed here as well for ease of use:
from pmutils import PowerMonitor
PowerMonitor.upgrade_white_device_firmware()from pmutils import PowerMonitor
PowerMonitor.downgrade_white_device_firmware()from pmutils import PowerMonitor
with PowerMonitor() as pm:
pm.power_on(vout=5.0)
pm.enable_all_channels()
pm.live()- List all useful commands.