Skip to main content

A framework for easily logging and modifying Tristar-MPPT-45 Solar Controllers over a serial connection.

Project description

MPPT-Reader

A work in progress way to quickly read from an TRISTAR-MPPT-45. Soon there will be added features to logging the data to unique data formats.

If you use the tool, please leave a star, so others can find it too in their search.

Use pip install mppt_reader to download the library.

If you want to just read and modify the MPPT-reader in a pythonic way without logging variables, use MPPTReader class.

If you want to log variables, you can just take your MPPTReader class and pass it into an MPPTLogger instance.

from mppt_reader.reader import MPPTReader
from mppt_reader.logger import MPPTLogger
from mppt_reader.constants import Variable

reader = MPPTReader("COM3")
# You must provide variables, but file_name will default to the current date and time. Update interval is normally 1 second.
logger = MPPTLogger(reader, variables=[Variable.BATTERY_VOLTAGE, Variable.ARRAY_VOLTAGE], file_name="output", update_interval=2)
# Now it will be logging all variables every second to output.csv and you can still mess with the MPTTReader
reader.overrides.battery_voltage_regulation.set_value(11)
# The value is set, but is not currently controlling the actual voltage regulation.
reader.overrides.battery_voltage_regulation.lock() 
# Now, it will start updating with your given value and you can change it.
reader.overrides.battery_voltage_regulation.set_value(10) 
# If you set too high or a too low value, you could cause a fault!
reader.overrides.battery_voltage_regulation.unlock()
# Now it will return control to the slave, make sure to unlock or you will just keep the same value forever.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mppt_reader-1.0.3.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

mppt_reader-1.0.3-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file mppt_reader-1.0.3.tar.gz.

File metadata

  • Download URL: mppt_reader-1.0.3.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for mppt_reader-1.0.3.tar.gz
Algorithm Hash digest
SHA256 0fcdacc84f3b26cd8a51179fef8e1fcdcb2b8bb75e28806e17dfa5211659c955
MD5 683ab757c5b23124882ee98f45b61851
BLAKE2b-256 5b0598ee7de7fc9016bbefaedfa5991c19dc995c8fc5e3455ffeba56833ba866

See more details on using hashes here.

File details

Details for the file mppt_reader-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: mppt_reader-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 18.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for mppt_reader-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 632fa0e7f359d6004336e5723328119c59f49a8b367ff09bf619995dd1433e04
MD5 3dde36d1ec42a9b85d8468bbab58a558
BLAKE2b-256 30aedbc206c9c0c1766bac13383158cec717bcdb5cc34e96d7d45018ab4a685d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page