HardyBarth: add echarge brand, cPμ2 (#4393)
This commit is contained in:
parent
851b3c9066
commit
b38d641cf3
8 changed files with 45 additions and 12 deletions
|
|
@ -18,6 +18,7 @@ package charger
|
|||
// SOFTWARE.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
|
@ -32,7 +33,6 @@ import (
|
|||
"github.com/evcc-io/evcc/util/sponsor"
|
||||
)
|
||||
|
||||
// http://apidoc.ecb1.de
|
||||
// https://github.com/evcc-io/evcc/discussions/778
|
||||
|
||||
// Salia charger implementation
|
||||
|
|
@ -55,13 +55,10 @@ func init() {
|
|||
// NewSaliaFromConfig creates a Salia cPH2 charger from generic config
|
||||
func NewSaliaFromConfig(other map[string]interface{}) (api.Charger, error) {
|
||||
cc := struct {
|
||||
URI string
|
||||
ChargeControl int
|
||||
Meter int
|
||||
Cache time.Duration
|
||||
URI string
|
||||
Cache time.Duration
|
||||
}{
|
||||
ChargeControl: 1,
|
||||
Meter: 1,
|
||||
Cache: time.Second,
|
||||
}
|
||||
|
||||
if err := util.DecodeOther(other, &cc); err != nil {
|
||||
|
|
@ -89,7 +86,18 @@ func NewSalia(uri string, cache time.Duration) (api.Charger, error) {
|
|||
return nil, api.ErrSponsorRequired
|
||||
}
|
||||
|
||||
err := wb.post(salia.ChargeMode, echarge.ModeManual)
|
||||
// set chargemode manual
|
||||
res, err := wb.get()
|
||||
if err == nil && res.Secc.Port0.Salia.ChargeMode != echarge.ModeManual {
|
||||
if err = wb.post(salia.ChargeMode, echarge.ModeManual); err == nil {
|
||||
res, err = wb.get()
|
||||
}
|
||||
|
||||
if err == nil && res.Secc.Port0.Salia.ChargeMode != echarge.ModeManual {
|
||||
err = errors.New("could not change chargemode to manual")
|
||||
}
|
||||
}
|
||||
|
||||
if err == nil {
|
||||
go wb.heartbeat()
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,10 @@ template: hardybarth-ecb1
|
|||
products:
|
||||
- brand: HardyBarth
|
||||
description:
|
||||
generic: cPH1 (eCB1 Controller)
|
||||
generic: cPH1
|
||||
- brand: echarge
|
||||
description:
|
||||
generic: cPH1
|
||||
requirements:
|
||||
evcc: ["sponsorship"]
|
||||
params:
|
||||
|
|
|
|||
|
|
@ -2,7 +2,10 @@ template: hardybarth-salia
|
|||
products:
|
||||
- brand: HardyBarth
|
||||
description:
|
||||
generic: cPH2 (Salia PLCC Controller)
|
||||
generic: cPH2, cPμ2
|
||||
- brand: echarge
|
||||
description:
|
||||
generic: cPH2, cPμ2
|
||||
requirements:
|
||||
evcc: ["sponsorship"]
|
||||
params:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
product:
|
||||
brand: HardyBarth
|
||||
description: cPH1 (eCB1 Controller)
|
||||
description: cPH1
|
||||
requirements: ["sponsorship"]
|
||||
render:
|
||||
- default: |
|
||||
|
|
|
|||
9
templates/docs/charger/hardybarth-ecb1_1.yaml
Normal file
9
templates/docs/charger/hardybarth-ecb1_1.yaml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
product:
|
||||
brand: echarge
|
||||
description: cPH1
|
||||
requirements: ["sponsorship"]
|
||||
render:
|
||||
- default: |
|
||||
type: template
|
||||
template: hardybarth-ecb1
|
||||
host: 192.0.2.2 # IP-Adresse oder Hostname
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
product:
|
||||
brand: HardyBarth
|
||||
description: cPH2 (Salia PLCC Controller)
|
||||
description: cPH2, cPμ2
|
||||
requirements: ["sponsorship"]
|
||||
render:
|
||||
- default: |
|
||||
|
|
|
|||
9
templates/docs/charger/hardybarth-salia_1.yaml
Normal file
9
templates/docs/charger/hardybarth-salia_1.yaml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
product:
|
||||
brand: echarge
|
||||
description: cPH2, cPμ2
|
||||
requirements: ["sponsorship"]
|
||||
render:
|
||||
- default: |
|
||||
type: template
|
||||
template: hardybarth-salia
|
||||
host: 192.0.2.2 # IP-Adresse oder Hostname
|
||||
|
|
@ -11,6 +11,7 @@
|
|||
"DaheimLaden",
|
||||
"Easee",
|
||||
"Ebee",
|
||||
"echarge",
|
||||
"Ensto",
|
||||
"Etrel",
|
||||
"Garo",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue