diff --git a/templates/definition/meter/fox-ess-ethernet.yaml b/templates/definition/meter/fox-ess-ethernet.yaml new file mode 100644 index 000000000..988b0c0f4 --- /dev/null +++ b/templates/definition/meter/fox-ess-ethernet.yaml @@ -0,0 +1,49 @@ +template: fox-ess-ethernet +products: + - brand: FoxESS + description: + generic: FoxESS via Ethernet +params: + - name: usage + choice: ["pv", "battery"] + - name: modbus + choice: ["tcpip"] +render: | + type: custom + {{- if eq .usage "pv" }} + power: + source: calc + add: + - source: modbus + {{- include "modbus" . | indent 4 }} + # register details + register: + address: 31002 # PV1 + type: holding + decode: int16 + - source: modbus + {{- include "modbus" . | indent 4 }} + # register details + register: + address: 31005 # PV2 + type: holding + decode: int16 + {{- end }} + {{- if eq .usage "battery" }} + power: + source: modbus + {{- include "modbus" . | indent 2 }} + # register details + register: + address: 31022 # Battery Charge/Discharge + type: holding + decode: int16 + soc: + source: modbus + {{- include "modbus" . | indent 2 }} + # register details + register: + address: 31024 # Soc + type: holding + decode: int16 + {{- end }} diff --git a/templates/definition/meter/fox-ess-rs485.yaml b/templates/definition/meter/fox-ess-rs485.yaml new file mode 100644 index 000000000..e79414fde --- /dev/null +++ b/templates/definition/meter/fox-ess-rs485.yaml @@ -0,0 +1,59 @@ +template: fox-ess-rs485 +products: + - brand: FoxESS + description: + generic: FoxESS via RS485 Modbus +params: + - name: usage + choice: ["grid", "pv", "battery"] + - name: modbus + choice: ["rs485"] +render: | + type: custom + {{- if eq .usage "grid" }} + power: + source: modbus + {{- include "modbus" . | indent 2 }} + # register details + register: + address: 11021 # Grid power + type: holding + decode: int16 + {{- end }} + {{- if eq .usage "pv" }} + power: + source: calc + add: + - source: modbus + {{- include "modbus" . | indent 4 }} + # register details + register: + address: 11002 # PV1 + type: holding + decode: int16 + - source: modbus + {{- include "modbus" . | indent 4 }} + # register details + register: + address: 11005 # PV2 + type: holding + decode: int16 + {{- end }} + {{- if eq .usage "battery" }} + power: + source: modbus + {{- include "modbus" . | indent 2 }} + # register details + register: + address: 11008 # Battery Charge/Discharge + type: holding + decode: int16 + soc: + source: modbus + {{- include "modbus" . | indent 2 }} + # register details + register: + address: 11036 # Soc + type: holding + decode: int16 + {{- end }} diff --git a/templates/docs/meter/fox-ess-ethernet_0.yaml b/templates/docs/meter/fox-ess-ethernet_0.yaml new file mode 100644 index 000000000..b7be847ad --- /dev/null +++ b/templates/docs/meter/fox-ess-ethernet_0.yaml @@ -0,0 +1,26 @@ +product: + brand: FoxESS + description: FoxESS via Ethernet +render: + - usage: pv + default: | + type: template + template: fox-ess-ethernet + usage: pv + + # Modbus TCP + modbus: tcpip + id: 1 + host: 192.0.2.2 # Hostname + port: 502 # Port + - usage: battery + default: | + type: template + template: fox-ess-ethernet + usage: battery + + # Modbus TCP + modbus: tcpip + id: 1 + host: 192.0.2.2 # Hostname + port: 502 # Port diff --git a/templates/docs/meter/fox-ess-rs485_0.yaml b/templates/docs/meter/fox-ess-rs485_0.yaml new file mode 100644 index 000000000..3298b97d1 --- /dev/null +++ b/templates/docs/meter/fox-ess-rs485_0.yaml @@ -0,0 +1,58 @@ +product: + brand: FoxESS + description: FoxESS via RS485 Modbus +render: + - usage: grid + default: | + type: template + template: fox-ess-rs485 + 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 + - usage: pv + default: | + type: template + template: fox-ess-rs485 + 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 + - usage: battery + default: | + type: template + template: fox-ess-rs485 + 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 diff --git a/templates/evcc.io/brands.json b/templates/evcc.io/brands.json index 695798afc..f98cbd580 100644 --- a/templates/evcc.io/brands.json +++ b/templates/evcc.io/brands.json @@ -65,6 +65,7 @@ "E3DC", "Eastron", "FENECON", + "FoxESS", "Fronius", "Growatt", "Homematic IP", @@ -101,6 +102,7 @@ "E3DC", "Eastron", "FENECON", + "FoxESS", "Fronius", "Growatt", "Homematic IP",