TapHome

Huawei SUN2000

Modbus TCP
Submitted by
Last updated: 03. 2026
Huawei SUN2000

The Huawei SUN2000 3-10KTL series are single-phase and three-phase string inverters for residential PV systems, with rated power from 3 kW to 10 kW. TapHome connects to the inverter via Modbus TCP — either directly through the inverter’s built-in WiFi access point or through a Huawei Smart Dongle (WLAN-FE or LAN) connected to the local network.

The template provides active power monitoring, DC input power, PV string current and voltage readings for up to 4 strings, daily and cumulative energy counters, detailed inverter status with alarm decoding, battery storage overview (for LUNA2000), and power control actions including reactive power compensation and active power derating.

Enabling Modbus communication

The SUN2000 inverter supports Modbus TCP over its WiFi access point and through the Smart Dongle. For a permanent connection with TapHome, the recommended approach is using a Huawei Smart Dongle-WLAN-FE (or Smart Dongle-4G) plugged into the inverter’s USB port.

Connection options
MethodInterfaceNotes
Smart Dongle (recommended)Ethernet / WiFiConnects inverter to local LAN. Allows simultaneous Modbus TCP + FusionSolar app.
WiFi Access PointWiFiDirect connection to inverter AP (SSID: SUN2000-<serial>). Only one client at a time.
RS-485 (Modbus RTU)COM port pins RS485A1/B1Not used by this template. Cannot run simultaneously with FusionSolar monitoring.

When using the WiFi Access Point method, the FusionSolar app cannot connect simultaneously. For production installations, always use the Smart Dongle so that both TapHome and FusionSolar can operate at the same time.

Smart Dongle setup
  1. Plug the Smart Dongle-WLAN-FE into the USB port on the bottom of the inverter
  2. Connect the Smart Dongle to the local WiFi network using the FusionSolar app (initial setup)
  3. The dongle will obtain an IP address from the router via DHCP
  4. Note the IP address from the router’s DHCP lease table

Assign a static IP address to the Smart Dongle in the router’s DHCP settings to prevent the address from changing after a power cycle.

Network connection

  • Protocol: Modbus TCP
  • Port: 502 (standard Modbus TCP port)
  • Default Slave ID: 1
  • Byte order: Big-endian (standard Modbus)

The Huawei Home Assistant integration uses port 503 by default (WiFi AP mode). When connecting through the Smart Dongle on a local network, TapHome uses the standard Modbus TCP port 502.

Configuration

When importing the template in TapHome, provide:

  • IP Address — the Smart Dongle’s IP on the local network (or the inverter’s WiFi AP IP, default: 192.168.200.1)
  • Slave ID — Modbus slave address (default: 1)

Device capabilities

The template exposes the following devices:

Active Power

An electricity meter device that reads the inverter’s current AC output. This is the primary power monitoring device.

  • Active power — current AC output power in kW (register H:32080, Int32)
  • Power factor — grid power factor (register H:32084, Int16)
  • Peak active power of day — highest power output today in kW (service attribute, H:32078)
  • Reactive power — current reactive power in kVar (service attribute, H:32082)
  • Rated power / Max active power / Max apparent power — nameplate ratings from registers H:30073, H:30075, H:30077

The device also provides three service actions for power control:

  • Reactive power compensation (PF) — set power factor from -1.0 to 1.0 (writes to H:40122)
  • Reactive power compensation (Q/S) — set reactive power ratio (writes to H:40123)
  • Active power derating (%) — limit output power as percentage 0–100% (writes to H:40125)
DC Input Power

Read-only sensor showing total DC power input from all PV strings combined, in kW (register H:32064, Int32, divided by 1000).

Service attributes show grid-side details: grid frequency (H:32085), phase voltages A/B/C (H:32069–32071), and phase currents A/B/C (H:32072–32076).

Battery

A container device for battery storage status (Huawei LUNA2000). Shows:

  • Running Status — Offline, Standby, Running, Fault, or Sleep mode (H:37762)
  • Current Day Charge — energy charged today in kWh (H:37784)
  • Current Day Discharge — energy discharged today in kWh (H:37786)

The Battery device only appears functional when a LUNA2000 battery is connected to the inverter. Without a battery, the running status will show “Offline”.

Total Energy

