diff --git a/templates/definition/meter/fox-ess-ethernet.yaml b/templates/definition/meter/fox-ess-h1-ethernet.yaml similarity index 92% rename from templates/definition/meter/fox-ess-ethernet.yaml rename to templates/definition/meter/fox-ess-h1-ethernet.yaml index 988b0c0f43..bea9b5850f 100644 --- a/templates/definition/meter/fox-ess-ethernet.yaml +++ b/templates/definition/meter/fox-ess-h1-ethernet.yaml @@ -1,8 +1,9 @@ -template: fox-ess-ethernet +template: fox-ess-h1 +covers: ["fox-ess-ethernet"] products: - brand: FoxESS description: - generic: FoxESS via Ethernet + generic: H1 via Ethernet params: - name: usage choice: ["pv", "battery"] diff --git a/templates/definition/meter/fox-ess-h3-ethernet.yaml b/templates/definition/meter/fox-ess-h3-ethernet.yaml new file mode 100644 index 0000000000..bf86968ba1 --- /dev/null +++ b/templates/definition/meter/fox-ess-h3-ethernet.yaml @@ -0,0 +1,49 @@ +template: fox-ess-h3 +products: + - brand: FoxESS + description: + generic: H3 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: 31036 # Battery Charge/Discharge + type: holding + decode: int16 + soc: + source: modbus + {{- include "modbus" . | indent 2 }} + # register details + register: + address: 31038 # Soc + type: holding + decode: int16 + {{- end }} diff --git a/templates/docs/meter/fox-ess-ethernet_0.yaml b/templates/docs/meter/fox-ess-h1_0.yaml similarity index 79% rename from templates/docs/meter/fox-ess-ethernet_0.yaml rename to templates/docs/meter/fox-ess-h1_0.yaml index 8c3407ff56..b1690ddf4d 100644 --- a/templates/docs/meter/fox-ess-ethernet_0.yaml +++ b/templates/docs/meter/fox-ess-h1_0.yaml @@ -1,11 +1,11 @@ product: brand: FoxESS - description: FoxESS via Ethernet + description: H1 via Ethernet render: - usage: pv default: | type: template - template: fox-ess-ethernet + template: fox-ess-h1 usage: pv # Modbus TCP @@ -16,7 +16,7 @@ render: - usage: battery default: | type: template - template: fox-ess-ethernet + template: fox-ess-h1 usage: battery # Modbus TCP diff --git a/templates/docs/meter/fox-ess-h3_0.yaml b/templates/docs/meter/fox-ess-h3_0.yaml new file mode 100644 index 0000000000..0489a9ef47 --- /dev/null +++ b/templates/docs/meter/fox-ess-h3_0.yaml @@ -0,0 +1,26 @@ +product: + brand: FoxESS + description: H3 via Ethernet +render: + - usage: pv + default: | + type: template + template: fox-ess-h3 + 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-h3 + usage: battery + + # Modbus TCP + modbus: tcpip + id: 1 + host: 192.0.2.2 # Hostname + port: 502 # Port