Skip to content

Installation

John Blance edited this page Jul 7, 2024 · 17 revisions

Latest Stable Version

use this approach unless you know what you are getting yourself into

pip install mppsolar

Using a virtual environment

recommended if testing new features / release for when you want to keep the install and dependencies separate from the rest of the environment

  • create venv folder mkdir ~/venv
  • create venv python3 -m venv ~/venv/mppsolar
    • might need python3-venv installed
  • activate venv source venv/mppsolar/bin/activate (needed each time before using)
  • pip install from git pip install -e "git+https://github.com/jblance/mpp-solar.git#egg=mppsolar" (only needed if the code is updated)

notes

  • when using mppsolar as a service, remember to install systemd (if relevant)
    • enter the new virtual env source venv/mppsolar/bin/activate
    • install systemd library pip install systemd-python
  • you may also need to update/change the script to use the venv
    • eg at /usr/local/bin/mpp-solar - remember to change to the correct path
#!/bin/bash
/<path-to-venv>/venv/mppsolar/bin/python /<path-to-venv>/mppsolar/bin/mpp-solar

Using Docker

  • pull image $ docker pull jblance/mppsolar
  • run commands $ docker run --rm --device=/dev/hidraw0 jblance/mppsolar mpp-solar -p /dev/hidraw0 -P pi30max -c QPI
Clone this wiki locally