Skip to content

Commit

Permalink
FoxESS: split H1/H3 devices (#7376)
Browse files Browse the repository at this point in the history
Co-authored-by: premultiply <4681172+premultiply@users.noreply.github.com>
  • Loading branch information
andig and premultiply authored Jun 5, 2023
1 parent 1b11a6a commit bfd52c2
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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"]
Expand Down
49 changes: 49 additions & 0 deletions templates/definition/meter/fox-ess-h3-ethernet.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -16,7 +16,7 @@ render:
- usage: battery
default: |
type: template
template: fox-ess-ethernet
template: fox-ess-h1
usage: battery
# Modbus TCP
Expand Down
26 changes: 26 additions & 0 deletions templates/docs/meter/fox-ess-h3_0.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit bfd52c2

Please sign in to comment.