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

Allow fixed phase configuration #3714

Merged
merged 3 commits into from
Jun 27, 2022
Merged

Allow fixed phase configuration #3714

merged 3 commits into from
Jun 27, 2022

Conversation

andig
Copy link
Member

@andig andig commented Jun 26, 2022

Fix #3482

This PR allows configuring fixed phases for switchable chargers. Using

phases: 1/3

will fix the charger's phases. Phase switching is disabled in this mode. evcc will try to establish this setting once in case it has been modified externally.

phases: 0 # or omitted

will put a switchable charger in "auto" which is today's default. The /api/phases allows to specify all three values now:

phases: 0/1/3

where 0 will release the lock and switch back to auto mode. If 1/3 are specified, phases are immediately switched and lock established.

Note: The phase lock is also maintained for any "fast" charging modes, i.e. "Now" will stick to 1p if fixed by config or api.

Todo:

  • check configure (Phasen werden aktuell nicht abgefragt)
  • add more tests

@andig andig added the enhancement New feature or request label Jun 26, 2022
@andig andig requested a review from premultiply June 26, 2022 10:11
@andig andig force-pushed the feature/fixed-phases branch from 8ad92cd to f89979e Compare June 26, 2022 15:02
@@ -112,6 +112,7 @@ type LoadPoint struct {
GuardDuration time.Duration // charger enable/disable minimum holding time

enabled bool // Charger enabled state
phases int // Charger active phases, guarded by mutex
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enabled, not active

@andig andig merged commit 89c908b into master Jun 27, 2022
@andig andig deleted the feature/fixed-phases branch June 27, 2022 11:39
@stefaanbolle
Copy link

stefaanbolle commented Jun 28, 2022

Great feature! Thanks! It could be even more useful if you could set the setting via the UI and change between 1, 3 or auto on a need basis by setting a switch per loadpoint

@andig
Copy link
Member Author

andig commented Jun 28, 2022

Yeah, that's in the backlog.

@Hoelli4C
Copy link

Would it be possible to set this parameter through MQTT then?

@andig
Copy link
Member Author

andig commented Jul 21, 2022

Currently you can only set the current phases. I feel it would be better though, if the semantic of the phases api was actually that it means to set the new default (and adjust current phases to that default). See #3908.

@andig
Copy link
Member Author

andig commented Jul 25, 2022

@Hoelli4C ist umgesetzt

@OJBender
Copy link

Nice thing. For the cloudy days when 1P3P keeps switching, a manual button to remain in one mode may make sense.

@andig
Copy link
Member Author

andig commented Jul 27, 2022

For time being only per API call, button is in discussion.

dontbyte pushed a commit to dontbyte/evcc that referenced this pull request Aug 2, 2022
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 this pull request may close these issues.

Allow phase selection / disabling phase switching
4 participants