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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mppt_reader-1.0.5.tar.gz
.
File metadata
- Download URL: mppt_reader-1.0.5.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8a482e7bf8d2232dd25bb214c83c5f8efd96402293bcae0ff956244596cb3af |
|
MD5 | 1b3243861039a30a3edd47cc4007f9c0 |
|
BLAKE2b-256 | 65efe267610abb010905196693fb08b345a723d4c150266a98f25170ab7284fb |
File details
Details for the file mppt_reader-1.0.5-py3-none-any.whl
.
File metadata
- Download URL: mppt_reader-1.0.5-py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3610151625f863282dc8bbf098892a00c2b688a10b40c993f2e59e1be79da418 |
|
MD5 | ab395094f73b4a3522eacd00db16138e |
|
BLAKE2b-256 | 838a26215f20462764422472d42a671594fa483d0bda9f9d578f23e2131d9a90 |