diff --git a/hems/eebus/eebus.go b/hems/eebus/eebus.go index 97cf280a1e..fde630464a 100644 --- a/hems/eebus/eebus.go +++ b/hems/eebus/eebus.go @@ -10,28 +10,16 @@ import ( ucapi "github.com/enbility/eebus-go/usecases/api" "github.com/enbility/eebus-go/usecases/cs/lpc" spineapi "github.com/enbility/spine-go/api" - "github.com/evcc-io/evcc/core/loadpoint" "github.com/evcc-io/evcc/core/site" "github.com/evcc-io/evcc/server/eebus" "github.com/evcc-io/evcc/util" ) -const ( - maxIdRequestTimespan = time.Second * 120 - idleFactor = 0.6 - voltage float64 = 230 -) - -type minMax struct { - min, max float64 -} - type EEBus struct { ski string mux sync.Mutex log *util.Logger - lp loadpoint.API connected bool connectedC chan bool @@ -41,8 +29,6 @@ type EEBus struct { limit ucapi.LoadLimit } -// LPC, LPP, MPC, MGCP - // New creates an EEBus HEMS from generic config func New(other map[string]interface{}, site site.API) (*EEBus, error) { var cc struct { @@ -145,13 +131,6 @@ func (c *EEBus) setConnected(connected bool) { } } -func (c *EEBus) isConnected() bool { - c.mux.Lock() - defer c.mux.Unlock() - - return c.connected -} - func (c *EEBus) Run() { } diff --git a/meter/eebus.go b/meter/eebus.go index 1470fed890..639ebf1b7b 100644 --- a/meter/eebus.go +++ b/meter/eebus.go @@ -7,11 +7,9 @@ import ( "time" eebusapi "github.com/enbility/eebus-go/api" - ucapi "github.com/enbility/eebus-go/usecases/api" "github.com/enbility/eebus-go/usecases/ma/mgcp" spineapi "github.com/enbility/spine-go/api" "github.com/evcc-io/evcc/api" - "github.com/evcc-io/evcc/core/loadpoint" "github.com/evcc-io/evcc/provider" "github.com/evcc-io/evcc/server/eebus" "github.com/evcc-io/evcc/util" @@ -22,14 +20,12 @@ type EEBus struct { mux sync.Mutex log *util.Logger - lp loadpoint.API connected bool connectedC chan bool connectedTime time.Time - uc *eebus.UseCasesCS - limit ucapi.LoadLimit + uc *eebus.UseCasesCS power, energy *provider.Value[float64] voltages, currents *provider.Value[[]float64] @@ -142,13 +138,6 @@ func (c *EEBus) setConnected(connected bool) { } } -func (c *EEBus) isConnected() bool { - c.mux.Lock() - defer c.mux.Unlock() - - return c.connected -} - func (c *EEBus) dataUpdatePower(entity spineapi.EntityRemoteInterface) { data, err := c.uc.MGCP.Power(entity) if err != nil {