diff --git a/cmd/evse/main.go b/cmd/evse/main.go index 11a2a8a5..5fa8bb03 100644 --- a/cmd/evse/main.go +++ b/cmd/evse/main.go @@ -15,6 +15,7 @@ import ( "github.com/enbility/eebus-go/api" "github.com/enbility/eebus-go/service" + ucapi "github.com/enbility/eebus-go/usecases/api" "github.com/enbility/eebus-go/usecases/cs/lpc" shipapi "github.com/enbility/ship-go/api" "github.com/enbility/ship-go/cert" @@ -92,6 +93,16 @@ func (h *evse) run() { h.uclpc = lpc.NewLPC(localEntity, h.OnLPCEvent) h.myService.AddUseCase(h.uclpc) + // Initialize local server data + _ = h.uclpc.SetConsumptionNominalMax(32000) + _ = h.uclpc.SetConsumptionLimit(ucapi.LoadLimit{ + Value: 4200, + IsChangeable: true, + IsActive: false, + }) + _ = h.uclpc.SetFailsafeConsumptionActivePowerLimit(4200, true) + _ = h.uclpc.SetFailsafeDurationMinimum(2*time.Hour, true) + if len(remoteSki) == 0 { os.Exit(0) } diff --git a/cmd/hems/main.go b/cmd/hems/main.go index 069359e2..586b201e 100644 --- a/cmd/hems/main.go +++ b/cmd/hems/main.go @@ -103,6 +103,25 @@ func (h *hems) run() { h.uceglpp = eglpp.NewLPP(localEntity, nil) h.myService.AddUseCase(h.uceglpp) + // Initialize local server data + _ = h.uccslpc.SetConsumptionNominalMax(32000) + _ = h.uccslpc.SetConsumptionLimit(ucapi.LoadLimit{ + Value: 4200, + IsChangeable: true, + IsActive: false, + }) + _ = h.uccslpc.SetFailsafeConsumptionActivePowerLimit(4200, true) + _ = h.uccslpc.SetFailsafeDurationMinimum(2*time.Hour, true) + + _ = h.uccslpp.SetProductionNominalMax(10000) + _ = h.uccslpp.SetProductionLimit(ucapi.LoadLimit{ + Value: 10000, + IsChangeable: true, + IsActive: false, + }) + _ = h.uccslpp.SetFailsafeProductionActivePowerLimit(4200, true) + _ = h.uccslpp.SetFailsafeDurationMinimum(2*time.Hour, true) + if len(remoteSki) == 0 { os.Exit(0) }