func (lp *Timer) StartRequired() bool {
	if lp == nil {
		return false
	}

	se := lp.SocEstimator()
	if !lp.active() || se == nil {
		return false
	}

	power := float64(lp.ActivePhases()) * lp.maxCurrent * lp.Voltage()

	// time
	remainingDuration := se.RemainingChargeDuration(power, lp.SoC)
	lp.finishAt = time.Now().Add(remainingDuration).Round(time.Minute)
	lp.log.DEBUG.Printf("target charging active for %v: projected %v (%v remaining)", lp.Time, lp.finishAt, remainingDuration.Round(time.Minute))

	lp.chargeRequired = lp.finishAt.After(lp.Time)
	lp.Publish("timerActive", lp.chargeRequired)

	return lp.chargeRequired
}
// StartRequired calculates remaining charge duration and returns true if charge start is required to achieve target soc in time
StartRequired calculates remaining charge duration and returns true if charge start is required to achieve target soc in time
// StartRequired calculates remaining charge duration and returns true if charge start is required to achieve target soc in time
func (lp *Timer) StartRequired() bool {
	if lp == nil {
		return false
	}
	se := lp.SocEstimator()
	if !lp.active() || se == nil {
		return false
	}
	power := float64(lp.ActivePhases()) * lp.maxCurrent * lp.Voltage()
	remainingDuration := se.RemainingChargeDuration(power, lp.SoC)
	lp.finishAt = time.Now().Add(remainingDuration).Round(time.Minute)
	lp.log.DEBUG.Printf("target charging active for %v: projected %v (%v remaining)", lp.Time, lp.finishAt, remainingDuration.Round(time.Minute))
	lp.chargeRequired = lp.finishAt.After(lp.Time)
	lp.Publish("timerActive", lp.chargeRequired)
	return lp.chargeRequired
}
func ( lp * Timer ) StartRequired ( ) bool { if lp == nil { return false } se := lp . SocEstimator ( ) if ! lp . active ( ) || se == nil { return false } power := float64 ( lp . ActivePhases ( ) ) * lp . maxCurrent * lp . Voltage ( ) remainingDuration := se . RemainingChargeDuration ( power , lp . SoC ) lp . finishAt = time . Now ( ) . Add ( remainingDuration ) . Round ( time . Minute ) lp . log . DEBUG . Printf ( " " , lp . Time , lp . finishAt , remainingDuration . Round ( time . Minute ) ) lp . chargeRequired = lp . finishAt . After ( lp . Time ) lp . Publish ( " " , lp . chargeRequired ) return lp . chargeRequired }
StartRequired calculates remaining charge duration and returns true if charge start is required to achieve target soc in time
StartRequired calculates remaining charge duration and returns true if charge start is required to achieve target soc in time
// time