Every device. One tool. Pay once. Modbus · BACnet · Siemens S7 · one-time licence · also from us: BACManager ↗

Huawei SUN2000 to Home Assistant over Modbus — No Cloud

Read a Huawei SUN2000 inverter and its DTSU666-H meter locally over Modbus TCP and publish the values to Home Assistant through MQTT. They appear by themselves, as one device with units and device classes, ready for the Energy dashboard — no FusionSolar cloud, no custom integration, no YAML. And because the SDongle serves only one Modbus client at a time, the same single connection can also feed a PLC, an EMS or a wallbox.

Home Assistant device page for a Huawei SUN2000 published by ModbusManager Pro over MQTT: PV power, active power, yield today and total, grid power, imported and exported energy, phase voltage, frequency, inverter temperature, efficiency and status
The free workspace below, publishing a simulated SUN2000-10KTL-M1 to Home Assistant. Every entity was created by MQTT discovery — nothing was typed into Home Assistant.

Why Not the Cloud, or a Second Modbus Client?

There are three usual ways to get a SUN2000 into Home Assistant, and each has a catch:

WayCatch
FusionSolar cloudValues arrive minutes late and stop when the internet does. Not good enough to switch a heater or a battery on surplus.
Home Assistant reads the inverter itselfWorks — until anything else needs the inverter too. Huawei's SDongleA-05 Modbus TCP Guide allows one client at a time, even in Unrestricted mode. A wallbox, an EMS or a PLC on the same dongle means dropped connections.
A gateway between themHolds the one connection and shares the values. That is what this page sets up — on a Windows PC, with no Raspberry Pi and no Docker.

How It Works

SUN2000 + DTSU666-H meter SDongle, port 502 Modbus TCP one connection ModbusManager Pro Gateway scales registers: kW, kWh, V, Hz, °C MQTT Modbus TCP Home Assistant Mosquitto add-on MQTT discovery PLC / EMS / wallbox optional, same values

ModbusManager Pro's gateway polls the inverter on its own, in the background, with no window open. Each mapping row reads one register, applies Huawei's gain and publishes the result to sun2000/<name>/state. With Home Assistant discovery on, it also tells Home Assistant what each value is — power in kW, energy in kWh as a growing total — so the entities need no configuration. When the gateway stops, Home Assistant shows them as unavailable instead of keeping old numbers.

What You Need

Step by Step

1 Download the workspace below and open it in ModbusManager Pro (Workspace › Open). Confirm when it asks to apply the gateway configuration.

2 Point it at the inverter — on the Gateway tab, set the SUN2000 endpoint's IP address to your dongle's (port 502). The rows use unit ID 1, the inverter's usual RS485 address behind the dongle.

3 Point it at Home Assistant — in the MQTT panel, enter Home Assistant's IP address as the broker (port 1883) and a Home Assistant user name and password. The password stays on this PC: it is not saved in the workspace.

4 Start the gateway. The MQTT panel says connected. Tick Start gateway automatically and it starts by itself whenever ModbusManager starts.

5 In Home Assistant, open Settings › Devices & services › MQTT: the device ModbusManager sun2000 is there with its entities.

ModbusManager Pro Gateway tab: the SUN2000 endpoint, the MQTT panel connected to Home Assistant's broker with discovery on, and mapping rows with Dest MQTT, unit and Home Assistant device class
The Gateway tab after step 4: one endpoint, the MQTT panel connected, and a row per value with its unit and Home Assistant class.

What Appears in Home Assistant

EntityRegisterType, gainUnitDevice class
PV power32064I32 ÷1000kWpower
Active power32080I32 ÷1000kWpower
Yield today32114U32 ÷100kWhenergy
Yield total32106U32 ÷100kWhenergy
Phase A voltage32069U16 ÷10Vvoltage
Grid frequency32085U16 ÷100Hzfrequency
Inverter temperature32087I16 ÷10°Ctemperature
Efficiency32086U16 ÷100%—
Device status32089U16—— (512 = on-grid)
Grid power (export +)37113I32Wpower
Grid exported37119I32 ÷100kWhenergy
Grid imported37121I32 ÷100kWhenergy

Energy entities are published as growing totals (total_increasing), which is what the Energy dashboard asks for. Registers, types and gains are Huawei's — the full map with the rest of the registers is on the SUN2000 Modbus register map page.

The Energy Dashboard

In Home Assistant, Settings › Dashboards › Energy:

Energy dashboard fieldEntity
Grid consumptionGrid imported
Return to gridGrid exported
Solar production energyYield total
Solar production powerPV power

Use Yield total rather than Yield today for the dashboard: Home Assistant works out the hours and days from the growing total itself. The first bars appear after the first full hour.

Grid power sign: Huawei's meter register 37113 is positive when exporting and negative when importing, so the entity is named Grid power (export +). If you want import positive, set the row's Scale to -1 and rename it.

Battery (LUNA2000)

The workspace has four battery rows switched off: state of charge (37760, ÷10, %), charge/discharge power (37765, W) and the total charged and discharged energy (37780 and 37782, ÷100, kWh). With a LUNA2000 fitted, tick them on the Gateway tab and they appear in Home Assistant on the next start — the totals fit the Energy dashboard's battery fields. Check the power sign on your system once; Huawei's document does not state it.

Share the Connection with a PLC, EMS or Wallbox

The dongle's one-client limit is where the gateway pays off. Add rows with Dest: Modbus map next to the MQTT ones and ModbusManager serves those values as an ordinary Modbus TCP slave on this PC — a PLC, an energy manager or a charger reads them there, in whatever register layout and data type it expects, while Home Assistant keeps its MQTT feed. A Siemens S7-1200/1500 can also GET them as a data block. Still one connection to the inverter.

Writing Back

A row in write mode becomes a number (or a switch for a coil) in Home Assistant, and what you set there is written to the register and read back. The workspace has none: SUN2000 control registers such as active power control (47415, 47416, 47418) change how the inverter feeds the grid, and Huawei's own app may need installer settings for them to take effect. Add them deliberately, one at a time, and check the result on the inverter.

Compared with the huawei_solar Integration

The huawei_solar custom integration (installed through HACS) reads the SUN2000 from inside Home Assistant and is free. Which one fits depends on what else is on the inverter:

huawei_solar (HACS)ModbusManager Pro gateway
Runs onHome Assistant itselfA Windows PC
InstallHACS custom integrationA Windows program, MQTT to Home Assistant's standard broker
Other systems on the same dongleNo — it is the one clientYes — Modbus TCP map and S7 data block from the same connection
Other devicesHuawei onlyAny Modbus RTU/TCP device, Siemens S7, BACnet (BACManager)
Battery controlBuilt inWrite rows you add yourself
PriceFreeOne-time licence, 14-day free trial

If Home Assistant is the only thing that will ever talk to the inverter, huawei_solar is the simpler choice. If a wallbox, an EMS, a PLC or a commissioning laptop needs the inverter too — or the same PC already reads meters and drives over Modbus — one gateway in front of everything is the setup that keeps working.

Deye, Sungrow, SMA and Other Inverters

Nothing in the gateway is Huawei-specific: any register a row can read can go to Home Assistant the same way. The register maps for Sungrow, Deye, Sunsynk and Growatt and SMA, Fronius and SolarEdge (SunSpec) give the addresses, types and gains to put in the rows. A Deye on RS485 needs an RS485 port on the PC or an RS485-to-Ethernet gateway — its Wi-Fi logger does not speak Modbus TCP.

Download the Workspace

Huawei_SUN2000_HomeAssistant.json

SUN2000 + DTSU666-H to Home Assistant over MQTT. Open via Workspace › Open in ModbusManager Pro 1.9.5 or newer.

Download Workspace

Try it with ModbusManager Pro

Gateway, MQTT and Home Assistant discovery included. Free 14-day trial. No credit card. Windows 10/11.

Download Pro Trial

Frequently Asked Questions

Does this need the FusionSolar cloud or an internet connection?

No. ModbusManager reads the inverter over your own network and publishes to Home Assistant's own broker. Nothing leaves the building, and it keeps working when the internet does not.

Can Home Assistant and another system read the SUN2000 at the same time?

Not both directly through the SDongle: it serves one Modbus TCP client at a time. Let ModbusManager's gateway be that client and share the values — MQTT for Home Assistant, a Modbus TCP map or an S7 data block for the rest.

Do I need to write YAML in Home Assistant?

No. The gateway announces each value through MQTT discovery with its name, unit, device class and state class, and Home Assistant creates the entities itself, all under one device.

What happens when the PC or the gateway stops?

The gateway's last will marks the device unavailable in Home Assistant, so no stale values are shown. When it starts again it reconnects and publishes fresh values; it also announces itself again whenever Home Assistant restarts.

Which ModbusManager edition do I need?

ModbusManager Pro 1.9.5 or newer (the gateway and the MQTT output are Pro features), or BACManager for BACnet and Modbus devices. The free 14-day trial includes everything.

Sources

Huawei, SUN2000MA V200R024C00SPC106 Modbus Interface Definitions (V3.0), Issue 06, 2025-06-12 (support.huawei.com, EDOC1100480297), and SDongleA-05 Modbus TCP Guide, Issue 01, 2021-11-07 — registers, gains and the one-client limit, as on the SUN2000 register map page. Home Assistant, MQTT integration and discovery. Register availability differs by model and firmware — check the document for your inverter.

// one connection, many readers

Home Assistant and everything else on the same inverter

The SDongle lets one Modbus client in. ModbusManager Pro's gateway can be that client — and hand the same values to Home Assistant over MQTT, to a PLC as a Modbus TCP map or a Siemens data block, and to anything else that speaks Modbus.

Modbus gateway software →