SolarEdge: fix modbus config and add rs485 (#4990)

This commit is contained in:
premultiply 2022-10-31 11:37:40 +01:00 • committed by GitHub
parent 6bd99c0be7
commit e85bbfafcf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 106 additions and 30 deletions

View file

@ -5,29 +5,26 @@ products:
generic: Hybrid Inverter
requirements:
description:
de: Nur ein System kann auf den Wechselrichter zugreifen!
de: Nur ein System kann und darf auf den Wechselrichter zugreifen!
en: Only one system may access the inverter!
params:
- name: usage
choice: ["grid", "pv", "battery"]
allinone: true
- name: host
- name: port
default: 502
help:
en: Port 502 (SetApp) or 1502 (LCD)
de: Port 502 (SetApp) oder 1502 (LCD)
- name: modbus
choice: ["tcpip", "rs485"]
id: 1
port: 1502
- name: timeout
render: |
type: custom
power:
{{- if eq .usage "grid" }}
source: modbus
uri: {{ .host }}:{{ .port }} # Port 502 (SetApp) or 1502 (LCD)
id: 1
subdevice: 1 # Metering device
{{- include "modbus" . | indent 2 }}
timeout: {{ .timeout }}
model: sunspec
subdevice: 1 # Metering device
value: 203:W
scale: -1
{{- end }}
@ -35,14 +32,12 @@ render: |
source: calc
add:
- source: modbus
uri: {{ .host }}:{{ .port }} # Port 502 (SetApp) or 1502 (LCD)
id: 1
{{- include "modbus" . | indent 4 }}
timeout: {{ .timeout }}
model: sunspec
value: DCPower
- source: modbus
uri: {{ .host }}:{{ .port }} # Port 502 (SetApp) or 1502 (LCD)
id: 1
{{- include "modbus" . | indent 4 }}
timeout: {{ .timeout }}
register:
address: 62836 # Battery 1 Instantaneous Power
@ -51,9 +46,8 @@ render: |
{{- end }}
{{- if eq .usage "battery" }}
source: modbus
{{- include "modbus" . | indent 2 }}
timeout: {{ .timeout }}
uri: {{ .host }}:{{ .port }} # Port 502 (SetApp) or 1502 (LCD)
id: 1
register:
address: 62836 # Battery 1 Instantaneous Power
type: holding
@ -61,9 +55,8 @@ render: |
scale: -1
soc:
source: modbus
{{- include "modbus" . | indent 2 }}
timeout: {{ .timeout }}
uri: {{ .host }}:{{ .port }} # Port 502 (SetApp) or 1502 (LCD)
id: 1
register:
address: 62852 # Battery 1 State of Energy (SOE)
type: holding

View file

@ -4,12 +4,16 @@ products:
description:
de: Wechselrichter
en: Inverter
requirements:
description:
de: Nur ein System kann und darf auf den Wechselrichter zugreifen!
en: Only one system may access the inverter!
params:
- name: usage
choice: ["grid", "pv"]
allinone: true
- name: modbus
choice: ["tcpip"]
choice: ["tcpip", "rs485"]
id: 1
port: 1502
- name: timeout
@ -20,8 +24,8 @@ render: |
{{- include "modbus" . | indent 2 }}
timeout: {{ .timeout }}
{{- if eq .usage "grid" }}
subdevice: 1
model: sunspec
subdevice: 1
value: 203:W # sunspec 3-phase meter power reading
scale: -1
{{- else }}

View file

@ -2,29 +2,80 @@ product:
brand: SolarEdge
description: Hybrid Inverter
description: |
Nur ein System kann auf den Wechselrichter zugreifen!
Nur ein System kann und darf auf den Wechselrichter zugreifen!
render:
- usage: grid
default: |
type: template
template: solaredge-hybrid
usage: grid
host: 192.0.2.2 # IP-Adresse oder Hostname
port: 502 # Port 502 (SetApp) oder 1502 (LCD) # Optional
usage: grid
# RS485 via adapter (Modbus RTU)
modbus: rs485serial
id: 1
device: /dev/ttyUSB0 # USB-RS485 Adapter Adresse
baudrate: 9600 # Prüfe die Geräteeinstellungen, typische Werte sind 9600, 19200, 38400, 57600, 115200
comset: "8N1" # Kommunikationsparameter für den Adapter
# RS485 via TCP/IP (Modbus RTU)
modbus: rs485tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 1502 # Port
# Modbus TCP
modbus: tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 1502 # Port
timeout: 10s # Optional
- usage: pv
default: |
type: template
template: solaredge-hybrid
usage: pv
host: 192.0.2.2 # IP-Adresse oder Hostname
port: 502 # Port 502 (SetApp) oder 1502 (LCD) # Optional
usage: pv
# RS485 via adapter (Modbus RTU)
modbus: rs485serial
id: 1
device: /dev/ttyUSB0 # USB-RS485 Adapter Adresse
baudrate: 9600 # Prüfe die Geräteeinstellungen, typische Werte sind 9600, 19200, 38400, 57600, 115200
comset: "8N1" # Kommunikationsparameter für den Adapter
# RS485 via TCP/IP (Modbus RTU)
modbus: rs485tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 1502 # Port
# Modbus TCP
modbus: tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 1502 # Port
timeout: 10s # Optional
- usage: battery
default: |
type: template
template: solaredge-hybrid
usage: battery
host: 192.0.2.2 # IP-Adresse oder Hostname
port: 502 # Port 502 (SetApp) oder 1502 (LCD) # Optional
usage: battery
# RS485 via adapter (Modbus RTU)
modbus: rs485serial
id: 1
device: /dev/ttyUSB0 # USB-RS485 Adapter Adresse
baudrate: 9600 # Prüfe die Geräteeinstellungen, typische Werte sind 9600, 19200, 38400, 57600, 115200
comset: "8N1" # Kommunikationsparameter für den Adapter
# RS485 via TCP/IP (Modbus RTU)
modbus: rs485tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 1502 # Port
# Modbus TCP
modbus: tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 1502 # Port
timeout: 10s # Optional

View file

@ -1,6 +1,8 @@
product:
brand: SolarEdge
description: Wechselrichter
description: |
Nur ein System kann und darf auf den Wechselrichter zugreifen!
render:
- usage: grid
default: |
@ -8,6 +10,19 @@ render:
template: solaredge-inverter
usage: grid
# RS485 via adapter (Modbus RTU)
modbus: rs485serial
id: 1
device: /dev/ttyUSB0 # USB-RS485 Adapter Adresse
baudrate: 9600 # Prüfe die Geräteeinstellungen, typische Werte sind 9600, 19200, 38400, 57600, 115200
comset: "8N1" # Kommunikationsparameter für den Adapter
# RS485 via TCP/IP (Modbus RTU)
modbus: rs485tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 1502 # Port
# Modbus TCP
modbus: tcpip
id: 1
@ -20,6 +35,19 @@ render:
template: solaredge-inverter
usage: pv
# RS485 via adapter (Modbus RTU)
modbus: rs485serial
id: 1
device: /dev/ttyUSB0 # USB-RS485 Adapter Adresse
baudrate: 9600 # Prüfe die Geräteeinstellungen, typische Werte sind 9600, 19200, 38400, 57600, 115200
comset: "8N1" # Kommunikationsparameter für den Adapter
# RS485 via TCP/IP (Modbus RTU)
modbus: rs485tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 1502 # Port
# Modbus TCP
modbus: tcpip
id: 1