FoxESS H3: add grid (#8403)

This commit is contained in:
andig 2023-06-15 21:45:57 +02:00 • committed by GitHub
parent d4cfa052bd
commit 2f4f06fe88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 46 additions and 1 deletions

View file

@ -5,11 +5,45 @@ products:
generic: H3 via Ethernet
params:
- name: usage
choice: ["pv", "battery"]
choice: ["grid", "pv", "battery"]
- name: modbus
choice: ["tcpip"]
render: |
type: custom
{{- if eq .usage "grid" }}
power:
source: calc
add:
- source: modbus
{{- include "modbus" . | indent 4 }}
register:
address: 31026 # Meter Power R
type: holding
decode: int16
scale: -1
- source: modbus
{{- include "modbus" . | indent 4 }}
register:
address: 31027 # Meter Power S
type: holding
decode: int16
scale: -1
- source: modbus
{{- include "modbus" . | indent 4 }}
register:
address: 31028 # Meter Power T
type: holding
decode: int16
scale: -1
energy:
source: modbus
{{- include "modbus" . | indent 2 }}
register:
address: 31012 # Grid Consumption Total
type: holding
decode: uint32
scale: 0.1
{{- end }}
{{- if eq .usage "pv" }}
power:
source: calc

View file

@ -2,6 +2,17 @@ product:
brand: FoxESS
description: H3 via Ethernet
render:
- usage: grid
default: |
type: template
template: fox-ess-h3
usage: grid
# Modbus TCP
modbus: tcpip
id: 1
host: 192.0.2.2 # Hostname
port: 502 # Port
- usage: pv
default: |
type: template