Add Sessy P1 meter and battery (#27956)

This commit is contained in:
Marc Dirix 2026-03-07 09:42:10 +01:00 • committed by GitHub
parent ddc09c25ff
commit b6fdd75231
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 266 additions and 0 deletions

View file

@ -0,0 +1,106 @@
template: sessy-p1
products:
- brand: Sessy
description:
generic: Sessy P1
params:
- name: usage
choice: ["grid"]
- name: host
- name: cache
default: 10
render: |
type: custom
power:
source: http
uri: http://{{ .host }}/api/v2/p1/details
headers:
- content-type: application/json
jq: .power_total
cache: {{ .cache }}
timeout: 10s
energy:
source: calc
add:
- source: http
uri: http://{{ .host }}/api/v2/p1/details
headers:
- content-type: application/json
jq: .power_consumed_tariff1
scale: 0.001
cache: {{ .cache }}
timeout: 10s
- source: http
uri: http://{{ .host }}/api/v2/p1/details
headers:
- content-type: application/json
jq: .power_consumed_tariff2
scale: 0.001
cache: {{ .cache }}
timeout: 10s
- source: http
uri: http://{{ .host }}/api/v2/p1/details
headers:
- content-type: application/json
jq: .power_produced_tariff1
scale: -0.001
cache: {{ .cache }}
timeout: 10s
- source: http
uri: http://{{ .host }}/api/v2/p1/details
headers:
- content-type: application/json
jq: .power_produced_tariff2
scale: -0.001
cache: {{ .cache }}
timeout: 10s
currents:
- source: http
uri: http://{{ .host }}/api/v2/p1/details
headers:
- content-type: application/json
jq: .current_l1
scale: 0.001
cache: {{ .cache }}
timeout: 10s
- source: http
uri: http://{{ .host }}/api/v2/p1/details
headers:
- content-type: application/json
jq: .current_l2
scale: 0.001
cache: {{ .cache }}
timeout: 10s
- source: http
uri: http://{{ .host }}/api/v2/p1/details
headers:
- content-type: application/json
jq: .current_l3
scale: 0.001
cache: {{ .cache }}
timeout: 10s
voltages:
- source: http
uri: http://{{ .host }}/api/v2/p1/details
headers:
- content-type: application/json
jq: .voltage_l1
scale: 0.001
cache: {{ .cache }}
timeout: 10s
- source: http
uri: http://{{ .host }}/api/v2/p1/details
headers:
- content-type: application/json
jq: .voltage_l2
scale: 0.001
cache: {{ .cache }}
timeout: 10s
- source: http
uri: http://{{ .host }}/api/v2/p1/details
headers:
- content-type: application/json
jq: .voltage_l3
scale: 0.001
cache: {{ .cache }}
timeout: 10s

View file

@ -0,0 +1,160 @@
template: sessy-smart-battery
covers: [sessy-smart-battery]
products:
- brand: Sessy
description:
generic: Sessy Smart Battery
capabilities: ["battery-control"]
params:
- name: usage
choice: ["battery"]
- name: host
- name: user
required: true
- name: password
required: true
- name: cache
default: 10
- preset: battery-params
- name: capacity
default: 5
render: |
type: custom
power:
source: http
uri: http://{{ .host }}/api/v1/power/status
auth:
type: basic
user: {{ .user }}
password: {{ .password }}
headers:
- content-type: application/json
jq: .sessy.power
cache: {{ .cache }}
timeout: 10s
energy:
source: http
uri: http://{{ .host }}/api/v1/energy/status
auth:
type: basic
user: {{ .user }}
password: {{ .password }}
headers:
- content-type: application/json
jq: .sessy_energy.import_wh
cache: {{ .cache }}
timeout: 10s
soc:
source: http
uri: http://{{ .host }}/api/v1/power/status
auth:
type: basic
user: {{ .user }}
password: {{ .password }}
headers:
- content-type: application/json
jq: .sessy.state_of_charge
scale: 100
cache: {{ .cache }}
timeout: 10s
voltages:
- source: http
uri: http://{{ .host }}/api/v1/power/status
auth:
type: basic
user: {{ .user }}
password: {{ .password }}
headers:
- content-type: application/json
jq: .renewable_energy_phase1.voltage_rms
scale: 0.001
cache: {{ .cache }}
timeout: 10s
- source: http
uri: http://{{ .host }}/api/v1/power/status
auth:
type: basic
user: {{ .user }}
password: {{ .password }}
headers:
- content-type: application/json
jq: .renewable_energy_phase2.voltage_rms
scale: 0.001
cache: {{ .cache }}
timeout: 10s
- source: http
uri: http://{{ .host }}/api/v1/power/status
auth:
type: basic
user: {{ .user }}
password: {{ .password }}
headers:
- content-type: application/json
jq: .renewable_energy_phase3.voltage_rms
scale: 0.001
cache: {{ .cache }}
timeout: 10s
batterymode:
source: switch
switch:
- case: 1 # normal
set:
source: http
uri: http://{{ .host }}/api/v1/power/active_strategy
method: POST
auth:
type: basic
user: {{ .user }}
password: {{ .password }}
headers:
- content-type: application/json
body: '{"strategy": "POWER_STRATEGY_NOM"}'
- case: 2 # hold
set:
source: sequence
set:
- source: http
uri: http://{{ .host }}/api/v1/power/active_strategy
method: POST
auth:
type: basic
user: {{ .user }}
password: {{ .password }}
headers:
- content-type: application/json
body: '{"strategy": "POWER_STRATEGY_API"}'
- source: http
uri: http://{{ .host }}/api/v1/power/setpoint
method: POST
auth:
type: basic
user: {{ .user }}
password: {{ .password }}
headers:
- content-type: application/json
body: '{"setpoint": 0}'
- case: 3 # charge
set:
source: sequence
set:
- source: http
uri: http://{{ .host }}/api/v1/power/active_strategy
method: POST
auth:
type: basic
user: {{ .user }}
password: {{ .password }}
headers:
- content-type: application/json
body: '{"strategy": "POWER_STRATEGY_API"}'
- source: http
uri: http://{{ .host }}/api/v1/power/setpoint
method: POST
auth:
type: basic
user: {{ .user }}
password: {{ .password }}
headers:
- content-type: application/json
body: '{"setpoint": -2200}'
capacity: {{ .capacity }}