The Deye SUN-xK-SG04LP3-EU is a three-phase (230 V / 400 V) low-voltage hybrid inverter with a battery input and two MPPT inputs for the PV array; the manufacturer’s manual covers the SUN-5K, 6K, 8K, 10K and 12K-SG04LP3-EU models. TapHome talks to the inverter over Modbus RTU on RS-485 (9600 baud, 8N1), using the RJ45 port labelled Modbus on the inverter’s communication board.
The template reads PV production, load, grid import and export, battery charge and discharge and battery state of charge, and provides the seven devices of the TapHome energy flow. It also reads battery, grid, PV string and inverter output values, decodes the inverter’s running state, warnings and fault codes into TapHome notifications, and writes the energy management mode, grid charging, battery current limits, generator port use and the six-window Time of Use (TOU) schedule.
Hardware connection
Only qualified personnel may install and wire the inverter. The communication ports sit inside the wiring compartment behind the metal cover; the AC and DC circuits must be disconnected separately before work starts, as described in the manufacturer’s manual.
Communication ports
The RJ45 communication ports are on the right side of the communication board: Parallel_A, Parallel_B, Meter-485, Modbus, BMS and DRM.

| Port | Role according to the manufacturer |
|---|---|
| Parallel_A, Parallel_B | Parallel communication between inverters (CAN interface) |
| Meter-485 | Communication with the external energy meter (for example CHNT DTSU666 or Eastron SDM630) |
| Modbus | Labelled “Reserved”; the pinout appendix describes it as the port for remote monitoring |
| BMS | Battery communication (CAN / RS-485) |
| DRM | External digital input signals |
| WIFI/RS232 (separate 9-pin port) | Wi-Fi datalogger |
TapHome connects to the Modbus port. Do not use the Meter-485 port (it serves the energy meter) or the BMS port (it serves the battery).
The manufacturer marks the Modbus port as “Reserved” and notes that for some hardware versions, this port is useless. Before running the cable, check that the Modbus port on the specific inverter answers; if it does not, the template cannot communicate through it.
Modbus port pinout

| RJ45 pin (Modbus port) | Signal | TapHome RS-485 bus |
|---|---|---|
| 1, 8 | 485_B | B |
| 2, 7 | 485_A | A |
| 3, 6 | GND_485 | GND |
| 4, 5 | Not used | — |
Crimp an RJ45 plug on a twisted-pair cable and connect 485_A to the A terminal and 485_B to the B terminal of the TapHome RS-485 bus. A common GND connection (GND_485) is recommended for longer cable runs.
Only one Modbus master may poll the inverter on the RS-485 line connected to the Modbus port. If another Modbus monitoring device is wired to the same line, disconnect it or use an RS-485 splitter or hub. The manufacturer’s Wi-Fi datalogger uses its own WIFI/RS232 port.
Configuration
Setting the Modbus address
The Modbus address is the Modbus SN field on the inverter display:
- On the main screen, press the System Setup icon.
- Open Advanced Function and go to the page with Parallel, Modbus SN and EX_Meter For CT (Paral. Set3).
- Set Modbus SN and confirm with the tick button.
The template’s import parameter Modbus Slave ID (default 1) must match the Modbus SN. The manual’s screenshot of a single inverter shows 00; set a non-zero value, because Modbus address 0 is reserved for broadcast. In a parallel system the manual gives every inverter its own Modbus SN (01, 02, 03), so each inverter needs its own template import with its own Slave ID.
Communication parameters
| Parameter | Value |
|---|---|
| Baud rate | 9600 |
| Data bits | 8 |
| Parity | None |
| Stop bits | 1 |
| Function codes | 0x03 (read), 0x10 (write multiple registers) |
| Modbus Slave ID | 1 (must match Modbus SN) |
Write operations use function code 0x10; the inverter does not support function code 0x06 (write single register).
In TapHome, add a Modbus RTU interface with these parameters on the RS-485 bus the inverter is wired to and import the template with the matching Modbus Slave ID.
Never write to registers 80, 81, 91 and 92 (inverter on/off, factory reset, EEPROM) or to the battery type and protection registers (98–103, 111). The template exposes only user-configurable registers.
Device capabilities
Energy flow
The template provides the seven devices TapHome uses for a complete solar energy flow:
- PV Production — sum of the PV input powers (registers 672–675) in kW, total energy from the 32-bit counter at registers 534–535.
- Load — total load power (register 653) and total consumption (registers 527–528).
- From Grid and To Grid — the signed grid power (register 625) is split: positive values feed From Grid, negative values (as positive numbers) feed To Grid. Total energy from registers 522–523 (from grid) and 524–525 (to grid).
- From Battery and To Battery — the signed battery power (register 590) is split the same way. Total energy from registers 518–519 (discharge) and 516–517 (charge).
- Battery (SOC) — battery state of charge, register 588, 0–100 %.
For the Energy Manager smart rule, select the meter Grid - power balance. It reports the signed grid power (register 625): positive when importing from the grid, negative when exporting surplus. From Grid and To Grid are always non-negative and must not be used as the Energy Manager meter.
Battery
- Battery - temperature — register 586, formula
(raw − 1000) / 10. - Battery - voltage — register 587; battery current (register 591) and battery power (register 590) as service attributes.
- Battery - charge today — register 514; energy discharged today (register 515) as a service attribute.
Grid
- Grid - power balance — signed total grid power (register 625); grid power on L1, L2 and L3 (registers 622–624) and energy bought and sold today (registers 520 and 521) as service attributes.
- Grid - voltage L1 — register 598; grid voltage L2 and L3 (registers 599 and 600) and grid frequency (register 609) as service attributes.
PV and load
- PV1 - voltage and PV2 - voltage — registers 676 and 678; the string current (registers 677 and 679) and string power (registers 672 and 673) as service attributes.
- PV - production today — register 529.
- Load - consumption today — register 526; load power on L1, L2 and L3 (registers 650–652) as service attributes.
Inverter
- Inverter - output power total — register 636; output power per phase (registers 633–635), output voltage per phase (registers 627–629) and output frequency (register 638) as service attributes.
- Backup - output power — register 643.
- Generator port - power — register 667.
- DC transformer temperature (register 540) and Heat sink temperature (register 541).
State, warnings and faults
The module shows the Running state (register 500: Standby, Self-check, Normal, Alarm, Fault, Activating), the device type (register 0) and the rated power (registers 20–21) as service attributes. Running state Alarm raises a warning and Fault raises an error.
The warning words (registers 553–554) are decoded into named warnings: fan warning, wrong grid phase sequence, meter communication failure, lithium battery lost and parallel communication quality. The fault words (registers 555–558) are decoded into named errors for fault codes F07, F10, F13, F18, F20, F22–F24, F26, F29, F35, F41, F42, F46–F49, F56, F58 and F62–F64; the meaning of each code and the manufacturer’s remedy are in the fault table of the inverter manual.
Operating settings
- Settings - energy management mode — Selling first, Zero export to load or Zero export to CT (register 142). According to the manual, Zero export to CT needs the external current transformers on the CT-L1, CT-L2 and CT-L3 inputs.
- Settings - solar sell — allows surplus PV energy to be sold to the grid in the zero export modes (register 145).
- Settings - max sell power (register 143) and Settings - max solar sell power (register 340).
- Settings - grid charging — grid charging of the battery on or off (register 130) and Settings - grid charge current (register 128).
- Settings - max battery charge current (register 108) and Settings - max battery discharge current (register 109). The manual gives the allowed range per model: 0–120 A (5 kW), 0–150 A (6 kW), 0–190 A (8 kW), 0–210 A (10 kW) and 0–240 A (12 kW).
- Settings - generator port use — Generator input, Smart load output or Micro-inverter input (register 133).
Time of Use schedule
The inverter’s Time of Use schedule has six windows. The template exposes for each window W1–W6:
- TOU W1–W6 - start time — HHMM value (for example 1430 = 14:30), registers 148–153.
- TOU W1–W6 - target SoC — battery target state of charge as a 0–100 % slider, registers 166–171.
- TOU W1–W6 - grid charging — grid charging during the window on or off; the template changes only bit 0 of registers 172–177 and keeps the other bits.
TOU - enable switches the whole schedule on or off through bit 0 of register 146 and keeps the day-of-week selection (bits 1–7).
According to the manual, the inverter interprets the battery value of each window as a voltage or as a state of charge depending on the Use Batt V / Use Batt % choice in the Battery Setting menu. The target SoC devices are percentages, so the inverter should be set to Use Batt %. When the grid is present, the battery discharges only if Time of Use is ticked.
Troubleshooting
No data / communication failure
- Check that the cable is in the Modbus port, not in Meter-485 or BMS.
- Check the A/B polarity (pins 2/7 = 485_A, pins 1/8 = 485_B) and the GND connection.
- Check that the template’s Modbus Slave ID matches the Modbus SN in Advanced Function and that the Modbus SN is not 0.
- Check that no other Modbus master is active on the same RS-485 line.
- The manufacturer states that on some hardware versions the Modbus port is useless. If wiring and address are correct and the inverter still does not answer, the port on that hardware version may not be usable.
Values look 1000× off or nonsensical
Confirm that the inverter is a low-voltage (LV) SG04LP3 or SG05LP3 variant. The high-voltage SG01HP3 family uses different scaling for battery voltage, battery power and PV input power; the template targets LV scaling only.
Battery (SOC) stuck at 0 %
Register 588 returns 0 during some self-check states. Wait until the Running state reaches Normal; the state of charge updates within the next poll interval.
Time of Use settings not applied
Make sure TOU - enable is on and that at least one window has a non-zero start time. Check that the inverter is set to Use Batt % if the target SoC values seem to be ignored.
Meter communication failure warning
The warning is reported by the inverter itself (warning word, register 553) and does not mean that the TapHome connection failed. The energy meter is connected to the Meter-485 port; check its wiring and, when an external meter is used with EX_Meter For CT, the Meter Select setting (CHNT or Eastron) in Advanced Function.