Cumulative energy generated since commissioning, in kWh (register H:32106, UInt32, divided by 100).

Daily Energy

Energy generated today, in kWh (register H:32114, divided by 100).

PV string currents (PV1–PV4)

Four separate sensor devices, one per PV string, reading DC current in amps (registers H:32017, H:32019, H:32021, H:32023). Each device includes a service attribute for the corresponding string voltage (H:32016, H:32018, H:32020, H:32022).

The number of active PV string devices depends on the inverter model and installation. Unused strings will read 0 A.

Inverter Status

A multi-value switch (read-only) showing the inverter’s current operating state from register H:32089:

ValueStateDescription
0Inverter StateInitial / unknown
1IdleDetecting ISO, irradiation, or grid
2StartingInverter starting up
3On GridNormal power generation
4ShutdownFault, command, OVGR, or DC switch off
5Grid Dispatchcos(Phi)-P or Q-U curve active
6IV ScanningPV string I-V curve scanning
7Spot-CheckGrid spot-check in progress
8InspectingInspection mode
9DC Input DetectionDetecting DC input

Service attributes provide detailed state information:

  • Full State — expanded status with all sub-states (e.g., “Shutdown: Fault”, “On-Grid: Power Limit”)
  • Grid Connection — standby, normal, derating due to power rationing or internal causes
  • Teleindication — IEC104 telesignaling state
  • Locking Status / PV Connection Status — from monitoring register H:32002
  • Startup time / Shutdown time — last startup and shutdown timestamps
Alarm monitoring

The module-level read script monitors alarm registers H:32008 and H:32009 (Bitfield16). Each bit maps to a specific fault or warning:

RegisterBitAlarm
H:320080High String Voltage
H:320081DC Arc Fault
H:320082String Reversed
H:320083Abnormal String (warning)
H:320087Power Grid Failure
H:320088–9Grid Under/Overvoltage
H:3200811–13Grid Frequency Faults
H:3200814–15Output Overcurrent / DC Component
H:320090Abnormal Leakage Current
H:320091–2Ground / Insulation Faults
H:320093–4High Temperature / Equipment Fault
H:320099Abnormal Energy Storage Device
H:3200910–11Active/Passive Islanding
Module-level diagnostics

The module exposes service attributes for device identification and diagnostics:

AttributeRegisterDescription
Model NameH:30000Inverter nameplate model
SNH:30015Serial number
PNH:30025Product code
Model IDH:30070Numeric model identifier
Number of StringsH:30071Connected PV strings
MPPT NumberH:30072MPP tracker count
System TimeH:40000Inverter local time
Time ZoneH:43006UTC offset
Inverter EfficiencyH:32086Conversion efficiency (%)
Cabinet TemperatureH:32087Internal temperature
Insulation ResistanceH:32088PV array insulation
DSP Data CollectionH:32002Data collection status

A Time Zone service action allows setting the inverter’s UTC offset (writes to H:43006).

Additional capabilities

The SUN2000 inverter exposes additional registers not yet implemented in the template. These include line-to-line voltages (A-B, B-C, C-A), fault code register, a faster-updating active power reading, total DC input energy counter, monthly and yearly energy counters, battery state of charge (SOC) and charge/discharge power, active grid power (import/export from power meter), grid exported and accumulated energy, and remote power on/shutdown commands. These can be added in a future template update.

Battery SOC (state of charge) is notably absent from the current template despite the Battery device existing. If you need SOC monitoring, it can be added as a custom Modbus device reading register H:37760 (UInt16, divide by 10, result in %).

Troubleshooting

No Modbus communication
  1. Verify the Smart Dongle is plugged into the inverter’s USB port and has power (LED active)
  2. Confirm the dongle’s IP address in the router’s DHCP lease table
  3. Ensure TapHome Core and the Smart Dongle are on the same network/subnet
  4. Check that no firewall is blocking port 502
  5. If using WiFi AP mode, connect to the inverter’s SSID (SUN2000-<serial>) and use IP 192.168.200.1
PV string values read zero

Unused PV string inputs will always read 0 A / 0 V. This is normal if the inverter model has fewer MPPT inputs than the template provides (e.g., a 3KTL model may only use PV1 and PV2).

Battery device shows “Offline”

The LUNA2000 battery registers are only populated when a compatible battery is physically connected to the inverter. Without a battery, Running Status will read “Offline” and charge/discharge counters will be zero.

Inverter status stuck on “Idle”

During nighttime or low-irradiation conditions, the inverter enters idle mode. This is normal — it will transition to “On Grid” once sufficient solar irradiation is detected.

Available devices

SUN2000 TCP Module

SUN2000 TCP

Read (module)
var a1 := MODBUSR(H, 32008, Uint16);
var a2 := MODBUSR(H, 32009, Uint16);
IF(GETBIT(a1,0) = 1, ADDERROR("High String Voltage", 2001));
IF(GETBIT(a1,1) = 1, ADDERROR(${dc_arc_fault}, 2002));
IF(GETBIT(a1,2) = 1, ADDERROR("String Reversed", 2011));
IF(GETBIT(a1,3) = 1, ADDWARNING("PV String Backfeed ", 2012));
IF(GETBIT(a1,4) = 1, ADDWARNING("Abnormal String", 2013));
IF(GETBIT(a1,5) = 1, ADDERROR(${afci_fault}, 2021));
IF(GETBIT(a1,6)= 1, ADDERROR(${short_circ_L-PE}, 2021));
IF(GETBIT(a1,7) = 1, ADDERROR(${power_grid_fail}, 2032));
IF(GETBIT(a1,8) = 1, ADDERROR(${grid_undervoltage}, 2033));
IF(GETBIT(a1,9) = 1, ADDERROR(${grid_overvoltage}, 2034));
IF(GETBIT(a1,10) = 1, ADDERROR(${unbalanced_grid_V}, 2035));
IF(GETBIT(a1,11) = 1, ADDERROR(${grid_overfrequency}, 2036));
IF(GETBIT(a1,12) = 1, ADDERROR(${grid_underfrequency}, 2037));
IF(GETBIT(a1,13) = 1, ADDERROR(${grid_freq_instability}, 2038));
IF(GETBIT(a1,14) = 1, ADDERROR(${output_overcurr}, 2039));
IF(GETBIT(a1,15) = 1, ADDERROR(${out_DC_large}, 2040));
IF(GETBIT(a2,0) = 1, ADDERROR(${abnorm_leak_curr}, 2051));
IF(GETBIT(a2,1) = 1, ADDERROR(${abnorm_gnd}, 2061));
IF(GETBIT(a2,2) = 1, ADDERROR(${low_insul_res}, 2062));
IF(GETBIT(a2,3) = 1, ADDERROR(${high_tempt}, 2063));
IF(GETBIT(a2,4) = 1, ADDERROR(${abnorm_equip}, 2064));
IF(GETBIT(a2,5) = 1, ADDERROR(${upgrade_fail}, 2065));
IF(GETBIT(a2,6) = 1, ADDWARNING(${license_expired}, 2066));
IF(GETBIT(a2,7) = 1, ADDERROR(${abnorm_monitor_unit}, 61440));
IF(GETBIT(a2,8) = 1, ADDERROR(${power_collect_fault}, 2067));
IF(GETBIT(a2,9) = 1, ADDERROR(${abnorm_energy_storage_dev}, 2068));
IF(GETBIT(a2,10) = 1, ADDERROR("Active islanding", 2070));
IF(GETBIT(a2,11) = 1, ADDERROR("Passive islanding", 2071));
IF(GETBIT(a2,12) = 1, ADDERROR(${trans_AC_overvoltage}, 2072));
IF(GETBIT(a2,15) = 1, ADDERROR(${abnorm_PV_module_config}, 2080));
Active Power Electricity Meter

Electricity meter with active power, reactive power, power factor, and peak power of day

Register: H:32080 Int32 Unit: kW numeric

Active Power

Read total consumption
MODBUSR(H, 32080, Int32,2)
Read demand
MODBUSR(H ,32084, Int16) ;
DC Input Power Variable Read-only

Total DC power from all PV strings combined (kW) with grid-side measurements — phase voltages, currents, and frequency

Register: H:32064 Int32 Unit: kW numeric
Service Attributes
Frequency
A Voltage
B Voltage
C Voltage
A Current
B Current
C Current

DC Input Power

