Plexlog: fix grid power (BC) (#21061)
This commit is contained in:
parent
629da507a4
commit
bfd6fcf790
1 changed files with 22 additions and 11 deletions
|
|
@ -12,9 +12,16 @@ params:
|
|||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["tcpip"]
|
||||
id: 1
|
||||
port: 503
|
||||
- name: capacity
|
||||
advanced: true
|
||||
- name: host
|
||||
deprecated: true
|
||||
- name: port
|
||||
default: 503
|
||||
deprecated: true
|
||||
render: |
|
||||
type: custom
|
||||
{{- if eq .usage "grid" }}
|
||||
|
|
@ -22,8 +29,7 @@ render: |
|
|||
source: calc
|
||||
add:
|
||||
- source: modbus
|
||||
uri: {{ .host }}:{{ .port }}
|
||||
id: 1
|
||||
{{- include "modbus" . | indent 4 }}
|
||||
register:
|
||||
address: 0 # Erzeugung
|
||||
type: input
|
||||
|
|
@ -31,19 +37,25 @@ render: |
|
|||
scale: -1
|
||||
timeout: 30s
|
||||
- source: modbus
|
||||
uri: {{ .host }}:{{ .port }}
|
||||
id: 1
|
||||
{{- include "modbus" . | indent 4 }}
|
||||
register:
|
||||
address: 2 # Verbrauch
|
||||
type: input
|
||||
decode: int32
|
||||
timeout: 30s
|
||||
- source: modbus
|
||||
{{- include "modbus" . | indent 4 }}
|
||||
register:
|
||||
address: 37 # Batterie Leistung
|
||||
type: input
|
||||
decode: int32
|
||||
scale: -1
|
||||
timeout: 30s
|
||||
{{- end }}
|
||||
{{- if eq .usage "pv" }}
|
||||
power:
|
||||
source: modbus
|
||||
uri: {{ .host }}:{{ .port }}
|
||||
id: 1
|
||||
{{- include "modbus" . | indent 2 }}
|
||||
register:
|
||||
address: 0 # Erzeugung
|
||||
type: input
|
||||
|
|
@ -53,8 +65,7 @@ render: |
|
|||
{{- if eq .usage "battery" }}
|
||||
power:
|
||||
source: modbus
|
||||
uri: {{ .host }}:{{ .port }}
|
||||
id: 1
|
||||
{{- include "modbus" . | indent 2 }}
|
||||
register:
|
||||
address: 37 # Batterie Leistung
|
||||
type: input
|
||||
|
|
@ -62,11 +73,11 @@ render: |
|
|||
timeout: 30s
|
||||
soc:
|
||||
source: modbus
|
||||
uri: {{ .host }}:{{ .port }}
|
||||
id: 1
|
||||
{{- include "modbus" . | indent 2 }}
|
||||
register:
|
||||
address: 36 # Batterie SOC
|
||||
type: input
|
||||
decode: uint16
|
||||
timeout: 30s
|
||||
capacity: {{ .capacity }} # kWh
|
||||
{{- end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue