Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep settings and states in sync between EVSE and EVCC #124

Closed
premultiply opened this issue May 11, 2020 · 6 comments · Fixed by #172
Closed

Keep settings and states in sync between EVSE and EVCC #124

premultiply opened this issue May 11, 2020 · 6 comments · Fixed by #172
Labels
enhancement New feature or request

Comments

@premultiply
Copy link
Member

Major settings like charge current and charge enabled should be kept in sync between internal EVCC and EVSE.

Due to any connection problem (shutdown or reboot of EVSE, bad wireless connection, EMP, manual settings on EVSE, internal EVSE logic etc.) settings can be desynced between EVCCs will and what the charger really does.
So EVCC should read the major settings from EVSE, compare and update them if they differ on a regular base where possible. Not all types of EVSE allow for reading the internal settings.

Appart from that it should make sure that the connection to EVSE is alive by implementing something like "heartbeat" or "ping" to monitor the connection #122

@andig andig added the enhancement New feature or request label May 11, 2020
@andig
Copy link
Member

andig commented May 11, 2020

Due to any connection problem (shutdown or reboot of EVSE, bad wireless connection, EMP, manual settings on EVSE, internal EVSE logic etc.) settings can be desynced between EVCCs will and what the charger really does.

Thats only partially true. EVCC keeps track if settings were successfully written to EVSE. However, EVCC does not currently re-read EVSE values from EVSE. This makes is susceptible to the following influences:

  • manual changes by users
  • new defaults upon EVSE reboot

One approach could be to re-write EVCC state to EVSE at a regular (configurable) interval. Even for reliable devices that would take care of forceful reboots or user interaction and prevent potential deadlocks in EVCC operations.

#122 is a different topic and will be addressed by pushing all warning or error messages to the UI.

@premultiply
Copy link
Member Author

Always Read-Compare-Write settings may also reduce EEPROM and Flash write cycles on some embedded devices.
So only write if values on device differ from EVCCs internal value.

@andig
Copy link
Member

andig commented May 12, 2020

So only write if values on device differ from EVCCs internal value.

That's currently implemented- EVCC keeps state and only writes when it wants to request a state change.

@premultiply
Copy link
Member Author

premultiply commented May 12, 2020

Yes, but this is not what is meant here.
It writes when a state change is intended but does not care about the device side.
And it does not check if device differs from current internal state and also does not read the current device state first before writing a new value (if needed).

@DerAndereAndi
Copy link
Contributor

How about reading the current value in each cycle and only write if it differs from the target value?

@andig
Copy link
Member

andig commented May 12, 2020

How about reading the current value in each cycle and only write if it differs from the target value?

Sure, but would require changing the entire charger interface. Not highest priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants