evcc-io / evcc

Sonne tanken ☀️🚘
https://evcc.io
MIT License
3.47k stars 639 forks source link

Tesla Proxy for TWC3 does not wake vehicle from sleep #12294

Closed yipikaye closed 8 months ago

yipikaye commented 8 months ago

Describe the bug

Vehicle control now works with the new proxy. However when the car goes to sleep the proxy commands do not wake the vehicle.

Steps to reproduce

  1. let the car go to sleep and switched EVCC to fast or minpv and that forces the error for me

Trace logs attached as per discusison here: https://github.com/evcc-io/evcc/issues/11846 ... evcc.log

Configuration details

# open evcc at http://evcc.local:7070
network:
  schema: http
  host: evcc.local # .local suffix announces the hostname on MDNS
  port: 7070

log: info
levels:
  cache: error

# unique installation id
plant: 8asdfdsaf
sponsortoken: asdfasdf
telemetry: true

interval: 15s # control cycle interval

hems:
  type: sma
  allowcontrol: false # set true to allow SHM controlling charger in PV modes

meters:
- name: grid
  type: template
  template: shelly-1pm
  usage: grid
  host: 192.168.86.115
  user: sdfa
  password: asdf
  channel: 0 # optional
  #- name: grid
  #  type: custom
  #  power:
  #  source: const
  # value: 0

chargers:
- type: template
  template: twc3 
  host: 192.168.86.106
  name: TeslaWallCharger

loadpoints:
- title: Carport
  charger: TeslaWallCharger
  mode: pv

vehicles:

site:
  title: Lyrebirds Nest
  meters:
    grid: grid
    pv:
    battery:
  residualPower: 300

tariffs:
  currency: AUD # three letter ISO-4217 currency code (default EUR)
  grid:
    type: fixed
    price: 0.66
  feedin:
    type: fixed
    price: 0.00

# push messages
messaging:
  events:
    start: # charge start event
      title: Charge started
      msg: Started charging in ${mode} mode at ${vehicleSoc:%.0f}% SOC with ${pvPower:%.1fk}kWh 
    stop: # charge stop event
      title: Charge finished
      msg: Finished charging at ${vehicleSoc:%.0f}% SOC with ${chargedEnergy:%.1fk}kWh in ${chargeDuration}
    connect: # vehicle connect event
      title: Car connected
      msg: ${vehicleName} connected at ${pvPower:%.1fk}kWh and ${vehicleSoc:%.0f}% SOC
    disconnect: # vehicle connected event
      title: Car disconnected
      msg: ${vehicleName} disconnected after ${connectedDuration} at ${vehicleSoc:%.0f}% SOC
    soc: # vehicle soc update event
      title: Soc updated
      msg: Battery charged to ${vehicleSoc:%.0f}%
    guest: # vehicle could not be identified
      title: Unknown vehicle
      msg: Unknown vehicle, guest connected?
  services:
   - type: pushover
     app: asdfasdfa
     recipients: 
      - asdfasdf

influx:
  url: http://localhost:8086
  database: evcc
  # user:
  # password:

Log details

attached

What type of operating system are you running?

Linux

Version

evcc version 0.124.2 (777cb7b7)

haroldboom commented 8 months ago

Latest nightly is able to wake the vehicle for charging. Will test today to be sure but looks good @andig

edit: car has been starting and stopping charging all day with my solar output working perfectly!

yipikaye commented 8 months ago

Its so foggy here today I cannot see my front gate so I cannot really test the solar part but I let the car go to sleep then set it to min+ solar. There were a few failures (while the car woke up) then on a retry charging started! :)

So very pleased with this outcome :) Thank you @andig

Stacykid commented 8 months ago

Here again a statement before the last nightly, so only with the official 124.4.

I set EVCC to PV only and plugged it into the car in the morning when it was still dark. After the Tesla had fallen asleep, I set it to Min+PV and it couldn't wake up the car (error 500...) until I opened the Tesla app and woke it up.

Conclusion: with 124.4, the Tesla must not currently fall asleep, otherwise it will not regulate. Once it is awake, it will stay that way due to the constant regulation.

This only concludes the current official version, as I said, without the last Nightly!

silencer2008 commented 1 week ago

Hi all, has this been fixed ? I seem to have the same issue where evcc unable to wake vehicle up. Running latest build on HA add-on. trace attached evcc-20241007-093141-trace.log

andig commented 1 week ago

@silencer2008 without looking at the log: what specific wakeup are you missing, i.e. which situation (using TWC3? BLE proxy?)?

silencer2008 commented 1 week ago

Hi @andig , wakeup using TWC3, this is the error in the trace. {"response":null,"error":"vehicle unavailable: vehicle is offline or asleep","error_description":""}

Car only starts charging after using app to wakeup

andig commented 1 week ago

Question is not answered. In which situation? Restart of evcc? Charge plan? What's your config?

andig commented 1 week ago

Moved to https://github.com/evcc-io/evcc/discussions/16545