Etrel/Sonnen: add template and require sponsorship (#3682)

This commit is contained in:
andig 2022-06-26 17:05:25 +02:00 • committed by GitHub
parent 9d8b964a2f
commit 1ad8d44a73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 54 additions and 3 deletions

View file

@ -25,6 +25,7 @@ import (
"github.com/evcc-io/evcc/api"
"github.com/evcc-io/evcc/util"
"github.com/evcc-io/evcc/util/modbus"
"github.com/evcc-io/evcc/util/sponsor"
"github.com/volkszaehler/mbmd/encoding"
)
@ -83,9 +84,9 @@ func NewEtrel(uri string, id uint8) (*Etrel, error) {
return nil, err
}
// if !sponsor.IsAuthorized() {
// return nil, api.ErrSponsorRequired
// }
if !sponsor.IsAuthorized() {
return nil, api.ErrSponsorRequired
}
log := util.NewLogger("etrel")
conn.Logger(log.TRACE)

View file

@ -0,0 +1,22 @@
template: etrel
products:
- brand: Etrel
description:
generic: INCH
- brand: Sonnen
description:
generic: sonnenCharger
capabilities: ["mA"]
requirements:
evcc: ["sponsorship"]
description:
de: Die Wallbox muss sich im "Power" Modus befinden.
en: The charger must be switched to "Power" charging mode.
params:
- name: host
required: true
- name: port
default: 502
render: |
type: etrel
uri: {{ .host }}:{{ .port }}

View file

@ -0,0 +1,13 @@
product:
brand: Etrel
description: INCH
capabilities: ["mA"]
requirements: ["sponsorship"]
description: |
Die Wallbox muss sich im "Power" Modus befinden.
render:
- default: |
type: template
template: etrel
host: 192.0.2.2 # IP-Adresse oder Hostname
port: 502 # Port # Optional

View file

@ -0,0 +1,13 @@
product:
brand: Sonnen
description: sonnenCharger
capabilities: ["mA"]
requirements: ["sponsorship"]
description: |
Die Wallbox muss sich im "Power" Modus befinden.
render:
- default: |
type: template
template: etrel
host: 192.0.2.2 # IP-Adresse oder Hostname
port: 502 # Port # Optional

View file

@ -12,6 +12,7 @@
"Easee",
"Ebee",
"Ensto",
"Etrel",
"Garo",
"go-eCharger",
"HardyBarth",
@ -30,6 +31,7 @@
"Pracht",
"SENEC",
"SMA",
"Sonnen",
"Stark in Strom",
"TechniSat",
"TinkerForge",