This release is a pre-release and may not be stable for production use.
Sungrow Modbus — Home Assistant integration
⚠️ Preview. Do not use this branch on a system you care about.
This is the
proper-ha-integrationbranch: a rewrite of this project as a real Home Assistant integration, released only as previews (0.1.0aN). Registers can move, entity IDs can change, and nothing here promises backwards compatibility yet.If you are a normal user, you want
main— the YAML package, evolved over five years, in use by thousands of people, and the only thing that is finished.
Trying it
It needs Home Assistant 2026.11 or later. This badge opens your own instance at the preview channel:
If your browser does not know your instance, add the channel by hand instead:
Settings → Marketplace → Add from link,
https://github.com/mkaiser/Sungrow-SHx-Inverter-Modbus-Home-Assistant-preview,
type Integration. The Marketplace reads a repository's default branch, and
this one's is the YAML package.
doc/installing_a_preview.md has the steps;
doc/integration_options.md lists every option
under Configure, and doc/integration_help.md the
actions, the known limitations and what to try when something fails.
The preview sets up diagnostics only: it identifies the inverter and runs the diagnosis, and creates no sensors for the readings. Everything below is built and tested, and switched on in a later release.
What this is
A Home Assistant integration on the Modbus architecture Home Assistant introduced in 2026.9 (it needs 2026.11 or later), meant to replace the YAML package. The hard requirement is that existing users keep their recorder history, long-term statistics and dashboards when they switch (doc/integration_migration.md).
What it does:
- All 135 read entities of the YAML package, held to it by tests, with the unit and state class of every entry they replace; created only where the hardware has them.
- Writes, each read back at once: the state-of-charge limits, charge and discharge maxima, the export power limit, three mode flags, three selects, and the forced-charging schedule (two windows as times, with a target SoC each). Start and stop are actions, with who may call them yours to choose (administrators by default).
- The SBR battery and the wallbox (AC011E-01 / AC22E-01, read-only) as devices of their own, behind a WiNet-S or, for the wallbox, at its own address over TLS.
- One shared connection per inverter, so no external Modbus proxy.
- Discovered by Home Assistant behind a WiNet-S, and a wallbox at its own address; otherwise set up by searching the network. Model, unit id and a cluster slave's role come from what the devices answer.
- Configurable poll intervals, per group, from 5 seconds to never.
- A generator the Sungrow cannot see: a non-Sungrow inverter behind the same meter, added back into the house load.
- English and German: names, dialogs and messages follow Home Assistant's language; entity ids stay English on every system, so one id means the same entity everywhere.
- Diagnostics to attach to a bug report, serial and host removed.
- The diagnosis, which reads what your installation answers, and the capability test, which writes each control, checks the inverter acted on it and puts everything back (device-diagnosis/README.md).
An iHomeManager found by the network search gets an entry of its own, read only: the site's flows, its grid meter and its settings as set.
Not yet: the Sungrow Logger (never measured; see devices-wanted.md), SBH batteries, the SBR's per-module entities, and writing to the wallbox.
doc/dashboard.md is the integration's own dashboard, with the controls behind a hold-to-unlock lock, doc/energy_dashboard.md says which sensors to pick for Home Assistant's Energy dashboard, doc/architecture.md is how it is built and why, Todo.md what is open, and doc/compatibility.md which setups have been diagnosed.
Developing
Nothing here needs an inverter — there is a simulator.
scripts/dev/setup.sh # devcontainer does this for you
scripts/dev/simulate.sh & # a fake SH10RT on :5020
scripts/dev/develop.sh # Home Assistant on :8123
Or make setup, make sim-bg, make dev. make on its own lists every
shortcut, and make check runs everything CI gates on.
Then Settings → Devices & Services → Add integration → Sungrow Modbus, and
point it at 127.0.0.1:5020, unit id 1.
doc/development.yaml is the copy-paste runbook: commands, the dev login, talking to real hardware, and getting the web UI onto your LAN. doc/development.md explains why things are the way they are.
The YAML package
It lives on the 2026-legacy branch,
which is where users should get it.
- Installation / Configuration
- Migration from versions before 2026
- Usage · FAQ · Help / Troubleshooting
- Changelog
Register documentation
The mapping follows Sungrow's Communication Protocol of Residential and Small Industrial Hybrid Inverter, V1.1.16, available from Sungrow support. If you have a newer version, say so in the discussions.
Help and contributions
- GitHub discussions for questions, or Discord.
- GitHub issues for bugs; attach a diagnostics download, which carries no serial and no address.
- A diagnosis of your installation is the most useful contribution, one that says everything works included: send it to the diagnosis issue.
Related work
- HA Modbus Manager
- Sungrow Wallbox
- Sungrow Logger 1000a
- Chint DTSU666 Modbus
- EVCC
- Sungrow document collections by bohdan-s and by Gnarfoz
Reuse and attribution
MIT: use this, change it, ship it commercially. Beyond the licence, one request — name where it came from when code, a register map, a wiki page or a measurement from here reaches your project or your answer to somebody's question. The addresses were measured on real installations, and attribution is the thread back to the firmware each finding holds on. doc/attribution.md says it in full, agents included.
Acknowledgements
Five years of this project is the work of many people — everyone who filed a register correction, tested a firmware, or answered a question in the discussions. The YAML package's history is theirs.
The wallbox registers are nobody's official document, and two projects worked theirs out by measurement:
- Louisbertelsmann/Sungrow-Wallbox-Modbus-HomeAssistant,
used here with its author's permission. Its charging-status enum is the one
thing a single session cannot yield: watching a car finish charging shows
the status settle on
6, and only that table says6is Completed rather than idle. - KevinD987/sungrow-ac011e (MIT), which publishes its register map with confidence marks and says plainly that nothing in it is manufacturer-confirmed. Its VERIFIED entry for the control-pilot voltage turned a hypothesis here into a second, independent measurement — on a different model.
doc/wallbox_registers.md compares all three,
register by register, and says which of them holds each line.
Metadata
Release files for sungrow-modbus 0.1.0a50
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sungrow_modbus-0.1.0a50.tar.gz | 299.3 kB | With provenance | Details for sungrow_modbus-0.1.0a50.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sungrow_modbus-0.1.0a50-py3-none-any.whl | Python 3 | none | any | Details for sungrow_modbus-0.1.0a50-py3-none-any.whl |
Total release size: 636.9 kB
Release files / sungrow_modbus-0.1.0a50.tar.gz
| Download URL | sungrow_modbus-0.1.0a50.tar.gz |
|---|---|
| Size | 299.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
773742797a3cce89f56a6e8c385c59e90881a8ebf107eb16d1fa2d15b3cfce84
|
|
BLAKE2b-256 checksum How to use checksums |
8b82afbba8ac4251f2ecd8564be739a1bb26bca04391d02d96e97eee576b6244
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logRelease files / sungrow_modbus-0.1.0a50-py3-none-any.whl
| Download URL | sungrow_modbus-0.1.0a50-py3-none-any.whl |
|---|---|
| Size | 337.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a5ec3f4c2273fa263157c2f2f2b4626536a08c0faaaf492cb58fa5ac5625008
|
|
BLAKE2b-256 checksum How to use checksums |
a1aeab29f40c185a91d5f88255fc9b9d6c59fa3cf00c44c8d62853bb34a06a93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logSecurity for sungrow-modbus 0.1.0a50
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for sungrow_modbus-0.1.0a50.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.