Read
MODBUSR(H, 32064, Int32, 2)/1000
Service Attributes
Frequency
MODBUSR(H, 32085, Uint16)/100 + " Hz"
A Voltage
MODBUSR(H, 32069, Int16)/10 + " V"
B Voltage
MODBUSR(H, 32070, Int16)/10 + " V"
C Voltage
MODBUSR(H, 32071, Int16)/10 + " V"
A Current
MODBUSR(H, 32072, Int32, 2)/1000 + " A"
B Current
MODBUSR(H, 32074, Int32, 2)/1000 + " A"
C Current
MODBUSR(H, 32076, Int32, 2)/1000 + " A"
Battery Dimmer Read-only

Battery storage status and daily charge/discharge energy counters

Service Attributes
Running Status
Current Day Charge
Current Day Discharge

Battery

Read level
MODBUSR(H, 37760, Uint16)/1000
Service Attributes
Running Status
SWITCH(MODBUSR(H, 37762, Uint16),
0, "Offline", 
1, "Standby",
2, "Running",
3, "Fault",
4, "Sleep mode",
"Error"
);
Current Day Charge
MODBUSR(H, 37784, Uint32)/100 + " kWh";
Current Day Discharge
MODBUSR(H, 37786, Uint32)/100 + " kWh";
Total Energy Variable Read-only

Cumulative total energy generated since commissioning

Register: H:32106 UInt32 Unit: kWh numeric

Total Energy

Read
MODBUSR(H, 32106, UInt32, 2)/100
Daily Energy Variable Read-only
Register: H:32114 UInt32 Unit: kWh numeric

Daily Energy

Read
MODBUSR(H, 32114, Int32, 2)/100
PV1 Current Variable Read-only
Register: H:32017 Int16 Unit: A numeric
Service Attributes
PV1 Voltage

PV1 Current

Read
MODBUSR(H, 32017, Int16)/100
Service Attributes
PV1 Voltage
MODBUSR(H, 32016, Int16)/10 + "V"
PV2 Current Variable Read-only
Register: H:32019 Int16 Unit: A numeric
Service Attributes
PV2 Voltage

PV2 Current

Read
MODBUSR(H, 32019, Int16)/100
Service Attributes
PV2 Voltage
MODBUSR(H, 32018, Int16)/10
PV3 Current Variable Read-only
Register: H:32021 Int16 Unit: A numeric
Service Attributes
PV3 Voltage

PV3 Current

Read
MODBUSR(H,32021, Int16)/100
Service Attributes
PV3 Voltage
MODBUSR(H, 32020, Int16)/10 + "V"
PV4 Current Variable Read-only
Register: H:32023 Int16 Unit: A numeric
Service Attributes
PV4 Voltage

PV4 Current

Read
MODBUSR(H, 32023, Int16)/100
Service Attributes
PV4 Voltage
MODBUSR(H, 32022, Int16)/10
Inverter Status Multi-value Switch Read-only

Inverter operating state — Idle, Starting, On-Grid, Shutdown, Grid Dispatch, IV Scanning, Spot-Check, Inspecting, DC Input Detection

Register: H:32089 UInt16 numeric
Values / States: ${inverter_state} · ${idle} · ${starting} · On Grid · Shutdown · Grid Dispatch · IV scanning · Spot-Check · ${inspecting} · ${dc_input_det }

Inverter Status

Read switch state
var reg := MODBUSR(H, 32089, Uint16);
IF(reg = 0, 0,
IF(reg < 4 OR reg = 40960,1,
IF(reg = 256, 2, 
IF(reg < 515, 3, 
IF(reg < 775, 4,
IF(reg = 1025 OR reg = 1026, 5, 
IF(reg = 1280 OR reg = 1281, 7,
IF(reg = 1536, 8, 
IF(reg = 2048, 6,
IF(reg = 2304, 9
))))))))))
Service Attributes
Full State
var state := MODBUSR(H, 32089, Uint16);
SWITCH(state, 0, "Idle: Initializing",
 1,"Idle: Detecting ISO", 
 2,"Idle: Detecting irradiation", 
 3, "Idle: Grid Detecting", 
 256, "Starting", 
 512, "On-Grid", 
 513, "On-Grid: Power Limit", 
 514, "On-Grid: self-derating", 
 768, "Shutdown: Fault", 
 769, "Shutdown: Command", 
 770, "Shutdown: OVGR", 
 771,"Shutdown: Communication disconnected", 
 772, "Shutdown: Power Limit", 
 773, "Shutdown: Start manually", 
 774, "Shutdown: DC Switch OFF",
 1025, "Grid dispatch:cos(Phi)-P curve",
 1026, "Grid dispatch:Q-U curve",
40960, "Idle: No irradiation",
1280, "Spot-check",
1281, "Spot-checking",
1536, "Inspecting",
1792, "SFCI self-check",
2048, "IV scanning",
2304, "DC input detection",
"Unknown"
 );
