fredli74 / smartcharge-dev

Smart charging system for EVs
https://smartcharge.dev
MIT License
18 stars 4 forks source link

Problem with "Disconnected" status while connected #430

Closed fredli74 closed 3 years ago

fredli74 commented 3 years ago

User with Easee charger box experiencing vehicle resetting charge plan in the middle of the night.

Vehicle reporting "Disconnected" status briefly when the charger box cuts power. This triggers smartcharge to handle it as a physical disconnect and resets the charge plan, moving target charge time forward.

Should we double check charge_port_latch field to verify disconnection?

We also need to verify if it resets charge_enable_request or not since it would trigger "user override" state.

fredli74 commented 3 years ago

Idea: Tesla agent could reset charge state upon "Disconnected" status but keep Connected:true as long as charge_port_latch is "Engaged"

fredli74 commented 3 years ago

Took a different approach by checking the latest connection entry to see if the vehicle was moved. If not, it re-uses the same connection id.