Samil Power inverter tool
Project description
Samil Power inverter tool
Get model and status data from Samil Power inverters over the network.
Supported inverter series
- SolarRiver TL
- SolarRiver TL-D
- SolarLake TL
If you have a SolarLake TL-PM series inverter, check out this fork! :arrow_right: semonet/solar
If you just need PVOutput.org uploading, you can also try the old version.
Features
- View inverter data
- Upload to PVOutput.org
- Publish to MQTT broker
Requirements
- Python 3
- Inverter needs to be in the same network
Installation
Use pip
to install samil
, e.g. on Ubuntu:
sudo apt install python3-pip
sudo pip3 install samil
Or as a user installation:
pip3 install --user samil
Usage
To print the usage information:
python3 -m solar
Info
The protocol used by these inverters is described here.
The following units are used for the status values:
- Voltage in volts
- Current in amperes
- Energy in kilowatt hours
- Power in watts
- Temperature in degrees Celcius
- Operating time in hours
This project was originally a fork of zombiekipling/solriv but is now completely rewritten to implement new requirements.
As a library
You can use this project as a library. For documentation you will need to read through the source code.
Example to get started:
from samil import InverterListener
with InverterListener() as listener:
# Search for an inverter
inverter = listener.accept_inverter()
with inverter:
# Use with statement to automatically close the connection after use
# Model info
model = inverter.model()
model["serial_number"] # E.g. DW413B8080
# ... (see source code)
status = inverter.status()
status["output_power"] # E.g. 513 Watt
# ... (see source code)
Development info
Development installation:
pip install -e .
pip install -r dev-requirements.txt
Lint code: flake8
Run testcases: python -m unittest
License
MIT