Grid Connection
var reg := MODBUSR(H, 32000,Uint16);
IF(GETBIT(reg,0) = 1, "Standby",
IF(GETBIT(reg,2) = 1 , "Normal Grid Connection",
IF(GETBIT(reg,3) = 1, "Grid connection with derating due to power rationing",
IF(GETBIT(reg,4) = 1, "Grid connection with derating due to inverter internal causes", "Not Connected"
)
)
)
)
Teleindication
var reg := MODBUSR(H, 32000,Uint16);
IF(GETBIT(reg,0) = 1, "Standby",
IF(GETBIT(reg,5) = 1 , "Normal Stop",
IF(GETBIT(reg,6) = 1, "Stop due to faults",
IF(GETBIT(reg,7) = 1, "Stop due to power rationing",
IF(GETBIT(reg,8) = 1, "Shutdown",
IF(GETBIT(reg,9) = 1, "Spot check",
IF(GETBIT(reg,1) = 1, "Grid Connected",
"Unknown State")
)
)
)
)
)
)
Locking Status
IF(GETBIT(MODBUSR(H, 32002, Uint16),0) = 1, "Unlocked", "Locked");
PV Connection Status
IF(GETBIT(MODBUSR(H, 32002, Uint16),0) = 1, "Connected", "Disconnected");
Startup time
var reg := MODBUSR(H, 32091, Uint32, 2);
var min := FLOOR(MOD(reg, 3600)/60);
var ho := FLOOR(MOD(reg,86400)/3600);
var minutes := IF(min<10, "0" + min, min);
var hours := IF(ho<10, "0" + ho, ho);
hours + ":" + minutes;
Shutdown time
var reg := MODBUSR(H, 32093, Uint32, 2);
var min := FLOOR(MOD(reg, 3600)/60);
var ho := FLOOR(MOD(reg,86400)/3600);
var minutes := IF(min<10, "0" + min, min);
var hours := IF(ho<10, "0" + ho, ho);
hours + ":" + FLOOR(minutes);
Connection: Modbus TCP • Slave ID: $[SlaveId]
Possible improvements (17)
  • H:30035 Firmware Version — STR, 15 regs, read-only — useful for diagnostics
  • H:32010 Alarm 3 — Bitfield16, additional alarm bits not decoded in template readscript
  • H:32066 Line Voltage A-B — U16, V, /10, grid line-to-line voltage
  • H:32067 Line Voltage B-C — U16, V, /10, grid line-to-line voltage
  • H:32068 Line Voltage C-A — U16, V, /10, grid line-to-line voltage
  • H:32090 Fault Code — U16, specific fault code when device is in fault state
  • H:32095 Active Power (fast) — I32, kW, /1000, faster-updating active power reading
  • H:32108 Total DC Input Energy — U32, kWh, /100, cumulative DC energy input
  • H:32116 Monthly Energy — U32, kWh, /100, electricity generated this month
  • H:32118 Yearly Energy — U32, kWh, /100, electricity generated this year
  • H:37760 Battery SOC — U16, %, /10, battery state of charge — notably absent from template despite Battery device existing
  • H:37765 Battery Charge/Discharge Power — I32, W, positive=charging negative=discharging
  • H:37113 Active Grid Power — I32, W, power meter active power (grid import/export)
  • H:37119 Grid Exported Energy — I32, kWh, /100, energy exported to grid
  • H:37123 Grid Accumulated Energy — U32, kWh, /100, total energy from grid
  • H:40200 Power On — WO, E16, remote inverter power-on command
  • H:40201 Shutdown — WO, E16, remote inverter shutdown command

Sources