46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
template: senec-home
|
|
products:
|
|
- brand: SENEC
|
|
description:
|
|
generic: .Home
|
|
guidedsetup:
|
|
enable: true
|
|
params:
|
|
- name: usage
|
|
choice: ["grid", "pv", "battery"]
|
|
- name: host
|
|
required: true
|
|
example: 192.0.2.2
|
|
render: |
|
|
type: custom
|
|
power:
|
|
source: http
|
|
unpack: hex
|
|
decode: float32
|
|
uri: http://{{ .host }}/lala.cgi
|
|
method: POST
|
|
headers:
|
|
- content-type: application/json
|
|
{{- if eq .usage "grid" }}
|
|
body: '{"ENERGY":{"GUI_GRID_POW":""}}'
|
|
jq: .ENERGY.GUI_GRID_POW | sub("fl_"; "")
|
|
{{- end }}
|
|
{{- if eq .usage "pv" }}
|
|
body: '{"ENERGY":{"GUI_INVERTER_POWER":""}}'
|
|
jq: .ENERGY.GUI_INVERTER_POWER | sub("fl_"; "")
|
|
{{- end }}
|
|
{{- if eq .usage "battery" }}
|
|
body: '{"ENERGY":{"GUI_BAT_DATA_POWER":""}}'
|
|
jq: .ENERGY.GUI_BAT_DATA_POWER | sub("fl_"; "")
|
|
scale: -1
|
|
soc:
|
|
source: http
|
|
uri: http://{{ .host }}/lala.cgi
|
|
method: POST
|
|
headers:
|
|
- content-type: application/json
|
|
body: '{"ENERGY":{"GUI_BAT_DATA_FUEL_CHARGE":""}}'
|
|
jq: .ENERGY.GUI_BAT_DATA_FUEL_CHARGE | sub("fl_"; "")
|
|
unpack: hex
|
|
decode: float32
|
|
{{- end }}
|