diff --git a/templates/definition/meter/sofarsolar.yaml b/templates/definition/meter/sofarsolar.yaml new file mode 100644 index 000000000..c17dd6ebd --- /dev/null +++ b/templates/definition/meter/sofarsolar.yaml @@ -0,0 +1,97 @@ +template: sofarsolar +products: + - brand: SofarSolar + description: + generic: Inverter / Hybrid Inverter + - brand: ZCS Azzurro + description: + generic: Inverter / Hybrid Inverter +params: + - name: usage + choice: ["grid", "pv", "battery"] + - name: modbus + choice: ["rs485", "tcpip"] + baudrate: 9600 + comset: 8N1 + port: 502 + id: 1 + - name: capacity + advanced: true +render: | + type: custom + {{- if eq .usage "grid" }} + power: + source: modbus + {{- include "modbus" . | indent 2 }} + register: + address: 0x0212 # Feed in/out power + type: holding + decode: int32 + scale: -0.01 + currents: + - source: modbus + {{- include "modbus" . | indent 2 }} + register: + address: 0x0207 # Grid A Current + type: holding + decode: int16 + scale: 0.01 + - source: modbus + {{- include "modbus" . | indent 2 }} + register: + address: 0x0209 # Grid B Current + type: holding + decode: int16 + scale: 0.01 + - source: modbus + {{- include "modbus" . | indent 2 }} + register: + address: 0x020B # Grid C Current + type: holding + decode: int16 + scale: 0.01 + energy: + source: modbus + {{- include "modbus" . | indent 2 }} + register: + address: 0x0220 # Total energy buy from grid + type: holding + decode: uint32 + {{- end }} + {{- if eq .usage "pv" }} + power: + source: modbus + {{- include "modbus" . | indent 2 }} + register: + address: 0x0215 # The power of generation + type: holding + decode: uint16 + scale: 0.01 + energy: + source: modbus + {{- include "modbus" . | indent 2 }} + register: + address: 0x021C # Total generation + type: holding + decode: uint32 + {{- end }} + {{- if eq .usage "battery" }} + power: + source: modbus + {{- include "modbus" . | indent 2 }} + register: + address: 0x020F # Battery Charge/Discharge current + type: holding + decode: int16 + scale: 0.01 + soc: + source: modbus + {{- include "modbus" . | indent 2 }} + register: + address: 0x0210 # The residual capacity of battery + type: holding + decode: uint16 + {{- if ne .capacity "" }} + capacity: {{ .capacity }} # kWh + {{- end }} + {{- end }} diff --git a/templates/docs/meter/sofarsolar_0.yaml b/templates/docs/meter/sofarsolar_0.yaml new file mode 100644 index 000000000..dd343ec6a --- /dev/null +++ b/templates/docs/meter/sofarsolar_0.yaml @@ -0,0 +1,148 @@ +product: + brand: SofarSolar + description: Inverter / Hybrid Inverter +render: + - usage: grid + default: | + type: template + template: sofarsolar + 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: 502 # Port + + # Modbus TCP + modbus: tcpip + id: 1 + host: 192.0.2.2 # Hostname + port: 502 # Port + advanced: | + type: template + template: sofarsolar + 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: 502 # Port + + # Modbus TCP + modbus: tcpip + id: 1 + host: 192.0.2.2 # Hostname + port: 502 # Port + capacity: 50 # Akkukapazität in kWh # Optional + - usage: pv + default: | + type: template + template: sofarsolar + 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: 502 # Port + + # Modbus TCP + modbus: tcpip + id: 1 + host: 192.0.2.2 # Hostname + port: 502 # Port + advanced: | + type: template + template: sofarsolar + 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: 502 # Port + + # Modbus TCP + modbus: tcpip + id: 1 + host: 192.0.2.2 # Hostname + port: 502 # Port + capacity: 50 # Akkukapazität in kWh # Optional + - usage: battery + default: | + type: template + template: sofarsolar + 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: 502 # Port + + # Modbus TCP + modbus: tcpip + id: 1 + host: 192.0.2.2 # Hostname + port: 502 # Port + advanced: | + type: template + template: sofarsolar + 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: 502 # Port + + # Modbus TCP + modbus: tcpip + id: 1 + host: 192.0.2.2 # Hostname + port: 502 # Port + capacity: 50 # Akkukapazität in kWh # Optional diff --git a/templates/docs/meter/sofarsolar_1.yaml b/templates/docs/meter/sofarsolar_1.yaml new file mode 100644 index 000000000..ed720b688 --- /dev/null +++ b/templates/docs/meter/sofarsolar_1.yaml @@ -0,0 +1,148 @@ +product: + brand: ZCS Azzurro + description: Inverter / Hybrid Inverter +render: + - usage: grid + default: | + type: template + template: sofarsolar + 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: 502 # Port + + # Modbus TCP + modbus: tcpip + id: 1 + host: 192.0.2.2 # Hostname + port: 502 # Port + advanced: | + type: template + template: sofarsolar + 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: 502 # Port + + # Modbus TCP + modbus: tcpip + id: 1 + host: 192.0.2.2 # Hostname + port: 502 # Port + capacity: 50 # Akkukapazität in kWh # Optional + - usage: pv + default: | + type: template + template: sofarsolar + 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: 502 # Port + + # Modbus TCP + modbus: tcpip + id: 1 + host: 192.0.2.2 # Hostname + port: 502 # Port + advanced: | + type: template + template: sofarsolar + 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: 502 # Port + + # Modbus TCP + modbus: tcpip + id: 1 + host: 192.0.2.2 # Hostname + port: 502 # Port + capacity: 50 # Akkukapazität in kWh # Optional + - usage: battery + default: | + type: template + template: sofarsolar + 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: 502 # Port + + # Modbus TCP + modbus: tcpip + id: 1 + host: 192.0.2.2 # Hostname + port: 502 # Port + advanced: | + type: template + template: sofarsolar + 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: 502 # Port + + # Modbus TCP + modbus: tcpip + id: 1 + host: 192.0.2.2 # Hostname + port: 502 # Port + capacity: 50 # Akkukapazität in kWh # Optional diff --git a/templates/evcc.io/brands.json b/templates/evcc.io/brands.json index 902c1dd8a..511b99ccb 100644 --- a/templates/evcc.io/brands.json +++ b/templates/evcc.io/brands.json @@ -96,6 +96,7 @@ "Shelly", "Siemens", "SMA", + "SofarSolar", "SolarEdge", "SolarMax", "Solarwatt", @@ -107,7 +108,8 @@ "TQ", "VARTA", "Victron", - "Volkszähler" + "Volkszähler", + "ZCS Azzurro" ], "PVBattery": [ "Alpha ESS", @@ -132,6 +134,7 @@ "Senergy", "Shelly", "SMA", + "SofarSolar", "SolarEdge", "SolarMax", "Solarwatt", @@ -141,7 +144,8 @@ "Tesla", "TP-Link", "VARTA", - "Victron" + "Victron", + "ZCS Azzurro" ], "Vehicles": [ "Aiways",