Huawei: make storage unit configurable
This commit is contained in:
parent
23553f7edb
commit
afae6eb9d1
2 changed files with 47 additions and 0 deletions
|
|
@ -7,6 +7,10 @@ params:
|
|||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: storageunit
|
||||
valuetype: number
|
||||
default: 1
|
||||
advanced: true
|
||||
- name: modbus
|
||||
choice: ["tcpip"]
|
||||
render: |
|
||||
|
|
@ -82,7 +86,12 @@ render: |
|
|||
timeout: 15s
|
||||
connectdelay: 1s
|
||||
register:
|
||||
{{- if eq .storageunit "1" }}
|
||||
address: 37001
|
||||
{{- end }}
|
||||
{{- if eq .storageunit "2" }}
|
||||
address: 37743
|
||||
{{- end }}
|
||||
type: holding
|
||||
decode: int32nan
|
||||
scale: -1
|
||||
|
|
@ -92,7 +101,12 @@ render: |
|
|||
model: huawei
|
||||
timeout: 15s
|
||||
register:
|
||||
{{- if eq .storageunit "1" }}
|
||||
address: 37004
|
||||
{{- end }}
|
||||
{{- if eq .storageunit "2" }}
|
||||
address: 37738
|
||||
{{- end }}
|
||||
type: holding
|
||||
decode: uint16nan
|
||||
scale: 0.1
|
||||
|
|
|
|||
|
|
@ -8,6 +8,17 @@ render:
|
|||
template: huawei-dongle-powersensor
|
||||
usage: grid
|
||||
|
||||
# Modbus TCP
|
||||
modbus: tcpip
|
||||
id: 1
|
||||
host: 192.0.2.2 # Hostname
|
||||
port: 502 # Port
|
||||
advanced: |
|
||||
type: template
|
||||
template: huawei-dongle-powersensor
|
||||
usage: grid
|
||||
storageunit: 1 # Optional
|
||||
|
||||
# Modbus TCP
|
||||
modbus: tcpip
|
||||
id: 1
|
||||
|
|
@ -19,6 +30,17 @@ render:
|
|||
template: huawei-dongle-powersensor
|
||||
usage: pv
|
||||
|
||||
# Modbus TCP
|
||||
modbus: tcpip
|
||||
id: 1
|
||||
host: 192.0.2.2 # Hostname
|
||||
port: 502 # Port
|
||||
advanced: |
|
||||
type: template
|
||||
template: huawei-dongle-powersensor
|
||||
usage: pv
|
||||
storageunit: 1 # Optional
|
||||
|
||||
# Modbus TCP
|
||||
modbus: tcpip
|
||||
id: 1
|
||||
|
|
@ -30,6 +52,17 @@ render:
|
|||
template: huawei-dongle-powersensor
|
||||
usage: battery
|
||||
|
||||
# Modbus TCP
|
||||
modbus: tcpip
|
||||
id: 1
|
||||
host: 192.0.2.2 # Hostname
|
||||
port: 502 # Port
|
||||
advanced: |
|
||||
type: template
|
||||
template: huawei-dongle-powersensor
|
||||
usage: battery
|
||||
storageunit: 1 # Optional
|
||||
|
||||
# Modbus TCP
|
||||
modbus: tcpip
|
||||
id: 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue