Senec: add https and energy (#9492)
This commit is contained in:
parent
748bfa8e0d
commit
a5d893a28a
2 changed files with 81 additions and 2 deletions
|
|
@ -8,6 +8,15 @@ params:
|
|||
choice: ["grid", "pv", "battery"]
|
||||
allinone: true
|
||||
- name: host
|
||||
- name: schema
|
||||
description:
|
||||
de: Schema
|
||||
en: Schema
|
||||
type: choice
|
||||
validvalues:
|
||||
- http
|
||||
- https
|
||||
default: http
|
||||
- name: capacity
|
||||
advanced: true
|
||||
render: |
|
||||
|
|
@ -16,7 +25,8 @@ render: |
|
|||
source: http
|
||||
unpack: hex
|
||||
decode: float32
|
||||
uri: http://{{ .host }}/lala.cgi
|
||||
uri: {{ .schema }}://{{ .host }}/lala.cgi
|
||||
insecure: true
|
||||
method: POST
|
||||
headers:
|
||||
- content-type: application/json
|
||||
|
|
@ -32,9 +42,34 @@ render: |
|
|||
body: '{"ENERGY":{"GUI_BAT_DATA_POWER":""}}'
|
||||
jq: .ENERGY.GUI_BAT_DATA_POWER | sub("fl_"; "")
|
||||
scale: -1
|
||||
{{- end }}
|
||||
energy:
|
||||
source: http
|
||||
unpack: hex
|
||||
decode: float32
|
||||
uri: {{ .schema }}://{{ .host }}/lala.cgi
|
||||
insecure: true
|
||||
method: POST
|
||||
headers:
|
||||
- content-type: application/json
|
||||
{{- if eq .usage "grid" }}
|
||||
body: '{"STATISTIC":{"LIVE_GRID_IMPORT":""}}'
|
||||
jq: .STATISTIC.LIVE_GRID_IMPORT | sub("fl_"; "")
|
||||
{{- end }}
|
||||
{{- if eq .usage "pv" }}
|
||||
body: '{"STATISTIC":{"LIVE_PV_GEN":""}}'
|
||||
jq: .STATISTIC.LIVE_PV_GEN | sub("fl_"; "")
|
||||
{{- end }}
|
||||
{{- if eq .usage "battery" }}
|
||||
body: '{"STATISTIC":{"LIVE_BAT_DISCHARGE":""}}'
|
||||
jq: .STATISTIC.LIVE_BAT_DISCHARGE | sub("fl_"; "")
|
||||
{{- end }}
|
||||
scale: 0.001
|
||||
{{- if eq .usage "battery" }}
|
||||
soc:
|
||||
source: http
|
||||
uri: http://{{ .host }}/lala.cgi
|
||||
uri: {{ .schema }}://{{ .host }}/lala.cgi
|
||||
insecure: true
|
||||
method: POST
|
||||
headers:
|
||||
- content-type: application/json
|
||||
|
|
|
|||
44
templates/docs/meter/senec-home_0.yaml
Normal file
44
templates/docs/meter/senec-home_0.yaml
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
product:
|
||||
brand: SENEC
|
||||
description: .Home
|
||||
render:
|
||||
- usage: grid
|
||||
default: |
|
||||
type: template
|
||||
template: senec-home
|
||||
usage: grid
|
||||
host: 192.0.2.2 # IP-Adresse oder Hostname
|
||||
protocol: http # Optional
|
||||
advanced: |
|
||||
type: template
|
||||
template: senec-home
|
||||
usage: grid
|
||||
host: 192.0.2.2 # IP-Adresse oder Hostname
|
||||
protocol: http # Optional
|
||||
- usage: pv
|
||||
default: |
|
||||
type: template
|
||||
template: senec-home
|
||||
usage: pv
|
||||
host: 192.0.2.2 # IP-Adresse oder Hostname
|
||||
protocol: http # Optional
|
||||
advanced: |
|
||||
type: template
|
||||
template: senec-home
|
||||
usage: pv
|
||||
host: 192.0.2.2 # IP-Adresse oder Hostname
|
||||
protocol: http # Optional
|
||||
- usage: battery
|
||||
default: |
|
||||
type: template
|
||||
template: senec-home
|
||||
usage: battery
|
||||
host: 192.0.2.2 # IP-Adresse oder Hostname
|
||||
protocol: http # Optional
|
||||
advanced: |
|
||||
type: template
|
||||
template: senec-home
|
||||
usage: battery
|
||||
host: 192.0.2.2 # IP-Adresse oder Hostname
|
||||
protocol: http # Optional
|
||||
capacity: 50 # Akkukapazität in kWh (Optional)
|
||||
Loading…
Add table
Add a link
Reference in a new issue