From 5eb6e2b0aee5a111c0593ac26ee7ea37e07670d1 Mon Sep 17 00:00:00 2001 From: Andreas Linde <42185+DerAndereAndi@users.noreply.github.com> Date: Fri, 5 May 2023 20:07:34 +0200 Subject: [PATCH] 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! --- charger/eebus.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/charger/eebus.go b/charger/eebus.go index 51649846d..2c380a583 100644 --- a/charger/eebus.go +++ b/charger/eebus.go @@ -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 }