Skip to content
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
92fd1ba
Huawei: add nocharge/holdcharge
CiNcH83 Jun 7, 2026
027e72e
naming
CiNcH83 Jun 7, 2026
6f7f639
Merge branch 'master' into huawei_nocharge
CiNcH83 Jun 7, 2026
7ff6897
also set max. charge power in force-charge mode
CiNcH83 Jun 7, 2026
869bdd9
Merge branch 'master' into huawei_nocharge
CiNcH83 Jun 18, 2026
3ca64e0
remove forceaccharging block in holdcharge
CiNcH83 Jun 18, 2026
6d99426
clamp all charge/discharge register writes
CiNcH83 Jun 18, 2026
a9d8a91
Merge branch 'master' into huawei_nocharge
CiNcH83 Jun 18, 2026
1d5a14e
Merge branch 'master' into huawei_nocharge
CiNcH83 Jun 18, 2026
2005d1c
Merge branch 'master' into huawei_nocharge
CiNcH83 Jun 20, 2026
e94672f
Merge branch 'master' into huawei_nocharge
CiNcH83 Jun 22, 2026
2de61ae
Merge branch 'master' into huawei_nocharge
CiNcH83 Jun 22, 2026
b90437c
Merge branch 'master' into huawei_nocharge
CiNcH83 Jun 29, 2026
af7728d
Update templates/definition/meter/huawei-sun2000-hybrid.yaml
CiNcH83 Jul 4, 2026
49210b8
implement review
CiNcH83 Jul 4, 2026
0a388b5
Huawei Sun2000 hybrid: explain why only charge needs periodic watchdo…
andig Jul 4, 2026
d32e9e8
add comment regarding charge watchdog
CiNcH83 Jul 4, 2026
535ef22
Merge branch 'master' into huawei_nocharge
CiNcH83 Jul 6, 2026
756a14d
Huawei: fix watchdog re-asserting 47100 after mode switch clears it
andig Jul 6, 2026
1872726
Huawei: simplify watchdog switch using default fallback
andig Jul 6, 2026
a8ed20a
Merge branch 'master' into huawei_nocharge
CiNcH83 Jul 7, 2026
2acff85
Merge branch 'master' into huawei_nocharge
CiNcH83 Jul 10, 2026
856158d
Merge branch 'huawei_nocharge' of github.com:CiNcH83/evcc into huawei…
CiNcH83 Jul 10, 2026
36567e4
make stopWdt synchronous
CiNcH83 Jul 10, 2026
87fd6d0
fix race-condition - 47100 is now entirely handled by the watchdog
CiNcH83 Jul 10, 2026
df18297
fix watchdog switch/case
CiNcH83 Jul 10, 2026
b26caf0
Merge remote-tracking branch 'remotes/upstream/master' into huawei_no…
CiNcH83 Jul 10, 2026
c3720a1
revert synchronous stopWdt: redundant after 47100 watchdog consolidation
andig Jul 19, 2026
d51c5d4
Merge branch 'master' into huawei_nocharge
CiNcH83 Jul 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
178 changes: 149 additions & 29 deletions templates/definition/meter/huawei-sun2000-hybrid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -395,15 +395,37 @@ render: |
set:
source: sequence
set:
- source: const
value: 0 # stop
set:
source: modbus
{{- include "modbus" . | indent 16 }}
register:
address: 47100 # Forcible charge/discharge
type: writesingle
encoding: uint16
# register 47075 is range-checked: a maxchargepower above the
Comment thread
andig marked this conversation as resolved.
# inverter rated max (37046) is rejected, so clamp before writing
- source: go
in:
- name: rated
type: int
config:
source: cached
cache: 1h # rated max is static
value:
source: modbus
{{- include "modbus" . | indent 22 }}
register:
address: 37046 # [ESS] Maximum charge power (RO)
type: holding
decode: uint32
out:
- name: power
type: int
config:
source: modbus
{{- include "modbus" . | indent 20 }}
register:
address: 47075 # Max. Charge Power
type: writemultiple
encoding: uint32
script: |
limit := {{ .maxchargepower }}
out := rated
if limit < rated { out = limit }
Comment thread
andig marked this conversation as resolved.
out
# register 47077 is range-checked: a maxdischargepower above the
# inverter rated max (37048) is rejected, so clamp before writing
- source: go
Expand Down Expand Up @@ -439,15 +461,37 @@ render: |
set:
source: sequence
set:
- source: const
value: 0 # stop
set:
source: modbus
{{- include "modbus" . | indent 16 }}
register:
address: 47100 # Forcible charge/discharge
type: writesingle
encoding: uint16
# register 47075 is range-checked: a maxchargepower above the
# inverter rated max (37046) is rejected, so clamp before writing
- source: go
in:
- name: rated
type: int
config:
source: cached
cache: 1h # rated max is static
value:
source: modbus
{{- include "modbus" . | indent 22 }}
register:
address: 37046 # [ESS] Maximum charge power (RO)
type: holding
decode: uint32
out:
- name: power
type: int
config:
source: modbus
{{- include "modbus" . | indent 20 }}
register:
address: 47075 # Max. Charge Power
type: writemultiple
encoding: uint32
script: |
limit := {{ .maxchargepower }}
out := rated
if limit < rated { out = limit }
out
- source: const
value: 0 # W Discharge Power
set:
Expand All @@ -461,6 +505,37 @@ render: |
set:
source: sequence
set:
# register 47075 is range-checked: a maxchargepower above the
# inverter rated max (37046) is rejected, so clamp before writing
- source: go
in:
- name: rated
type: int
config:
source: cached
cache: 1h # rated max is static
value:
source: modbus
{{- include "modbus" . | indent 22 }}
register:
address: 37046 # [ESS] Maximum charge power (RO)
type: holding
decode: uint32
out:
- name: power
type: int
config:
source: modbus
{{- include "modbus" . | indent 20 }}
register:
address: 47075 # Max. Charge Power
type: writemultiple
encoding: uint32
script: |
limit := {{ .maxchargepower }}
out := rated
if limit < rated { out = limit }
out
# clamp maxchargepower to the inverter rated max (37046) for parity
# with discharge, avoiding a stale out-of-range value
- source: go
Expand Down Expand Up @@ -510,21 +585,57 @@ render: |
address: 47246 # Forcible charge/discharge setting mode
type: writesingle
encoding: uint16
- case: 4 # holdcharge
set:
source: sequence
set:
- source: const
value: 0 # W
set:
source: modbus
{{- include "modbus" . | indent 16 }}
register:
address: 47075 # Max. Charge Power
type: writemultiple
encoding: uint32
# register 47077 is range-checked: a maxdischargepower above the
# inverter rated max (37048) is rejected, so clamp before writing
- source: go
in:
- name: rated
type: int
config:
source: cached
cache: 1h # rated max is static
value:
source: modbus
{{- include "modbus" . | indent 22 }}
register:
address: 37048 # [ESS] Maximum discharge power (RO)
type: holding
decode: uint32
out:
- name: power
type: int
config:
source: modbus
{{- include "modbus" . | indent 20 }}
register:
address: 47077 # Max. Discharge Power
type: writemultiple
encoding: uint32
script: |
limit := {{ .maxdischargepower }}
out := rated
if limit < rated { out = limit }
out
# single watchdog wraps the ENTIRE 47100 lifecycle, not just case 3
- source: watchdog
timeout: 30s
reset: 1
reset: [1, 2, 4]
set:
source: switch
switch:
- case: 1 # normal
set:
source: sleep
duration: 0s
- case: 2 # hold
set:
source: sleep
duration: 0s
# only charging requires repeated requests
- case: 3 # charge
set:
source: const
Expand All @@ -536,6 +647,15 @@ render: |
address: 47100 # Forcible charge/discharge
type: writesingle
encoding: uint16

default:
source: const
value: 0 # stop
set:
source: modbus
{{- include "modbus" . | indent 12 }}
register:
address: 47100 # Forcible charge/discharge
type: writesingle
encoding: uint16
{{- include "battery-params" . }}
{{- end }}
Loading