EEBUS: ignore a max number of meter no data errors (#7717)

* Ignore a max number of meter no data errors

When an EV is connected, measurements are not available right away, as the initial communication is not done. And due to bugs in the Elli software, the EEBUS stack can not generally wait for data being available and only then set the EV as being connected.

This change ignores a maximum amount of specific EEBUS `no data available` errors, and only propagates them if the error occured more often.

The error will come anyway, if evcc is startet while an EV is connected to the Elli wallbox!
This commit is contained in:
Andreas Linde 2023-05-05 20:07:34 +02:00 • committed by GitHub
parent 27f0a1471e
commit 5eb6e2b0ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,6 +8,7 @@ import (
"time"
"github.com/enbility/cemd/emobility"
"github.com/enbility/eebus-go/features"
"github.com/evcc-io/evcc/api"
"github.com/evcc-io/evcc/charger/eebus"
"github.com/evcc-io/evcc/core/loadpoint"
@ -420,6 +421,9 @@ func (c *EEBus) currents() (float64, float64, float64, error) {
currents, err := c.emobility.EVCurrentsPerPhase()
if err != nil {
if err == features.ErrDataNotAvailable {
return 0, 0, 0, api.ErrNotAvailable
}
return 0, 0, 0, err
}