Computers Suck

Getting Modbus working on the Sungrow SH15T via their dumb little WiNet-S2 should’ve been simple. Port 502 was open, nc connected instantly, and even mbpoll showed the socket was alive. But every register read timed out. No data, no exceptions, nothing. I even tried every combination of slave IDs, register maps, and ports — same result every time. If only Sungrow had kept the dedicated modbus over TCP port on the inverter…

Just show up in HA, please. I beg you.

Naturally I blamed everything: wrong register map, broken Python client, RS-485 not actually enabled, weird Sungrow encryption requirements, the position of the sun in relation to other celestial bodies. I tried plain pymodbus, the encrypted client, alternate ports, reinstalling libraries, swapping scripts… nothing changed. Every attempt either timed out or got “connection reset by peer.” All I wanted was to see my energy usage in Home Assistant so I could tell me wife to stop slamming the splitties at night.

The fix? Absolutely ridiculous: just go into the WiNet-S2 web UI, turn Modbus TCP off, and turn it back on. That’s it. The moment I toggled it, everything lit up. Register reads started coming back immediately, the forwarding stats finally showed traffic, and all the Python scripts suddenly worked without touching anything else.

This stupid little button. I don't know what is active on port 516 though...

So if you’re banging your head against Sungrow Modbus on a SHx-T inverter: before you waste hours debugging firmware, register maps, or client code, just toggle Modbus TCP off and back on in the dongle UI. Apparently that’s the magic reset the WiNet-S2 needs to actually do its fucking job.