diff --git a/meter/rct.go b/meter/rct.go index 7feef4350..c64209923 100644 --- a/meter/rct.go +++ b/meter/rct.go @@ -188,6 +188,10 @@ func NewRCT(ctx context.Context, uri, usage string, batterySocLimits batterySocL return m.conn.Write(rct.BatterySoCTargetMin, floatVal(batterySocLimits.MinSoc/100)) }) + eg.Go(func() error { + return m.conn.Write(rct.PowerMngSocMax, floatVal(batterySocLimits.MaxSoc/100)) + }) + eg.Go(func() error { return m.conn.Write(rct.PowerMngBatteryPowerExternW, floatVal(0)) }) @@ -197,6 +201,10 @@ func NewRCT(ctx context.Context, uri, usage string, batterySocLimits batterySocL return m.conn.Write(rct.PowerMngSocStrategy, []byte{rct.SOCTargetInternal}) }) + eg.Go(func() error { + return m.conn.Write(rct.PowerMngSocMax, floatVal(batterySocLimits.MaxSoc/100)) + }) + eg.Go(func() error { return m.conn.Write(rct.BatterySoCTargetMin, floatVal(batterySocLimits.MaxSoc/100)) }) @@ -214,6 +222,19 @@ func NewRCT(ctx context.Context, uri, usage string, batterySocLimits batterySocL return m.conn.Write(rct.PowerMngSocStrategy, []byte{rct.SOCTargetExternal}) }) + case api.BatteryHoldCharge: + eg.Go(func() error { + return m.conn.Write(rct.PowerMngSocStrategy, []byte{rct.SOCTargetInternal}) + }) + + eg.Go(func() error { + return m.conn.Write(rct.BatterySoCTargetMin, floatVal(batterySocLimits.MinSoc/100)) + }) + + eg.Go(func() error { + return m.conn.Write(rct.PowerMngSocMax, floatVal(batterySocLimits.MinSoc/100)) + }) + default: return api.ErrNotAvailable }