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: SoC wird nicht aktualisiert #8130

Closed
sebnaf opened this issue May 22, 2023 · 6 comments
Closed

Tesla: SoC wird nicht aktualisiert #8130

sebnaf opened this issue May 22, 2023 · 6 comments
Labels
question Rather clarification than issue

Comments

@sebnaf
Copy link

sebnaf commented May 22, 2023

Describe the bug

Ich habe mir mal die Mühe gemacht evcc basierend auf aktueller Doku einzurichten. Interessanterweise aktualisiert Tesla nicht richtig: ich stecke das Auto Abends an, es wird erkannt. Dann jedoch über 24h der SoC nicht aktualisiert. Das Auto ist wach. Tesla-App und Tronity zeigt es richtig an. Wechsle ich zu Tronity und wieder zurück wird der SoC richtig ausgelesen und die Ladung beginnt.
Ich hatte früher einen Cache-Parameter aktiv welcher heute nicht mehr erkannt wird.

Das Tracelog zeigt, dass beim

  • Einstecken der SoC gelesen wird
  • beim manuellen Wechsel zwischen den Autos
    dann aber nicht mehr bis PV Überschuss vorhanden ist und geladen wird.

Hier liegt das Problem: Wenn ich mit 80% SoC einstecke und auf 80% SoC laden möchte wird die Ladung nie aktiv.

Idee: Alle n Minuten nach dem SoC fragen.
Ich glaube, das war in der alten Config sogar ein Parameter in Verbindung mit "Cache"

img_3197_720
img_3198_720
img_3199_720

Steps to reproduce

...

Configuration details

vehicles:
  - type: template
    template: tesla
    title: EM-IL 55 E
    capacity: 78
    accessToken: ey
    refreshToken: ey
    vin: LRW
    phases: 0
    icon: car
    mode: pv
    minSoc: 20
    targetSoc: 80
    minCurrent: 6
    maxCurrent: 16
    name: tesla
    #cache: 15m

  - type: template
    template: tronity
    title: EM-IL 55 E (Tronity)
    user: 6e
    password: 31
    capacity: 78
    phases: 0
    icon: car
    mode: pv
    minSoc: 20
    targetSoc: 80
    minCurrent: 6
    maxCurrent: 16
    name: ev3

Log details

[tesla ] TRACE 2023/05/21 21:48:06 GET https://owner-api.teslamotors.com/api/1/vehicles

und dann wieder

[tesla ] TRACE 2023/05/22 09:16:48 GET https://owner-api.teslamotors.com/api/1/vehicles/

What type of operating system are you running?

HomeAssistant Add-on

Version

0.117.3

@andig andig added the bug Something isn't working label May 23, 2023
@andig
Copy link
Member

andig commented May 27, 2023

Without full log and config it's unclear what's going on.

@andig andig closed this as completed May 27, 2023
@andig andig added question Rather clarification than issue and removed bug Something isn't working labels May 27, 2023
@sebnaf
Copy link
Author

sebnaf commented Jun 6, 2023

Hi Andi,

plugged in yesterday at 22:31 with 77% SoC.
SoC dropped to 73% this morning (Tesla app).
evcc still showing 77% SoC

After charge start (PV available) the SoC got updated.

I do see the following issues in this case:

  • if read out SoC during plug in process is equal or larger than desired SoC the charge never starts
  • evcc UI should be in sync with the SoC read out by other tools like tesla app or tronity
  • reading out of SoC during charge should be improved. I always see a overshooting if charging 3p to e.g. target SoC: 80%, often stops at 85%, 87% or even higher.

Logfile attached.

Thank you, @andig !

evcc-latest (1).csv

@andig andig reopened this Jun 6, 2023
@andig
Copy link
Member

andig commented Jun 6, 2023

Config fehlt weiterhin :(

@andig andig closed this as completed Jun 6, 2023
@sebnaf
Copy link
Author

sebnaf commented Jun 6, 2023

Sorry, ich dachte der Auszug oben reicht.

network:
  schema: http
  host: evcc.local
  port: 7070

interval: 10s # control cycle interval
plant: 2d22a

sponsortoken: eyJhb

telemetry: true

# log settings
log: debug
levels:
  site: debug
  lp-1: debug
  lp-2: debug
  cache: debug
  db: debug
  vehicle: debug
  tesla: trace
  elektronenpumpe: debug

# meter definitions
meters:
  - name: grid
    type: movingaverage
    decay: 0.2
    meter:
      type: custom
      power:
        source: modbus
        model: sunspec
        uri: 10.10.20.7:502
        id: 1
        subdevice: 1
        value: 203:W
        scale: -1.09
        # decay: 0.7
        #timeout: 2000
  - name: pv
    type: custom
    power:
      source: modbus
      model: sunspec
      uri: 10.10.20.7:502
      id: 1
      value: 101:W
      #timeout: 2000

# charger definitions
chargers:
  - name: elektronenpumpe
    type: go-e
    uri: http://10.10.20.22
    # token: 
    # cache: 10s # go-e cloud API cache duration

# vehicle definitions
vehicles:
  - type: template
    template: tesla
    title: EM-IL 55 E
    capacity: 78
    accessToken: 
    refreshToken: 
    vin: LRW
    phases: 0
    icon: car
    mode: pv
    minSoc: 20
    targetSoc: 80
    minCurrent: 6
    maxCurrent: 16
    name: tesla
    #cache: 15m

  - type: template
    template: tronity
    title: EM-IL 55 E (Tronity)
    user: 
    password: 
    capacity: 78
    phases: 0
    icon: car
    mode: pv
    minSoc: 20
    targetSoc: 80
    minCurrent: 6
    maxCurrent: 16
    name: ev3

# site describes the EVU connection, PV and home battery
site:
  title: Home # display name for UI
  meters:
    grid: grid # grid meter
    pvs:
      - pv # list of pv inverters/ meters

# loadpoint describes the charger, charge meter and connected vehicle
loadpoints:
  - title: Elektronenpumpe # display name for UI
    charger: elektronenpumpe # charger
    #meters:
    #  charge: charge # charge meter
    mode: pv
    resetOnDisconnect: true
    soc:
    phases: 0 # ev phases (default 3)
    enable: # pv mode enable behavior
      delay: 10m # threshold must be exceeded for this long
      threshold: -1500 # minimum export power (W). If zero, export must exceed minimum charge power to enable
    disable: # pv mode disable behavior
      delay: 15m # threshold must be exceeded for this long
      threshold: 0 # maximum import power (W)
    guardduration: 15m # switch charger contactor not more often than this (default 10m)
    mincurrent: 6 # minimum charge current (default 6A)
    maxcurrent: 16 # maximum charge current (default 16A)

# tariffs are the fixed or variable tariffs
# cheap (tibber/awattar) can be used to define a tariff rate considered cheap enough for charging
tariffs:
  currency: EUR # (default EUR)
  grid:
    # either
    type: tibber
    #cheap: 0.25 # [currency]/kWh
    token: "6-" # access token
    # homeid: "c" # optional if multiple homes associated to account
  feedin:
    type: fixed
    price: 0.065 # [currency]/kWh

# mqtt message broker
#mqtt:
#  broker: 10.0.55.22:1883
#  topic: evcc
#  user: mqtt
#  password: mqtt

influx:
  url: http://10.0.55.22:8086
  database: evcc
  user: 
  password: 

# eebus credentials
eebus:
  # uri: # :4712
  # interfaces: # limit eebus to specific network interfaces
  # - en0
  # certificate: # local signed certificate, required, can be generated via `evcc eebus-cert`
  #   public: # public key
  #   private: # private key

# push messages
messaging:
  events:
    start: # charge start event
      title: Charge of {{.vehicleTitle}} started
      msg: |
        Wallbox {{.title}} started charging {{.vehicleTitle}} in {{ toString .mode | upper }} mode.
        --------------------------
        evcc Status {{printf `(%d-%02d-%02d %02d:%02d:%02d)` now.Year now.Month now.Day now.Hour now.Minute now.Second}}
        Netz-Leistung: {{round (divf .gridPower 1000) 3 }} kW
        Solar-Leistung: {{round (divf .pvPower 1000) 3 }} kW
        Eigenverbrauch: {{round (divf .homePower 1000) 3 }} kW
        {{if .batteryConfigured}}Batteriespeicher-Status: {{round (divf .batteryPower 1000) 3 }} kW ({{.batterySoc }} %){{end}}
    stop: # charge stop event
      title: Charge of {{.vehicleTitle}} finished
      msg: |
        Wallbox {{.title}} finished charging {{.vehicleTitle}} 
        with {{round (divf .chargedEnergy 1000) 2 }} kWh in {{.chargeDuration}}.
        --------------------------
        evcc Status {{printf `(%d-%02d-%02d %02d:%02d:%02d)` now.Year now.Month now.Day now.Hour now.Minute now.Second}}
        Netz-Leistung: {{round (divf .gridPower 1000) 3 }} kW
        Solar-Leistung: {{round (divf .pvPower 1000) 3 }} kW
        Eigenverbrauch: {{round (divf .homePower 1000) 3 }} kW
        {{if .batteryConfigured}}Batteriespeicher-Status: {{round (divf .batteryPower 1000) 3 }} kW ({{.batterySoc }} %){{end}}
    connect: # vehicle connect event
      title: "{{.vehicleTitle}} connected on wallbox {{.title}}"
      msg: |
        {{.vehicleTitle}} connected on wallbox {{.title}} at {{round (divf .pvPower 1000) 2 }} kW PV.
        --------------------------
        evcc Status {{printf `(%d-%02d-%02d %02d:%02d:%02d)` now.Year now.Month now.Day now.Hour now.Minute now.Second}}
        Netz-Leistung: {{round (divf .gridPower 1000) 3 }} kW
        Solar-Leistung: {{round (divf .pvPower 1000) 3 }} kW
        Eigenverbrauch: {{round (divf .homePower 1000) 3 }} kW
        {{if .batteryConfigured}}Batteriespeicher-Status: {{round (divf .batteryPower 1000) 3 }} kW ({{.batterySoc }} %){{end}}
    disconnect: # vehicle connected event
      title: "{{.vehicleTitle}} disconnected of wallbox {{.title}}"
      msg: |
        {{.vehicleTitle}} disconnected of wallbox {{.title}} after {{.connectedDuration}}.
        --------------------------
        evcc Status {{printf `(%d-%02d-%02d %02d:%02d:%02d)` now.Year now.Month now.Day now.Hour now.Minute now.Second}}
        Netz-Leistung: {{round (divf .gridPower 1000) 3 }} kW
        Solar-Leistung: {{round (divf .pvPower 1000) 3 }} kW
        Eigenverbrauch: {{round (divf .homePower 1000) 3 }} kW
        {{if .batteryConfigured}}Batteriespeicher-Status: {{round (divf .batteryPower 1000) 3 }} kW ({{.batterySoc }} %){{end}}
    guest: # vehicle could not be identified
      title: Unknown vehicle
      msg: Unknown vehicle, guest connected?
  services:
    - type: pushover
      app: a
      recipients:
        - u
  # - type: pushover
  #   app: # app id
  #   recipients:
  #   - # list of recipient ids
  # - type: telegram
  #   token: # bot id
  #   chats:
  #   - # list of chat ids
  # - type: email
  #   uri: smtp://<user>:<password>@<host>:<port>/?fromAddress=<from>&toAddresses=<to>

@RTTTC
Copy link
Contributor

RTTTC commented Jun 6, 2023

Use poll connected configuration in loadpoints: ?
https://github.com/evcc-io/evcc/blob/master/evcc.dist.yaml

@andig
Copy link
Member

andig commented Jun 6, 2023

Exactly. You have poll: charging and that's exactly what happens. Seems you'd want poll: connected. We'd still need to see how/when you would wake up the Tesla then, similar to #8254.

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

No branches or pull requests

3 participants