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

Solar mode power regulation #67

Open
TFleury opened this issue Nov 1, 2024 · 12 comments
Open

Solar mode power regulation #67

TFleury opened this issue Nov 1, 2024 · 12 comments

Comments

@TFleury
Copy link

TFleury commented Nov 1, 2024

Describe the bug
When using solar mode with solar_max_import parameter greater than 0, the EVSE tries to reach solar_max_import value instead of 0.

For example, if you set "current_min": 6, "solar_start_current": 2 and "solar_max_import": 5
When mains meter drops below -2A charging starts, then it regulates charging power to keep mains meter around +5A.

Expected behavior
Charging current should stay at current_min (6A in my exemple) as long as mains meter don't drop under 0A.

@dingo35
Copy link
Collaborator

dingo35 commented Nov 1, 2024

Well your expectations are wrong: solar_max_import is exactly that.

I recommend setting solar_max_import to 0A, the solar timer to 60 minutes, and startcurrent at your preferres value, and you will see the behaviour you want!

@dingo35 dingo35 closed this as completed Nov 1, 2024
@TFleury
Copy link
Author

TFleury commented Nov 1, 2024

Sorry, but the documentation says :

solar_max_import

  The maximum current (sum of all phases) of the MainsMeter that can be imported before the solar timer is fired off,
  after expiration the car will stop charging.

So, it's a maximum not a target value and it's supposed to only trigger stop timer, not to regulate at that value.
Maybe it needs an additional parameter like solar_import

@bobosch
Copy link
Collaborator

bobosch commented Nov 3, 2024

@TFleury I also prefer your version of this option, and i added a compile flag to the Smartevse V2 version some years ago
SmartEVSE/SmartEVSE-2@b784585

@bobosch
Copy link
Collaborator

bobosch commented Nov 3, 2024

Yes, there should be two options.

  • The balance point (positive for steady import, negative for steady export)
  • The solar import (to allow start charging before reaching the 6 A surplus)

I also added a compile flag to change the solar import to a per phase value on the V2 version
SmartEVSE/SmartEVSE-2@a58c5cc
because when configuring an import of e.g. 15 A, a 3 phase car waits until some solar power is available, while a 1 phase car starts charging at full speed...

@bobosch bobosch reopened this Nov 3, 2024
@dingo35
Copy link
Collaborator

dingo35 commented Nov 3, 2024

Interesting; but you seem to prefer ImportCurrent = 0 (looking at #ifdef SPECIAL), so then #ifdef ALWAYS is not making any difference anymore ?!

@TFleury
Copy link
Author

TFleury commented Nov 4, 2024

@bobosch thank you for your feedback.
I think the two parameters approach is more interesting than compile flag which involves maintaining a different build.
Are you interested in a PR for that ?

@bobosch
Copy link
Collaborator

bobosch commented Nov 6, 2024

but you seem to prefer ImportCurrent = 0 (looking at #ifdef SPECIAL), so then #ifdef ALWAYS is not making any difference anymore ?!

This was existing code, I don't touched it ...

@bobosch
Copy link
Collaborator

bobosch commented Nov 7, 2024

Maybe It's enough to change the behavior of the START option

{"START", "Surplus energy start Current (per charging phase)", 0, 16, START_CURRENT}
When set to e.g. 1 A it should also allow to draw 5 A from grid (and initiate STOP timer when drawing more)
as mentioned before it must be per charging phase for same behavior...

I have only V2 to test - I will implement it there first. When it works I will need some help to check it on V3

@TFleury
Copy link
Author

TFleury commented Nov 7, 2024

Good idea, it's simple and don't requires new setting.
I will be able to implement and test it on V3.

@bobosch
Copy link
Collaborator

bobosch commented Nov 17, 2024

I tried to merge these commits into V3:
tmp.zip

@TFleury
Copy link
Author

TFleury commented Dec 2, 2024

I think the negative value handling is a bit tricky and it will introduce breaking changes with settings storage and web API.
I just proposed a PR (#70) to avoid start/stop cycles.

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

No branches or pull requests

3 participants