Skip to content

Commit

Permalink
Etrel/Sonnen: add template and require sponsorship (#3682)
Browse files Browse the repository at this point in the history
  • Loading branch information
andig authored Jun 26, 2022
1 parent 9d8b964 commit 1ad8d44
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 3 deletions.
7 changes: 4 additions & 3 deletions charger/etrel.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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)
Expand Down
22 changes: 22 additions & 0 deletions templates/definition/charger/etrel.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
13 changes: 13 additions & 0 deletions templates/docs/charger/etrel_0.yaml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions templates/docs/charger/etrel_1.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions templates/evcc.io/brands.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"Easee",
"Ebee",
"Ensto",
"Etrel",
"Garo",
"go-eCharger",
"HardyBarth",
Expand All @@ -30,6 +31,7 @@
"Pracht",
"SENEC",
"SMA",
"Sonnen",
"Stark in Strom",
"TechniSat",
"TinkerForge",
Expand Down

0 comments on commit 1ad8d44

Please sign in to comment.