This reverts commit 0434e51ec8a410345b48a5eac98a6f1fb40a0396.
This commit is contained in:
parent
2dd029ae75
commit
acca717cfc
2 changed files with 142 additions and 21 deletions
134
templates/definition/meter/solis-hybrid-s.yaml
Normal file
134
templates/definition/meter/solis-hybrid-s.yaml
Normal file
|
|
@ -0,0 +1,134 @@
|
||||||
|
template: solis-hybrid-s
|
||||||
|
products:
|
||||||
|
- brand: Ginlong
|
||||||
|
description:
|
||||||
|
generic: Solis Hybrid Inverter (S Series)
|
||||||
|
params:
|
||||||
|
- name: usage
|
||||||
|
choice: ["grid", "pv", "battery"]
|
||||||
|
allinone: true
|
||||||
|
- name: modbus
|
||||||
|
choice: ["rs485"]
|
||||||
|
baudrate: 9600
|
||||||
|
id: 1
|
||||||
|
- name: capacity
|
||||||
|
advanced: true
|
||||||
|
- name: maxacpower
|
||||||
|
render: |
|
||||||
|
type: custom
|
||||||
|
{{- if eq .usage "grid" }}
|
||||||
|
power:
|
||||||
|
source: modbus
|
||||||
|
{{- include "modbus" . | indent 2 }}
|
||||||
|
register:
|
||||||
|
address: 33263 # Meter total active power
|
||||||
|
type: input
|
||||||
|
decode: int32
|
||||||
|
scale: -1
|
||||||
|
energy:
|
||||||
|
source: modbus
|
||||||
|
{{- include "modbus" . | indent 2 }}
|
||||||
|
register:
|
||||||
|
address: 33283 # Meter total active energy from grid
|
||||||
|
type: input
|
||||||
|
decode: uint32
|
||||||
|
scale: 0.01
|
||||||
|
currents:
|
||||||
|
- source: modbus
|
||||||
|
{{- include "modbus" . | indent 2 }}
|
||||||
|
register:
|
||||||
|
address: 33252 # Meter ac current A
|
||||||
|
type: input
|
||||||
|
decode: uint16
|
||||||
|
scale: 0.01
|
||||||
|
- source: modbus
|
||||||
|
{{- include "modbus" . | indent 2 }}
|
||||||
|
register:
|
||||||
|
address: 33254 # Meter ac current B
|
||||||
|
type: input
|
||||||
|
decode: uint16
|
||||||
|
scale: 0.01
|
||||||
|
- source: modbus
|
||||||
|
{{- include "modbus" . | indent 2 }}
|
||||||
|
register:
|
||||||
|
address: 33256 # Meter ac current C
|
||||||
|
type: input
|
||||||
|
decode: uint16
|
||||||
|
scale: 0.01
|
||||||
|
powers:
|
||||||
|
- source: modbus
|
||||||
|
{{- include "modbus" . | indent 2 }}
|
||||||
|
register:
|
||||||
|
address: 33257 # Meter active power A
|
||||||
|
type: input
|
||||||
|
decode: int32
|
||||||
|
scale: -1
|
||||||
|
- source: modbus
|
||||||
|
{{- include "modbus" . | indent 2 }}
|
||||||
|
register:
|
||||||
|
address: 33259 # Meter active power B
|
||||||
|
type: input
|
||||||
|
decode: int32
|
||||||
|
scale: -1
|
||||||
|
- source: modbus
|
||||||
|
{{- include "modbus" . | indent 2 }}
|
||||||
|
register:
|
||||||
|
address: 33261 # Meter active power C
|
||||||
|
type: input
|
||||||
|
decode: int32
|
||||||
|
scale: -1
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq .usage "pv" }}
|
||||||
|
power:
|
||||||
|
source: modbus
|
||||||
|
{{- include "modbus" . | indent 2 }}
|
||||||
|
register:
|
||||||
|
type: input
|
||||||
|
address: 33057 # Total DC output power (PV Power)
|
||||||
|
decode: uint32
|
||||||
|
energy:
|
||||||
|
source: modbus
|
||||||
|
{{- include "modbus" . | indent 2 }}
|
||||||
|
register:
|
||||||
|
address: 33029 # Total energy generation
|
||||||
|
type: input
|
||||||
|
decode: uint32
|
||||||
|
maxacpower: {{ .maxacpower }} # W
|
||||||
|
{{- end }}
|
||||||
|
{{- if eq .usage "battery" }}
|
||||||
|
power:
|
||||||
|
source: calc
|
||||||
|
mul:
|
||||||
|
- source: modbus
|
||||||
|
{{- include "modbus" . | indent 4 }}
|
||||||
|
register:
|
||||||
|
type: input
|
||||||
|
address: 33149 # Battery power
|
||||||
|
decode: uint32
|
||||||
|
- source: calc
|
||||||
|
add:
|
||||||
|
- source: modbus
|
||||||
|
{{- include "modbus" . | indent 6 }}
|
||||||
|
register:
|
||||||
|
type: input
|
||||||
|
address: 33135 # Battery current direction
|
||||||
|
decode: uint16 # 0:charge, 1:discharge
|
||||||
|
scale: 2
|
||||||
|
- source: const
|
||||||
|
value: -1
|
||||||
|
energy:
|
||||||
|
source: modbus
|
||||||
|
{{- include "modbus" . | indent 2 }}
|
||||||
|
register:
|
||||||
|
address: 33165 # Battery total discharge energy
|
||||||
|
type: input
|
||||||
|
decode: uint32
|
||||||
|
soc:
|
||||||
|
source: modbus
|
||||||
|
{{- include "modbus" . | indent 2 }}
|
||||||
|
register:
|
||||||
|
address: 33139 # Battery capacity SOC
|
||||||
|
type: input
|
||||||
|
decode: uint16
|
||||||
|
capacity: {{ .capacity }} # kWh
|
||||||
|
{{- end }}
|
||||||
|
|
@ -1,9 +1,8 @@
|
||||||
template: solis-hybrid
|
template: solis-hybrid
|
||||||
covers: ["solis-hybrid-s"]
|
|
||||||
products:
|
products:
|
||||||
- brand: Ginlong
|
- brand: Ginlong
|
||||||
description:
|
description:
|
||||||
generic: Solis Hybrid Inverter (RHI and S series)
|
generic: Solis Hybrid Inverter (RHI series)
|
||||||
params:
|
params:
|
||||||
- name: usage
|
- name: usage
|
||||||
choice: ["grid", "pv", "battery"]
|
choice: ["grid", "pv", "battery"]
|
||||||
|
|
@ -98,25 +97,13 @@ render: |
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if eq .usage "battery" }}
|
{{- if eq .usage "battery" }}
|
||||||
power:
|
power:
|
||||||
source: calc
|
source: modbus
|
||||||
mul:
|
{{- include "modbus" . | indent 2 }}
|
||||||
- source: modbus
|
register:
|
||||||
{{- include "modbus" . | indent 4 }}
|
type: input
|
||||||
register:
|
address: 33149 # Battery power
|
||||||
type: input
|
decode: int32
|
||||||
address: 33149 # Battery power
|
scale: -1
|
||||||
decode: int32
|
|
||||||
- source: calc
|
|
||||||
add:
|
|
||||||
- source: modbus
|
|
||||||
{{- include "modbus" . | indent 6 }}
|
|
||||||
register:
|
|
||||||
type: input
|
|
||||||
address: 33135 # Battery current direction
|
|
||||||
decode: uint16 # 0:charge, 1:discharge
|
|
||||||
scale: 2
|
|
||||||
- source: const
|
|
||||||
value: -1
|
|
||||||
energy:
|
energy:
|
||||||
source: modbus
|
source: modbus
|
||||||
{{- include "modbus" . | indent 2 }}
|
{{- include "modbus" . | indent 2 }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue