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

Tesla: Limit Charging current through Tesla API on 5A #13150

Closed
Duell10111 opened this issue Mar 25, 2024 · 17 comments
Closed

Tesla: Limit Charging current through Tesla API on 5A #13150

Duell10111 opened this issue Mar 25, 2024 · 17 comments
Labels
enhancement New feature or request stale Outdated and ready to close

Comments

@Duell10111
Copy link
Sponsor Contributor

Describe the bug

I am unsure if this should already supported or not therefore this could be an bug report or an feature request.

The problem is that the normal wallboxes only support minimum Current setting as 6A on their site with 3 phases, where as for example a Tesla Vehicle allows 5A as their minimum.
So when there is not enough PV power available for 4,1 kW it would be nice to let evcc start with 3,5 kW which is indeed currently possible by setting 5A as minimum current for the site.

But as the Wallbox do not understand anything under 6A, I currently have to limit it to 5A by myself on vehicle site through the Tesla App.

As evcc already has an integration for the Tesla API, it would be nice if evcc could handle this in this case automatically.
As I looked into the evcc code, I was unsure if evcc is not already setting the current value on vehicle site.

Below I put the logs from my evcc instance in the scenario described above.

Steps to reproduce

  1. Set min current to 5A in site settings
  2. Have only enough PV power available to charge the vehicle with 5A on 3 phases (3,5 kW)
  3. Set the PV Charge mode
  4. Charging starts as evcc thinks it can charge with 5A, but stops after time window as not enough PV while charging with 4,1 kw instead of the desired 3,5 kW

Configuration details

sponsortoken: TOKEN

interval: 10s # control cycle interval

meters:
- type: template
  template: solaredge-hybrid 
  usage: grid  
  host: 192.168.178.10  
  port: 1502  
  timeout: 10s  
  name: grid1
  modbus: tcpip
  id: 1
- type: template
  template: solaredge-hybrid 
  usage: pv  
  host: 192.168.178.10  
  port: 1502  
  timeout: 10s  
  name: pv2
  modbus: tcpip
  id: 1
- type: template
  template: solaredge-hybrid 
  usage: battery  
  host: 192.168.178.10
  port: 1502  
  timeout: 10s  
  name: battery3
  modbus: tcpip
  id: 1

chargers:
  - name: keba
    type: template
    template: keba-modbus 

    # Modbus TCP
    modbus: tcpip
    id: 255
    host: 192.168.178.79
    port: 502 # Port 

vehicles:
- name: Tesla_Model_3_P
  type: template
  template: tesla
  title: Konstantins Tesla
  accessToken: TOKEN
  refreshToken: TOKEN
  vin: VIN # Erforderlich, wenn mehrere Fahrzeuge des Herstellers vorhanden sind # Optional
  capacity: 81 # Akku-Kapazität in kWh # Optional 
- name: Tesla_Model_Y_LR
  type: template
  template: tesla
  title: Papas Tesla
  accessToken: TOKEN
  refreshToken: TOKEN
  vin: VIN # Erforderlich, wenn mehrere Fahrzeuge des Herstellers vorhanden sind # Optional
  capacity: 78 # Akku-Kapazität in kWh # Optional 

loadpoints:
- title: Garage
  charger: keba
  mode: pv # charge mode (off, now, minpv, pv)
#  phases: 3
#  mincurrent: 6
#  maxcurrent: 16
  disable:
    threshold: 200 # maximum import power (W)
    delay: 10m

site:
  title: Mein Zuhause
  meters:
    grid: grid1
    pv:
    - pv2
    battery:
    - battery3
  maxGridSupplyWhileBatteryCharging: 200
  residualPower: 50

Log details

[site  ] INFO 2024/03/25 13:27:05 site config:
[site  ] INFO 2024/03/25 13:27:05   meters:      grid ✓ pv ✓ battery ✓
[site  ] INFO 2024/03/25 13:27:05     grid:      power ✓ energy ✗ currents ✗
[site  ] INFO 2024/03/25 13:27:05     pv 1:      power ✓ energy ✗ currents ✗
[site  ] INFO 2024/03/25 13:27:05     battery 1: power ✓ energy ✗ currents ✗ soc ✓ capacity ✗
[site  ] INFO 2024/03/25 13:27:05   vehicles:
[site  ] INFO 2024/03/25 13:27:05     vehicle 1: range ✓ finish ✓ status ✓ climate ✗ wakeup ✓
[site  ] INFO 2024/03/25 13:27:05     vehicle 2: range ✓ finish ✓ status ✓ climate ✗ wakeup ✓
[lp-1  ] INFO 2024/03/25 13:27:05 loadpoint 1:
[lp-1  ] INFO 2024/03/25 13:27:05   mode:        pv
[lp-1  ] INFO 2024/03/25 13:27:05   charger:     power ✓ energy ✓ currents ✓ phases ✗ wakeup ✗
[lp-1  ] INFO 2024/03/25 13:27:05   meters:      charge ✓
[lp-1  ] INFO 2024/03/25 13:27:05     charge:    power ✓ energy ✓ currents ✓
[site  ] DEBUG 2024/03/25 13:27:05 set buffer soc: 95
[site  ] DEBUG 2024/03/25 13:27:05 set buffer start soc: 95
[site  ] DEBUG 2024/03/25 13:27:05 set priority soc: 50
[site  ] DEBUG 2024/03/25 13:27:05 set battery discharge control: false
[lp-1  ] DEBUG 2024/03/25 13:27:05 set smart cost limit: 0
[lp-1  ] DEBUG 2024/03/25 13:27:05 phase timer inactive
[lp-1  ] DEBUG 2024/03/25 13:27:05 pv timer inactive
[site  ] WARN 2024/03/25 13:27:05 interval <30s can lead to unexpected behavior, see https://docs.evcc.io/docs/reference/configuration/interval
[site  ] DEBUG 2024/03/25 13:27:05 ----
[lp-1  ] DEBUG 2024/03/25 13:27:05 charge power: 0W
[site  ] DEBUG 2024/03/25 13:27:05 pv power: 4286W
[site  ] DEBUG 2024/03/25 13:27:05 battery soc: 54%
[site  ] DEBUG 2024/03/25 13:27:05 battery power: -3637W
[site  ] DEBUG 2024/03/25 13:27:05 grid meter: 2W
[site  ] DEBUG 2024/03/25 13:27:05 site power: -3585W
[lp-1  ] DEBUG 2024/03/25 13:27:05 charge currents: [0 0 0]A
[lp-1  ] DEBUG 2024/03/25 13:27:05 charge total import: 6230.212kWh
[lp-1  ] DEBUG 2024/03/25 13:27:05 charger status: B
[lp-1  ] DEBUG 2024/03/25 13:27:05 charge start energy: 6.23e+03kWh
[lp-1  ] INFO 2024/03/25 13:27:05 car connected
[lp-1  ] DEBUG 2024/03/25 13:27:05 vehicle api refresh
[lp-1  ] DEBUG 2024/03/25 13:27:05 pv timer elapse
[lp-1  ] DEBUG 2024/03/25 13:27:05 pv timer inactive
[lp-1  ] DEBUG 2024/03/25 13:27:05 charge total import: 6230.212kWh
[main  ] DEBUG 2024/03/25 13:27:05 vehicle status: B (Konstantins Tesla)
[main  ] ERROR 2024/03/25 13:27:06 vehicle status: asleep
[lp-1  ] INFO 2024/03/25 13:27:06 vehicle updated: unknown -> Konstantins Tesla
[lp-1  ] DEBUG 2024/03/25 13:27:06 vehicle status: B
[lp-1  ] DEBUG 2024/03/25 13:27:06 vehicle soc: 78%
[lp-1  ] DEBUG 2024/03/25 13:27:06 vehicle soc limit: 79%
[lp-1  ] DEBUG 2024/03/25 13:27:06 vehicle range: 375km
[lp-1  ] DEBUG 2024/03/25 13:27:06 pv charge current: 5.2A = 0A + 5.2A (-3585W @ 3p)
[lp-1  ] DEBUG 2024/03/25 13:27:06 site power -3585W <= 0W enable threshold
[lp-1  ] DEBUG 2024/03/25 13:27:06 pv enable in 0s
[lp-1  ] DEBUG 2024/03/25 13:27:06 pv enable timer elapsed
[lp-1  ] DEBUG 2024/03/25 13:27:06 max charge current: 5A
[lp-1  ] DEBUG 2024/03/25 13:27:06 charger enable
[lp-1  ] DEBUG 2024/03/25 13:27:06 wake-up timer: start
[site  ] DEBUG 2024/03/25 13:27:15 ----
[lp-1  ] DEBUG 2024/03/25 13:27:15 charge power: 3W
[site  ] DEBUG 2024/03/25 13:27:15 pv power: 4296W
[site  ] DEBUG 2024/03/25 13:27:15 battery soc: 54%
[site  ] DEBUG 2024/03/25 13:27:15 battery power: -3645W
[site  ] DEBUG 2024/03/25 13:27:15 grid meter: -1W
[site  ] DEBUG 2024/03/25 13:27:15 site power: -3596W
[lp-1  ] DEBUG 2024/03/25 13:27:15 vehicle odometer: 15191km
[lp-1  ] DEBUG 2024/03/25 13:27:15 charge currents: [0.344 0.269 0.268]A
[lp-1  ] DEBUG 2024/03/25 13:27:15 charge total import: 6230.212kWh
[lp-1  ] DEBUG 2024/03/25 13:27:15 charger status: C
[lp-1  ] DEBUG 2024/03/25 13:27:15 charge start energy: 6.23e+03kWh
[lp-1  ] INFO 2024/03/25 13:27:15 start charging ->
[lp-1  ] DEBUG 2024/03/25 13:27:15 wake-up timer: stop
[lp-1  ] DEBUG 2024/03/25 13:27:15 soc estimated: 78.00% (vehicle: 78.00%)
[lp-1  ] DEBUG 2024/03/25 13:27:15 vehicle soc: 78%
[lp-1  ] DEBUG 2024/03/25 13:27:15 vehicle soc limit: 79%
[lp-1  ] DEBUG 2024/03/25 13:27:15 vehicle range: 375km
[lp-1  ] DEBUG 2024/03/25 13:27:15 pv charge current: 7.56A = 2.34A + 5.21A (-3596W @ 3p)
[lp-1  ] DEBUG 2024/03/25 13:27:15 pv timer reset
[lp-1  ] DEBUG 2024/03/25 13:27:15 pv timer inactive
[lp-1  ] DEBUG 2024/03/25 13:27:15 max charge current: 7A
[site  ] DEBUG 2024/03/25 13:27:25 ----
[lp-1  ] DEBUG 2024/03/25 13:27:25 charge power: 1259W
[site  ] DEBUG 2024/03/25 13:27:25 pv power: 4293W
[site  ] DEBUG 2024/03/25 13:27:25 battery soc: 54%
[site  ] DEBUG 2024/03/25 13:27:25 battery power: -2964W
[site  ] DEBUG 2024/03/25 13:27:25 grid meter: 529W
[site  ] DEBUG 2024/03/25 13:27:25 site power: 579W
[lp-1  ] DEBUG 2024/03/25 13:27:25 charge currents: [5.45 1.29 0.269]A
[lp-1  ] DEBUG 2024/03/25 13:27:25 detected active phases: 2p
[lp-1  ] DEBUG 2024/03/25 13:27:25 charge total import: 6230.213kWh
[lp-1  ] DEBUG 2024/03/25 13:27:25 charger status: C
[lp-1  ] DEBUG 2024/03/25 13:27:25 soc estimated: 78.00% (vehicle: 78.00%)
[lp-1  ] DEBUG 2024/03/25 13:27:25 vehicle soc: 78%
[lp-1  ] DEBUG 2024/03/25 13:27:25 vehicle soc limit: 79%
[lp-1  ] DEBUG 2024/03/25 13:27:25 vehicle range: 375km
[lp-1  ] DEBUG 2024/03/25 13:27:25 pv charge current: 5.74A = 7A + -1.26A (579W @ 2p)
[lp-1  ] DEBUG 2024/03/25 13:27:25 max charge current: 5A
[site  ] DEBUG 2024/03/25 13:27:35 ----
[lp-1  ] DEBUG 2024/03/25 13:27:35 charge power: 4118W
[site  ] DEBUG 2024/03/25 13:27:35 pv power: 4308W
[site  ] DEBUG 2024/03/25 13:27:35 battery soc: 54%
[site  ] DEBUG 2024/03/25 13:27:35 battery power: -414W
[site  ] DEBUG 2024/03/25 13:27:35 grid meter: 935W
[site  ] DEBUG 2024/03/25 13:27:35 site power: 985W
[lp-1  ] DEBUG 2024/03/25 13:27:35 charge currents: [6.02 6.05 6.03]A
[lp-1  ] DEBUG 2024/03/25 13:27:35 detected active phases: 3p
[lp-1  ] DEBUG 2024/03/25 13:27:35 charge total import: 6230.221kWh
[lp-1  ] DEBUG 2024/03/25 13:27:35 charger status: C
[lp-1  ] DEBUG 2024/03/25 13:27:35 soc estimated: 78.01% (vehicle: 78.00%)
[lp-1  ] DEBUG 2024/03/25 13:27:35 vehicle soc: 78%
[lp-1  ] DEBUG 2024/03/25 13:27:35 vehicle soc limit: 79%
[lp-1  ] DEBUG 2024/03/25 13:27:35 vehicle range: 375km
[lp-1  ] DEBUG 2024/03/25 13:27:35 pv charge current: 3.57A = 5A + -1.43A (985W @ 3p)
[lp-1  ] DEBUG 2024/03/25 13:27:35 projected site power 985W >= 200W disable threshold
[lp-1  ] DEBUG 2024/03/25 13:27:35 pv disable timer start: 10m0s
[lp-1  ] DEBUG 2024/03/25 13:27:35 pv disable in 10m0s
[site  ] DEBUG 2024/03/25 13:27:45 ----
[lp-1  ] DEBUG 2024/03/25 13:27:45 charge power: 4125W
[site  ] DEBUG 2024/03/25 13:27:45 pv power: 4312W
[site  ] DEBUG 2024/03/25 13:27:45 battery soc: 54%
[site  ] DEBUG 2024/03/25 13:27:45 battery power: 502W
[site  ] DEBUG 2024/03/25 13:27:45 grid meter: 2W
[site  ] DEBUG 2024/03/25 13:27:45 site power: 554W
[lp-1  ] DEBUG 2024/03/25 13:27:45 charge currents: [6.03 6.05 6.03]A
[lp-1  ] DEBUG 2024/03/25 13:27:45 detected active phases: 3p
[lp-1  ] DEBUG 2024/03/25 13:27:45 charge total import: 6230.232kWh
[lp-1  ] DEBUG 2024/03/25 13:27:45 charger status: C
[lp-1  ] DEBUG 2024/03/25 13:27:45 soc estimated: 78.02% (vehicle: 78.00%)
[lp-1  ] DEBUG 2024/03/25 13:27:45 vehicle soc: 78%
[lp-1  ] DEBUG 2024/03/25 13:27:45 vehicle soc limit: 79%
[lp-1  ] DEBUG 2024/03/25 13:27:45 vehicle range: 375km
[lp-1  ] DEBUG 2024/03/25 13:27:45 pv charge current: 4.2A = 5A + -0.803A (554W @ 3p)
[lp-1  ] DEBUG 2024/03/25 13:27:45 projected site power 554W >= 200W disable threshold
[lp-1  ] DEBUG 2024/03/25 13:27:45 pv disable in 9m50s
[lp-1  ] DEBUG 2024/03/25 13:27:45 pv disable timer remaining: 9m50s
[site  ] DEBUG 2024/03/25 13:27:55 ----
[lp-1  ] DEBUG 2024/03/25 13:27:55 charge power: 4116W
[site  ] DEBUG 2024/03/25 13:27:55 pv power: 4295W
[site  ] DEBUG 2024/03/25 13:27:55 battery soc: 54%
[site  ] DEBUG 2024/03/25 13:27:55 battery power: 526W
[site  ] DEBUG 2024/03/25 13:27:55 grid meter: -13W
[site  ] DEBUG 2024/03/25 13:27:55 site power: 563W
[lp-1  ] DEBUG 2024/03/25 13:27:55 charge currents: [6.01 6.04 6.02]A
[lp-1  ] DEBUG 2024/03/25 13:27:55 detected active phases: 3p
[lp-1  ] DEBUG 2024/03/25 13:27:55 charge total import: 6230.244kWh
[lp-1  ] DEBUG 2024/03/25 13:27:55 charger status: C
[lp-1  ] DEBUG 2024/03/25 13:27:55 soc estimated: 78.04% (vehicle: 78.00%)
[lp-1  ] DEBUG 2024/03/25 13:27:55 vehicle soc: 78%
[lp-1  ] DEBUG 2024/03/25 13:27:55 vehicle soc limit: 79%
[lp-1  ] DEBUG 2024/03/25 13:27:55 vehicle range: 375km
[lp-1  ] DEBUG 2024/03/25 13:27:55 pv charge current: 4.18A = 5A + -0.816A (563W @ 3p)
[lp-1  ] DEBUG 2024/03/25 13:27:55 projected site power 563W >= 200W disable threshold
[lp-1  ] DEBUG 2024/03/25 13:27:55 pv disable in 9m40s
[lp-1  ] DEBUG 2024/03/25 13:27:55 pv disable timer remaining: 9m40s

What type of operating system are you running?

Linux

Version

0.124.10

@Duell10111 Duell10111 changed the title Tesla: Limit Charging current through Tesla API Tesla: Limit Charging current through Tesla API on 5A Mar 25, 2024
@mucki12
Copy link

mucki12 commented Mar 25, 2024

evcc setzt bereits heute die Stromstärke über die Tesla API (ab 1A). Allerdings bis jetzt nur in der Kombination TWC3+Tesla.
Bei dir erfolgt die Steuerung über die Keba und die kann wie alle anderen auch nicht unter 6A.

@Duell10111
Copy link
Sponsor Contributor Author

@mucki12
Ah okay, gut zu wissen dann ist das hier doch ein Feature Request und kein Bug Report. :D

@andig
Copy link
Member

andig commented Mar 25, 2024

Ah okay, gut zu wissen dann ist das hier doch ein Feature Request und kein Bug Report. :D

Nein, die KEBA kann das nicht. Tesla ohne Keba wäre dann sowas wie #13062.

@premultiply da das Fahrzeug das kann wäre es steuerungstechnisch auch spannend zu überlegen, ob sich das sinnvoll alternativ über entweder Charger oder Fahrzeug steuern ließe. Wäre aber keine Prio für mich?

@andig andig added the enhancement New feature or request label Mar 25, 2024
@Duell10111

This comment was marked as resolved.

@Duell10111

This comment was marked as off-topic.

@andig
Copy link
Member

andig commented Mar 28, 2024

@Duell10111 OT

@Duell10111
Copy link
Sponsor Contributor Author

Duell10111 commented Mar 28, 2024

@andig
Ich habe mal einen Draft MR erstellt, indem die Stromstärke auch auf Fahrzeugseite gesetzt wird.
Testen kann ich aktuell nicht da ich keine Tesla Client ID und Secret habe. :(
#13192

Man könnte das vlt. noch anpassen das es auf Fahrzeugseite nur gesetzt wird wenn das Fahrzeug niedrigere Ampere unterstützt als die Wallbox, aber dafür müsste man diese Werte irgendwie herbekommen von den Wallbox bzw. Fahrzeug...

@umrath
Copy link

umrath commented Apr 11, 2024

evcc setzt bereits heute die Stromstärke über die Tesla API (ab 1A). Allerdings bis jetzt nur in der Kombination TWC3+Tesla. Bei dir erfolgt die Steuerung über die Keba und die kann wie alle anderen auch nicht unter 6A.

Das "alle" ist definitiv so nicht richtig.
go-e kann definitiv mit 5A umgehen. Man kann es zwar nicht an der Wallbox selbst einstellen - aber wenn das Auto auf 5A reduziert, macht die go-e das problemlos mit.

Ich kann mir gut vorstellen, dass andere Wallboxen das auch können.

@mucki12
Copy link

mucki12 commented Apr 11, 2024

@umrath
Danke für die (ungewollte?) Bestätigung. Die go-e wird auf 6A geregelt und da die Steuerung über das Fahrzeug erfolgt ruft dieses 5A ab.

@andig
Copy link
Member

andig commented Apr 11, 2024

Ich kann mir gut vorstellen, dass andere Wallboxen das auch können.

Dieser Satz kein Inhalt da das mit der WB absolut nichts zu tun hat. Genauso könntest Du auch sagen, dass sie sogar bei Vollmond lädt.

@josefzahner

This comment was marked as off-topic.

@andig

This comment was marked as off-topic.

@josefzahner

This comment was marked as off-topic.

@andig

This comment was marked as off-topic.

@josefzahner
Copy link

josefzahner commented Apr 18, 2024

Ok fair enough, das hat nichts mit der Wallbox zu tun, ich dachte genau das sei dein Kritikpunkt.

Dann verstehe ich aber nicht warum man dann scheinbar in EVCC mit Tesla und einer Tesla (dummen?) Wallbox die Steuerung übers Auto zulässt, das aber bei allen anderen Boxen tunlichst nicht möchte. Weil genau das wär ja dann das tolle, zum Beispiel alles unter 6A über Tesla API, alles drüber über die Wallbox. Oder alles über den Tesla statt über die Wallbox, braucht halt einfach mehr Tesla API Calls

@andig
Copy link
Member

andig commented Apr 18, 2024

Was heisst denn zulassen? Der TWC kann es nicht anders und Sinn dieses Issues hier ist doch genau diese Erweiterung für alle Boxen zu diskutieren.

@josefzahner
Copy link

josefzahner commented Apr 18, 2024

Ok dann fassen wir mal zusammen, für mich hats von aussen so ausgesehen als ob EVCC die Steuerung nur über die Wallbox erlauben möchte - und explizit nicht das Auto steuern möchte. Und da bin ich nicht der einzige, wenn man Forenbeiträge ausserhalb anschaut. Aber scheinbar ist ja hier der richtige Ort um das zu diskutieren und die Annahme war wohl falsch - dann habe ich nichts gesagt. Weiter gehts :-)

@github-actions github-actions bot added the stale Outdated and ready to close label May 9, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale Outdated and ready to close
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants