Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FoxESS: split H1/H3 devices #7376

Merged
merged 4 commits into from
Jun 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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