Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Huawei EMMA template #16665

Closed
Closed
Changes from all commits
Commits
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
126 changes: 126 additions & 0 deletions templates/definition/meter/huawei-emma.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
template: huawei-emma
products:
- brand: Huawei
description:
generic: EMMA
params:
- name: usage
choice: ["grid", "pv", "battery"]
allinone: true
- name: storageunit
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wozu brauchts das?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wird dies für das Battery Control gebraucht? Dann würde ich es noch drin lassen und mich danach and die Steuerung setzen.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wenn es nicht benutzt wird bitte raus

type: number
default: 1
advanced: true
- name: modbus
choice: ["tcpip"]
- name: timeout
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Raus

default: 15s
- name: capacity
advanced: true
render: |
type: custom
{{- if eq .usage "grid" }}
power:
source: modbus
id: 0
uri: {{ .host }}:{{ .port }}
timeout: {{ .timeout }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dito- raus falls nicht notwendig

connectdelay: 1s
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wie meinst du das? Bzgl. des Templates oder speziefischer?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Das Delay?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ich habe das Smartlogger Template als Basis genommen und die Modbus Adressen angepasst. Weiter habe ich nichts hinterfragt. Ich kanns Testen ob es auch ohne das Delay funktioniert.
Was bewirkt dieses genau?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ein unnützes Delay, bitte raus damit.

register:
address: 31657 # Active power of built-in electric energy sensor
type: holding
decode: int32
scale: 1
energy:
source: modbus
id: 0
uri: {{ .host }}:{{ .port }}
timeout: {{ .timeout }}
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 }}
timeout: {{ .timeout }}
register:
address: 31651 # Huawei phase A grid current
type: holding
decode: int32
scale: 0.1
- source: modbus
id: 0
uri: {{ .host }}:{{ .port }}
timeout: {{ .timeout }}
register:
address: 31653 # Huawei phase B grid current
type: holding
decode: int32
scale: 0.1
- source: modbus
id: 0
uri: {{ .host }}:{{ .port }}
timeout: {{ .timeout }}
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
scale: 1
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 }}
timeout: {{ .timeout }}
connectdelay: 1s
register:
address: 30360
type: holding
decode: int32
scale: -1
energy:
source: modbus
id: 0
uri: {{ .host }}:{{ .port }}
timeout: {{ .timeout }}
register:
address: 30312 # [Energy storage unit 1] Total discharge
type: holding
decode: uint32
scale: 0.01
soc:
source: modbus
id: 0
uri: {{ .host }}:{{ .port }}
timeout: {{ .timeout }}
register:
address: 30368
type: holding
decode: uint16
scale: .01
capacity: {{ .capacity }} # kWh
{{- end }}