Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Jul 21, 2024
1 parent 2b0fd65 commit cd97fd1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 33 deletions.
21 changes: 0 additions & 21 deletions hems/eebus/eebus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand Down Expand Up @@ -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() {
}

Expand Down
13 changes: 1 addition & 12 deletions meter/eebus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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]
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit cd97fd1

Please sign in to comment.