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
mppt_reader-1.0.5.tar.gz
(19.0 kB
view hashes)
Built Distribution
Close
Hashes for mppt_reader-1.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3610151625f863282dc8bbf098892a00c2b688a10b40c993f2e59e1be79da418 |
|
MD5 | ab395094f73b4a3522eacd00db16138e |
|
BLAKE2b-256 | 838a26215f20462764422472d42a671594fa483d0bda9f9d578f23e2131d9a90 |