Open-source replacement firmware for the Sungrow WiNet-S and WiNet-S2 communication dongles, built on ESPHome. The dongle that plugs into your inverter becomes a local, Home Assistant friendly gateway with inverter and battery control, while everything the stock dongle did for other people (the iSolarCloud connection, the installer app, Modbus-TCP) keeps working.
Warning
Alpha software. Tested daily on an SH10RS with two SBR192 stacks and an SG5.0RS; the SH15T is verified for reads by a user. Other models are expected to work; see the hardware compatibility chart and limitations, keep the way back to the stock firmware in mind (docs/back_to_stock.md), and report what you find.
- Every device in Home Assistant, locally. The inverter, each battery stack and the meter
appear through MQTT discovery as their own devices, with the same entity scheme as the
Winet Extractor add-on:
sensor.sh10rs_<serial>_battery_soc. Values update every second for power and every five seconds for MPPT and battery data, polled straight from the RS485 bus. - Control, with a safety gate. EMS mode, forced charge and discharge, SOC limits, export limit, string-inverter power limit, start/stop. Every write passes an allow-list and range check, is read back, and only happens while the dongle's Inverter writes enabled switch is on (off by default).
- A web UI on the dongle. Dashboard, every signal of every device, the installer protection settings and the country / grid-code setup with a preview before anything is written, diagnostic captures (I-V curves, grid waveforms, fault recordings) with in-browser viewers, settings and logs.
- iSolarCloud still works, and is now a choice: the dongle presents itself to the cloud as the stock unit with its own serial number, so the Sungrow app and portal keep working. A Cloud uplink switch turns the connection off, and a separate Cloud writes switch (default off) decides whether the cloud may change inverter settings.
- Modbus-TCP on port 502, so mkaiser's integration, SunGather and friends keep working against the usual register maps, with the same write gate.
- Diagnostics built in. A reset journal that survives reboots, a one-click diagnostics report with serial numbers removed, and a Send diagnostics button that is also how a new inverter model gets supported (usage reporting).
| Dashboard | Device signals and controls | Settings |
|---|---|---|
![]() |
![]() |
![]() |
More screenshots: devices, installer settings, grid-code setup, captures, boot slots and cloud identity.
| Dongle | SoC | Network | Status |
|---|---|---|---|
| WiNet-S (V200) | ESP32, 4 MB PSRAM | Wi-Fi | β |
| WiNet-S (V200) | ESP32, 4 MB PSRAM | Ethernet (DP83848) | β |
| WiNet-S2 (SV300) | ESP32-S3, 8 MB PSRAM | Wi-Fi | β ; pre-built image and updater install π’ |
| WiNet-S2 (SV300) | ESP32-S3, 8 MB PSRAM | Ethernet (W5500) | π’ |
Each image carries Ethernet and Wi-Fi: Ethernet is used while it has a link, Wi-Fi is the backup.
Legend and evidence: compatibility chart.
Inverters and batteries: every inverter the WiNet-S supports works, because the firmware polls each device from the register table of the protocol type it reports rather than by model name; the compatibility chart lists every class, whether its power-stage acceptance ranges are known, and how far it has been verified. In short: SH-RS hybrids, SG-RS string inverters, SBR batteries and a DTSU666 on the meter port are β ; the SH15T is π’ for reads. SH-RT and SG-RT models, SBH batteries, meters on their own RS485 address, EV chargers and the Energy Bridge are π‘/βͺ.
Pre-built image through the dongle's own updater, no tools on the dongle, no soldering, both dongles. The stock app stays in the other slot; Settings β Boot slots β Boot other slot is the way back.
-
Download your entry's
.zippackage andpublicKey_V1.pemfrom the latest release into an empty folder. Entries:winet-s-prebuilt,winet-s2-prebuilt. -
On a computer on the same network, install the tools with pipx (Python 3.11+), import the key and serve the package:
pipx install "git+https://github.com/NickStallman/Rewired-S@v0.9.2#subdirectory=tools" rewired-s-deploy import-key --host <dongle-ip> --pubkey <folder>/publicKey_V1.pem rewired-s-iconfig-server --dist <folder>
-
From a browser on that computer, log in to the dongle's stock web UI as
adminand open System β System maintenance β System update β iConfig update package. Start it and wait two to three minutes; the dongle reboots into Rewired-S. -
With a network cable the dongle takes a DHCP lease. Without one, join the
rewired-s-xxxxxxnetwork (passwordrewired-s-setup) and enter your Wi-Fi. -
Open
http://<dongle>/(admin/rewired-s), set the MQTT broker and a new password on the Settings page. Home Assistant discovers the inverter, batteries and meter.
Details, checks and recovery: installing through the updater; Windows, macOS and Linux setup of the tools: installing the tools; what the pre-built images do: pre-built images.
Other ways in: over the serial pads (WiNet-S only; the install page has ESP Web Tools for it), or compile your own image with ESPHome for compiled-in credentials, your own options, the native-entities alternative to MQTT, or the debug build. Your own image needs no clone: a short YAML file pulls the configuration from GitHub.
The dongle itself is a native ESPHome device (the writes gate, the cloud switches, reset reason, restart buttons). Everything behind it comes through MQTT discovery, because which devices sit on the RS485 bus is only known at runtime: ESPHome entities are fixed when the firmware is compiled, MQTT discovery lets the firmware publish one Home Assistant device per inverter, battery stack or meter it actually finds, keyed by model and serial number. The MQTT broker is the only extra service you need. Why, what gets published and how to build dashboards: docs/home_assistant.md. Ready-made dashboards: dashboards/.
Prefer Modbus? Leave the MQTT settings empty and point mkaiser's package or SunGather at the dongle's port 502. Writes go through the same Inverter writes enabled gate.
Three ways, none of which touches the dongle's identity or settings:
- Boot other slot on the web UI, while the stock app is still in the other slot.
- Extract the app image from an official Sungrow package you download yourself
(
rewired-s-sgu extract) and send it with ESPHome's OTA (not yet run on hardware). - Over serial on the WiNet-S, from your backup or from that extracted image.
Details and what is preserved: docs/back_to_stock.md.
Once a day the dongle sends an anonymous usage report to a collector run by the project (firmware and board versions, the models and firmware versions of the connected devices, which features are on, uptime, memory, reset reason) and short error events when something notable happens. The dongle is identified by a hash of its serial number; serials, addresses, host names and Wi-Fi names are never sent. It exists so that problems and new hardware show up without anyone filing an issue. The Usage reporting switch turns it off.
Send diagnostics on the Settings page uploads a report of the build, the detected devices with their identification reply and register map, feature state, memory and the recent log, with serial numbers, the node name and addresses replaced. Quote the reference it shows in an issue, or attach the Download report file instead. For a device that is not on the compatibility chart this report is everything needed to add it. Full description: docs/analytics.md.
| Compatibility | dongles, inverter families, batteries and accessories, with status |
| Install through the updater | signed package, key import, LAN pull route, go / no-go checks |
| Install over serial | WiNet-S pads, backup, flashing, ESP Web Tools |
| Installing the tools | the install commands and their setup on Windows, macOS and Linux |
| Pre-built images | setup network, default login, MQTT settings, updates |
| ESPHome | compiling your own image: your configuration, secrets, entries, options, make targets |
| Home Assistant | MQTT discovery, entity names, the dongle's own entities, dashboards |
| Control | every writable setting, the safety model, the write paths |
| Back to stock | three ways back and what is preserved |
| Cloud identity | how the dongle presents itself to iSolarCloud |
| Usage reporting | what is sent, when, and how to turn it off |
| Debug build | the read-only build for new hardware, flash backup, bus tools |
| Limitations | what is unverified, different from stock, or deliberately left out |
| Data format | the register, point and profile tables, and how to add a device family |
| Device types, Setup, Installer Β· Registers Β· Battery Β· Captures Β· Update rates Β· Board pins | reference |
How the dongles, inverters, batteries and the cloud protocol work is documented separately in SG-Docs; this repository cites it wherever a protocol or hardware fact matters.
python3 -m venv .venv && .venv/bin/pip install esphome==2026.9.1 -r tools/requirements.txt
cp secrets.yaml.example secrets.yaml
make # host suites, web suite, generated files up to date
make config # validate every entry
make compile # build every entryLayout: winet-s*.yaml entries, boards/ pins and partition tables, common/ packages,
components/ the ESPHome components, data/ the project's device tables, tools/ generators and
the .sgu tooling, dashboards/, docs/, tests/. CONTRIBUTING.md covers
the rules (no stock files, no serials) and how to add a device family.
Rewired-S is free and will stay free. If it is useful to you, sponsoring helps pay for the inverters, batteries and dongles that testing new hardware needs.
GPL-3.0 (LICENSE). Third-party components are listed in THIRD_PARTY_NOTICES.md. Sungrow, iSolarCloud, WiNet, SH10RS, SG5.0RS and SBR are trademarks or product names of Sungrow Power Supply Co., Ltd. This project is not affiliated with or endorsed by Sungrow.


