Skip to content

Commit

Permalink
Add Huawei EMMA (evcc-io#17338)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mungg1818 authored Nov 20, 2024
1 parent 5bfa661 commit 0dad8b8
Showing 1 changed file with 108 additions and 0 deletions.
108 changes: 108 additions & 0 deletions templates/definition/meter/huawei-emma.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
template: huawei-emma
products:
- brand: Huawei
description:
generic: EMMA
params:
- name: usage
choice: ["grid", "pv", "battery"]
allinone: true
- name: modbus
choice: ["tcpip"]
- name: capacity
advanced: true
render: |
type: custom
{{- if eq .usage "grid" }}
power:
source: modbus
id: 0
uri: {{ .host }}:{{ .port }}
register:
address: 31657 # Active power of built-in electric energy sensor
type: holding
decode: int32
energy:
source: modbus
id: 0
uri: {{ .host }}:{{ .port }}
register:
address: 31679 # Total negative active energy of built-in electric energy sensor
type: holding
decode: int64
scale: 0.01
currents:
- source: modbus
id: 0
uri: {{ .host }}:{{ .port }}
register:
address: 31651 # Huawei phase A grid current
type: holding
decode: int32
scale: 0.1
- source: modbus
id: 0
uri: {{ .host }}:{{ .port }}
register:
address: 31653 # Huawei phase B grid current
type: holding
decode: int32
scale: 0.1
- source: modbus
id: 0
uri: {{ .host }}:{{ .port }}
register:
address: 31655 # Huawei phase C grid current
type: holding
decode: int32
scale: 0.1
{{- end }}
{{- if eq .usage "pv" }}
power:
source: modbus
id: 0
uri: {{ .host }}:{{ .port }}
register:
address: 30354 # Active power
type: holding
decode: int32
energy:
source: modbus
id: 0
uri: {{ .host }}:{{ .port }}
register:
address: 30344 # E-Total
type: holding
decode: uint32
scale: 0.1
{{- end }}
{{- if eq .usage "battery" }}
power:
source: modbus
id: 0
uri: {{ .host }}:{{ .port }}
register:
address: 30360
type: holding
decode: int32nan
scale: -1
energy:
source: modbus
id: 0
uri: {{ .host }}:{{ .port }}
register:
address: 30312 # Total discharge
type: holding
decode: uint32nan
scale: 0.01
soc:
source: modbus
id: 0
uri: {{ .host }}:{{ .port }}
register:
address: 30368
type: holding
decode: uint16nan
scale: 0.01
capacity: {{ .capacity }} # kWh
{{- end }}

0 comments on commit 0dad8b8

Please sign in to comment.