diff --git a/templates/definition/meter/plexlog.yaml b/templates/definition/meter/plexlog.yaml new file mode 100644 index 000000000..d10e336b5 --- /dev/null +++ b/templates/definition/meter/plexlog.yaml @@ -0,0 +1,72 @@ +template: plexlog +products: + - description: + generic: Plexlog +requirements: + description: + de: | + Die Werte werden ca. alle 15 Sekunden aktualisiert, deshalb sollte das evcc `interval` nicht kleiner als 30 Sekunden gewählt werden. + en: | + The values are updated approximately every 15 seconds, hence the evcc `interval` should not be less than 30 seconds. +params: + - name: usage + choice: ["grid", "pv", "battery"] + allinone: true + - name: host + - name: port + default: 503 +render: | + type: custom + {{- if eq .usage "grid" }} + power: + source: calc + add: + - source: modbus + uri: {{ .host }}:{{ .port }} + id: 1 + register: + address: 0 # Erzeugung + type: input + decode: int32 + scale: -1 + timeout: 30s + - source: modbus + uri: {{ .host }}:{{ .port }} + id: 1 + register: + address: 2 # Verbrauch + type: input + decode: int32 + timeout: 30s + {{- end }} + {{- if eq .usage "pv" }} + power: + source: modbus + uri: {{ .host }}:{{ .port }} + id: 1 + register: + address: 0 # Erzeugung + type: input + decode: int32 + timeout: 30s + {{- end }} + {{- if eq .usage "battery" }} + power: + source: modbus + uri: {{ .host }}:{{ .port }} + id: 1 + register: + address: 37 # Batterie Leistung + type: input + decode: int32 + timeout: 30s + soc: + source: modbus + uri: {{ .host }}:{{ .port }} + id: 1 + register: + address: 36 # Batterie SOC + type: input + decode: uint16 + timeout: 30s + {{- end }}