chore: add more session logging
This commit is contained in:
parent
8ba04a6a22
commit
72fbbd1bdb
2 changed files with 5 additions and 2 deletions
|
|
@ -1416,6 +1416,9 @@ func (lp *Loadpoint) publishChargeProgress() {
|
|||
// workaround for Go-E resetting during disconnect, see
|
||||
// https://github.com/evcc-io/evcc/issues/5092
|
||||
if f > lp.chargedAtStartup {
|
||||
{ // TODO remove
|
||||
lp.log.DEBUG.Printf("!! session: chargeRater.chargedEnergy=%.1f - chargedAtStartup=%.1f", f, lp.chargedAtStartup)
|
||||
}
|
||||
added, addedGreen := lp.sessionEnergy.Update(f - lp.chargedAtStartup)
|
||||
if telemetry.Enabled() && added > 0 {
|
||||
telemetry.UpdateEnergy(added, addedGreen)
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ func (lp *Loadpoint) stopSession() {
|
|||
|
||||
if chargedEnergy := lp.getChargedEnergy() / 1e3; chargedEnergy > s.ChargedEnergy {
|
||||
{ // TODO remove
|
||||
lp.log.DEBUG.Printf("session: chargedEnergy=%.1f", s.ChargedEnergy)
|
||||
lp.log.DEBUG.Printf("!! session: chargedEnergy=%.1f > chargedEnergy=%.1f", chargedEnergy, s.ChargedEnergy)
|
||||
}
|
||||
lp.sessionEnergy.Update(chargedEnergy)
|
||||
}
|
||||
|
|
@ -85,7 +85,7 @@ func (lp *Loadpoint) stopSession() {
|
|||
if s.MeterStop != nil {
|
||||
meterStop = *s.MeterStop
|
||||
}
|
||||
lp.log.DEBUG.Printf("session: start=%.3f stop=%.3f chargedEnergy=%.3f", meterStart, meterStop, s.ChargedEnergy)
|
||||
lp.log.DEBUG.Printf("!! session: start=%.3f stop=%.3f chargedEnergy=%.3f", meterStart, meterStop, s.ChargedEnergy)
|
||||
}
|
||||
|
||||
lp.db.Persist(s)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue