Sungrow2mqtt: Sungrow/SMA Inverter over MQTT easy in Homeassistant

Hey, I took the time to create this Home Assistant add-on and to implement and further develop existing projects. I used MKaiser’s configuration YML as a basis, which is automatically fetched from his repo every time the system restarts, ensuring that the latest registers and sensors are always available.

Screenshots

:rocket: Major Update: sungrow2mqtt v1.1.2 is out!

Hi everyone,

Since the initial release, a lot of work has gone into making sungrow2mqtt even more reliable, feature-rich, and seamless to integrate with Home Assistant.

With v1.1.2 now released, here is a quick overview of what’s new and improved:


:new_button: Key Highlights & New Features

  • :writing_hand: Modbus Write Support: Preliminary support for writing to Modbus registers via MQTT (control switches, numbers, and settings directly from Home Assistant).
  • :high_voltage: Dynamic Limits & WiNET-S Support:
    • Automatic detection of max charge/discharge power and export limits based on inverter Modbus metadata.
    • Added option for connecting to WiNET-S / WiNET-S2 communication modules (using read-only registers).
  • :robot: Home Assistant Auto-Discovery Improvements:
    • No more ID Collisions: Included domains (sensor, number, etc.) in unique_id to ensure proper entity handling in HA.
    • Fixed UI Limits: Sliders for number entities are no longer falsely constrained to 0–100.
    • Dynamic Dropdowns: Pre-rendered options for select entities.
    • Binary Sensors: Standardized payloads to ON/OFF with improved truthiness detection in templates.
  • :rocket: Performance & Polling:
    • Block-based Modbus Polling: Drastically reduces network roundtrips and improves connection stability.
    • Retain Flag: Added retain=True for status and sensor messages, ensuring immediate data availability in HA after restarts.

:link: Repository & Full Changelog

Check out the full release details and updated documentation on GitHub:
:backhand_index_pointing_right: sungrow2mqtt on GitHub


:star: Show your support

If sungrow2mqtt is working well for you and saving you from YAML headaches, please consider leaving a Star on GitHub! It really helps the project gain visibility within the Home Assistant community.

GitHub Stars

Feel free to share your feedback, feature requests, or questions below! Happy automating! :battery:

Hi everyone,

Version 1.2.0 just landed :tada: — bigger under-the-hood release this time, focused on reliability, security and a couple of long-requested config options. Here’s what’s new:

:sparkles: New

  • Scan Level (scan.level): choose BASIC, STANDARD or FULL to control how many Modbus registers get polled — handy if you’re on WiNET-S or a slower connection. Switches and controllable entities (numbers, selects, buttons) are always available regardless of level.
  • Scan Interval (scan.interval.realtime/fast/medium/slowest): per-tier polling intervals are now actually configurable (closes #6).
  • Retries (scan.retries): set how many times a failed Modbus read gets retried before giving up for that cycle.

:bug: Fixed

  • The automatic register-file update (pulled from mkaiser’s register list) is now robust: request timeout, YAML validation before overwriting, and it can no longer hang startup or corrupt your local file on a network hiccup.
  • Fixed a bug where your configured scan.interval values were silently ignored and the defaults were used instead.
  • Clean shutdown handling: stopping the add-on now correctly marks entities “offline” in Home Assistant instead of leaving them stuck on the last “online” state.
  • A handful of smaller fixes — full list in the changelog below.

:locked: Security

  • Templates now render in a sandboxed Jinja2 environment, since the register file is auto-updated from a remote source — protects against a manipulated/compromised register file.
  • Removed an unused filesystem permission and some stale AppArmor boilerplate that wasn’t actually protecting anything.

:gear: Under the hood

  • Much better logging: a heartbeat every 5 minutes confirms everything’s running without flooding your log, plus richer DEBUG output when you actually need to troubleshoot a specific sensor.
  • Added a full test suite + CI, so regressions (like the scan.interval bug above) get caught automatically going forward.

Full changelog: CHANGELOG.md

As always, bug reports and feature requests are very welcome — either here in the thread or as a GitHub issue. If sungrow2mqtt is useful to you, a :star: on the repo goes a long way too!

Happy automating! :sun: