A Python library for controlling SMA Sunny Island inverters
Project description
SMA Sunny Island Controller
A controller to read out and send commands to a SMA Sunny Island battery inverter. SUNNY ISLAND 4.4M / 6.0H / 8.0H
This code was used in a home built Home Energy Management System (HEMS), to include a battery into a smart home. You can read more about it in my blog post: How I built a HEMS with solar, a battery and a charge station (in Python)
How to use the code
Set up
pip3 install SMASunnyIsland
Then in your code:
from smasunnyisland import SMASunnyIslandClient
client = SMASunnyIslandClient("192.168.1.10", max_charge_value=-2000, max_discharge_value=2000)
Read out values
values = client.read_sma_values() # To print all values
values = client.read_sma_values('ChaState') # To read a single value, in this case the State of Charge (SoC)
Control the battery
client.set_power_setpoint(1000) # To discharge the battery with 1000 Watt (1 kW)
client.set_power_setpoint(-2000) # To charge the battery with 2000 Watt (2 kW)
Disclaimer
The code within this repository comes with no guarantee, the use of this code is your responsibility.
I take NO responsibility and/or liability for how you choose to use any of the source code available here. By using any of the files available in this repository, you understand that you are AGREEING TO USE AT YOUR OWN RISK.
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
Built Distribution
Hashes for SMASunnyIsland-0.45-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8c56314efb3ca6e29c2a70e04f3339a06134896ead19215ad0d103632d53cfb |
|
MD5 | 43db1f99e21d91bd1c9406fc200aad2e |
|
BLAKE2b-256 | fa1b95570659c22f300619d68c5485b77a4e52198f50b940a90c89efd7fb39f1 |