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.42", max_charge_value=-2000, max_discharge_value=2000)
Read out values
values = client.read_sma_values() # To read 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.
Release files for SMASunnyIsland 1.42
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| smasunnyisland-1.42.tar.gz | 5.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| SMASunnyIsland-1.42-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.7 kB
Release files / smasunnyisland-1.42.tar.gz
| Download URL | smasunnyisland-1.42.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4d35dd1f55fa3ddf5a4e4131451df2255b1ed4ed5b2130d8337ee488939d6164
|
|
BLAKE2b-256 checksum How to use checksums |
e7f12049cc87b55e3c3eac9e3e62589efdcfc0b0c2856a4e060bab75052bb45d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.11.5
|
Release files / SMASunnyIsland-1.42-py3-none-any.whl
| Download URL | SMASunnyIsland-1.42-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe4a6f5ee893e6b9430eb31f89f925ff0ddf82dc91678fdb3c8d6d093a51b4fa
|
|
BLAKE2b-256 checksum How to use checksums |
f90bd4f08049daab9a6002f09d9e4c4b96f8f6a3d7616b27797c08d9f91e4fd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.11.5
|