Add Wattsonic (#16104)
This commit is contained in:
parent
62e252d2df
commit
5f79df4f0e
1 changed files with 112 additions and 0 deletions
112
templates/definition/meter/wattsonic.yaml
Normal file
112
templates/definition/meter/wattsonic.yaml
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
template: wattsonic
|
||||
products:
|
||||
- brand: Wattsonic
|
||||
- brand: Sunway
|
||||
- brand: Solinteng
|
||||
- brand: A-Tronix
|
||||
- brand: St-ems
|
||||
params:
|
||||
- name: usage
|
||||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: modbus
|
||||
choice: ["rs485"]
|
||||
port: 502
|
||||
id: 247
|
||||
- name: capacity
|
||||
advanced: true
|
||||
- name: delay
|
||||
default: 100ms
|
||||
advanced: true
|
||||
render: |
|
||||
type: custom
|
||||
{{- if eq .usage "grid" }}
|
||||
power: # power (W)
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 2 }}
|
||||
delay: {{ .delay }}
|
||||
register:
|
||||
address: 11000 # Total Power on Meter
|
||||
type: holding
|
||||
decode: int32
|
||||
scale: -1
|
||||
currents:
|
||||
- source: modbus
|
||||
{{- include "modbus" . | indent 4 }}
|
||||
delay: {{ .delay }}
|
||||
register:
|
||||
address: 11010 # Grid Phase A Current
|
||||
type: holding
|
||||
decode: uint16
|
||||
scale: 0.1
|
||||
- source: modbus
|
||||
{{- include "modbus" . | indent 4 }}
|
||||
delay: {{ .delay }}
|
||||
register:
|
||||
address: 11012 # Grid Phase B Current
|
||||
type: holding
|
||||
decode: uint16
|
||||
scale: 0.1
|
||||
- source: modbus
|
||||
{{- include "modbus" . | indent 4 }}
|
||||
delay: {{ .delay }}
|
||||
register:
|
||||
address: 11014 # Grid Phase C Current
|
||||
type: holding
|
||||
decode: uint16
|
||||
scale: 0.1
|
||||
powers:
|
||||
- source: modbus
|
||||
{{- include "modbus" . | indent 4 }}
|
||||
delay: {{ .delay }}
|
||||
register:
|
||||
address: 10994 # Phase A Power on Meter
|
||||
type: holding
|
||||
decode: int32
|
||||
scale: -1
|
||||
- source: modbus
|
||||
{{- include "modbus" . | indent 4 }}
|
||||
delay: {{ .delay }}
|
||||
register:
|
||||
address: 10996 # Phase B Power on Meter
|
||||
type: holding
|
||||
decode: int32
|
||||
scale: -1
|
||||
- source: modbus
|
||||
{{- include "modbus" . | indent 4 }}
|
||||
delay: {{ .delay }}
|
||||
register:
|
||||
address: 10998 # Phase C Power on Meter
|
||||
type: holding
|
||||
decode: int32
|
||||
scale: -1
|
||||
{{- end }}
|
||||
{{- if eq .usage "pv" }}
|
||||
power: # power (W)
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 2 }}
|
||||
delay: {{ .delay }}
|
||||
register:
|
||||
address: 11028 # PV Input Total Power
|
||||
type: holding
|
||||
decode: int32
|
||||
{{- end }}
|
||||
{{- if eq .usage "battery" }}
|
||||
power: # power (W)
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 2 }}
|
||||
delay: {{ .delay }}
|
||||
register:
|
||||
address: 40258 # Total_Backup_P
|
||||
type: holding
|
||||
decode: int32
|
||||
soc:
|
||||
source: modbus
|
||||
{{- include "modbus" . | indent 2 }}
|
||||
delay: {{ .delay }}
|
||||
register:
|
||||
address: 43000 # SOC
|
||||
type: holding
|
||||
decode: int16
|
||||
capacity: {{ .capacity }} # kWh
|
||||
{{- end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue