# Implementation DEYE Inverter - Approach

**URL:** <https://community.openems.io/t/implementation-deye-inverter-approach/2541>\
**Category:** English Forum\
**Created:** [April 4, 2024, 8:06am UTC](https://community.openems.io/t/implementation-deye-inverter-approach/2541 "2024-04-04T08:06:07Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![klinki](https://community.openems.io/letter_avatar_proxy/v4/letter/k/858c86/32.png) [@klinki](https://community.openems.io/u/klinki)\
**Post date:** [May 21, 2025, 12:31pm UTC](https://community.openems.io/t/implementation-deye-inverter-approach/2541/20 "2025-05-21T12:31:28Z")

</div>

I’ve been working for almost two weeks on a control solution for a Deye SUN-20 K.  
Discharging is now more or less under control:

Select external power-limit mode 142 → 2  
Enable Time-of-Use block 146 → 255 (all weekdays on)  
Time-slot start 148 → 0 (00 : 00)  
Time-slot end 149 → 2355 (23:55, single all-day slot)  
Battery discharge-current limit 109 value in A  
Power limit for the slot 154 value in W  
Minimum SoC for the slot 166 → 5 %  
Allow PV export (solar sell) 145 → 1

That setup basically works, but:

The Deye can’t cope with many Modbus writes.  
With my 1 s cycle time I have to insert a 3-cycle pause after every write or the command is ignored.

There is a noticeable gap between Battery power (reg 590) and the target power set in reg 154.  
The offset has to be adjusted dynamically.

Charging:  
Setting 166 (SoC target) to its maximum does make the inverter accept charge commands, but the battery rarely draws more than ≈ 500 W.  
There is obviously an internal control loop that I haven’t figured out yet.

You can force higher charge power by throttling the maximum export power with reg 143.  
The battery then absorbs more PV power — but if the battery can’t take the full PV output, the inverter starts clipping PV.

I couldn’t find a reliable way to detect when the PV is actually clipping, so I can’t regulate right at the clipping point.

The SUN-20 K is a very touchy piece of hardware – poorly documented and, in my opinion, partly buggy.  
Otherwise I can’t explain the behaviour shown in the attached image. There is actually no load (consumption) active

 ![IMG_0740](https://community.openems.io/uploads/default/original/2X/c/c73536690c59346b538bc3c39280ecb5de4abdab.jpeg)

---

_[View the full topic](https://community.openems.io/t/implementation-deye-inverter-approach/2541)._
