evcc icon indicating copy to clipboard operation
evcc copied to clipboard

Tesla Proxy for TWC3 does not wake vehicle from sleep

Open yipikaye opened this issue 2 years ago • 58 comments

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)

yipikaye avatar Feb 16 '24 11:02 yipikaye

Missing tesla trace :(

andig avatar Feb 16 '24 11:02 andig

how do i do that, that was the log, i got rid of my tokens from the log but the rest is the whole trace log

yipikaye avatar Feb 16 '24 11:02 yipikaye

Trace attached

[main  ] INFO 2024/02/16 11:28:04 evcc 0.124.2 (777cb7b7)
[main  ] INFO 2024/02/16 11:28:04 using config file: /etc/evcc.yaml
[main  ] INFO 2024/02/16 11:28:04 starting ui and api at :7070
[tesla-proxy] TRACE 2024/02/16 11:28:06 POST https://auth.tesla.com/oauth2/v3/token
[tesla-proxy] TRACE 2024/02/16 11:28:07 client_id=***&grant_type=refresh_token&refresh_token=***
--
{"access_token":"removed","expires_in":28800,"token_type":"Bearer"}
[tesla-proxy] TRACE 2024/02/16 11:28:07 GET https://tesla.evcc.io/api/1/vehicles
[tesla-proxy] TRACE 2024/02/16 11:28:08 {"response":[{"id":3744513744581445,"vehicle_id":2252134536587332,"vin":"LRWYHCFS3NC428511","color":null,"access_type":"OWNER","display_name":"Blobby","option_codes":null,"granular_access":{"hide_private":false},"tokens":["3ddfb388ab1e37f1","27e4478d1069b778"],"state":"asleep","in_service":false,"id_s":"3744513744581445","calendar_enabled":true,"api_version":71,"backseat_token":null,"backseat_token_updated_at":null,"ble_autopair_enrolled":false}],"count":1}
[twc3  ] TRACE 2024/02/16 11:28:08 GET http://192.168.1.73/api/1/vitals
[twc3  ] TRACE 2024/02/16 11:28:08 {"contactor_closed":false,"vehicle_connected":true,"session_s":29684,"grid_v":238.5,"grid_hz":50.043,"vehicle_current_a":0.2,"currentA_a":0.1,"currentB_a":0.0,"currentC_a":0.2,"currentN_a":0.0,"voltageA_v":5.3,"voltageB_v":1.5,"voltageC_v":0.0,"relay_coil_v":11.9,"pcba_temp_c":26.8,"handle_temp_c":22.7,"mcu_temp_c":34.0,"uptime_s":1249900,"input_thermopile_uv":-207,"prox_v":0.0,"pilot_high_v":8.6,"pilot_low_v":-11.6,"session_energy_wh":12218.101,"config_status":5,"evse_state":4,"current_alerts":[49]}
[site  ] INFO 2024/02/16 11:28:08 site config:
[site  ] INFO 2024/02/16 11:28:08   meters:      grid ✓ pv ✓ battery ✗
[site  ] INFO 2024/02/16 11:28:08     grid:      power ✓ energy ✗ currents ✗
[site  ] INFO 2024/02/16 11:28:08     pv 1:      power ✓ energy ✗ currents ✗
[site  ] INFO 2024/02/16 11:28:08   vehicles:
[site  ] INFO 2024/02/16 11:28:08     vehicle 1: range ✓ finish ✓ status ✓ climate ✗ wakeup ✓
[lp-1  ] INFO 2024/02/16 11:28:08 loadpoint 1:
[lp-1  ] INFO 2024/02/16 11:28:08   mode:        pv
[lp-1  ] INFO 2024/02/16 11:28:08   charger:     power ✓ energy ✗ currents ✓ phases ✗ wakeup ✗
[lp-1  ] INFO 2024/02/16 11:28:08   meters:      charge ✓
[lp-1  ] INFO 2024/02/16 11:28:08     charge:    power ✓ energy ✗ currents ✓
[lp-1  ] DEBUG 2024/02/16 11:28:08 phase timer inactive
[lp-1  ] DEBUG 2024/02/16 11:28:08 pv timer inactive
[lp-1  ] INFO 2024/02/16 11:28:08 vehicle updated: unknown -> Blobby
[main  ] TRACE 2024/02/16 11:28:08 GET https://api.github.com/repos/evcc-io/evcc/releases/latest
[site  ] WARN 2024/02/16 11:28:08 interval <30s can lead to unexpected behavior, see https://docs.evcc.io/docs/reference/configuration/interval
[site  ] DEBUG 2024/02/16 11:28:08 ----
[lp-1  ] DEBUG 2024/02/16 11:28:08 charge power: 0W
[site  ] DEBUG 2024/02/16 11:28:08 pv power: 0W
[site  ] DEBUG 2024/02/16 11:28:08 grid power: 782W
[site  ] DEBUG 2024/02/16 11:28:08 site power: 782W
[tesla-proxy] TRACE 2024/02/16 11:28:08 GET https://tesla.evcc.io/api/1/vehicles/LRWYHCFS3NC428511/vehicle_data
[main  ] TRACE 2024/02/16 11:28:09 {"url":"https://api.github.com/repos/evcc-io/evcc/releases/142064072","assets_url":"https://api.github.com/repos/evcc-io/evcc/releases/142064072/assets","upload_url":"https://uploads.github.com/repos/evcc-io/evcc/releases/142064072/assets{?name,label}","html_url":"https://github.com/evcc-io/evcc/releases/tag/0.124.2","id":142064072,"author":{"login":"andig","id":184815,"node_id":"MDQ6VXNlcjE4NDgxNQ==","avatar_url":"https://avatars.githubusercontent.com/u/184815?v=4","gravatar_id":"","url":"https://api.github.com/users/andig","html_url":"https://github.com/andig","followers_url":"https://api.github.com/users/andig/followers","following_url":"https://api.github.com/users/andig/following{/other_user}","gists_url":"https://api.github.com/users/andig/gists{/gist_id}","starred_url":"https://api.github.com/users/andig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andig/subscriptions","organizations_url":"https://api.github.com/users/andig/orgs","repos_url":"https://api.github.com/users/andig/repos","events_url":"https://api.github.com/users/andig/events{/privacy}","received_events_url":"https://api.github.com/users/andig/received_events","type":"User","site_admin":false},"node_id":"RE_kwDODX4bUs4Id7nI","tag_name":"0.124.2","target_commitish":"master","name":"0.124.2","draft":false,"prerelease":false,"created_at":"2024-02-14T10:32:12Z","published_at":"2024-02-14T22:24:52Z","assets":[{"url":"https://api.github.com/repos/evcc-io/evcc/releases/assets/151597689","id":151597689,"node_id":"RA_kwDODX4bUs4JCTJ5","name":"checksums.txt","label":"","uploader":{"login":"andig","id":184815,"node_id":"MDQ6VXNlcjE4NDgxNQ==","avatar_url":"https://avatars.githubusercontent.com/u/184815?v=4","gravatar_id":"","url":"https://api.github.com/users/andig","html_url":"https://github.com/andig","followers_url":"https://api.github.com/users/andig/followers","following_url":"https://api.github.com/users/andig/following{/other_user}","gists_url":"https://api.github.com/users/andig/gists{/gist_id}","starred_url":"https://api.github.com/users/andig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andig/subscriptions","organizations_url":"https://api.github.com/users/andig/orgs","repos_url":"https://api.github.com/users/andig/repos","events_url":"https://api.github.com/users/andig/events{/privacy}","received_events_url":"https://api.github.com/users/andig/received_events","type":"User","site_admin":false},"content_type":"text/plain; charset=utf-8","state":"uploaded","size":754,"download_count":2,"created_at":"2024-02-14T22:32:03Z","updated_at":"2024-02-14T22:32:04Z","browser_download_url":"https://github.com/evcc-io/evcc/releases/download/0.124.2/checksums.txt"},{"url":"https://api.github.com/repos/evcc-io/evcc/releases/assets/151597686","id":151597686,"node_id":"RA_kwDODX4bUs4JCTJ2","name":"evcc_0.124.2_amd64.deb","label":"","uploader":{"login":"andig","id":184815,"node_id":"MDQ6VXNlcjE4NDgxNQ==","avatar_url":"https://avatars.githubusercontent.com/u/184815?v=4","gravatar_id":"","url":"https://api.github.com/users/andig","html_url":"https://github.com/andig","followers_url":"https://api.github.com/users/andig/followers","following_url":"https://api.github.com/users/andig/following{/other_user}","gists_url":"https://api.github.com/users/andig/gists{/gist_id}","starred_url":"https://api.github.com/users/andig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andig/subscriptions","organizations_url":"https://api.github.com/users/andig/orgs","repos_url":"https://api.github.com/users/andig/repos","events_url":"https://api.github.com/users/andig/events{/privacy}","received_events_url":"https://api.github.com/users/andig/received_events","type":"User","site_admin":false},"content_type":"application/vnd.debian.binary-package","state":"uploaded","size":22635156,"download_count":6,"created_at":"2024-02-14T22:32:00Z","updated_at":"2024-02-14T22:32:03Z","browser_download_url":"https://github.com/evcc-io/evcc/releases/download/0.124.2/evcc_0.124.2_amd64.deb"},{"url":"https://api.github.com/repos/evcc-io/evcc/releases/assets/151597684","id":151597684,"node_id":"RA_kwDODX4bUs4JCTJ0","name":"evcc_0.124.2_arm64.deb","label":"","uploader":{"login":"andig","id":184815,"node_id":"MDQ6VXNlcjE4NDgxNQ==","avatar_url":"https://avatars.githubusercontent.com/u/184815?v=4","gravatar_id":"","url":"https://api.github.com/users/andig","html_url":"https://github.com/andig","followers_url":"https://api.github.com/users/andig/followers","following_url":"https://api.github.com/users/andig/following{/other_user}","gists_url":"https://api.github.com/users/andig/gists{/gist_id}","starred_url":"https://api.github.com/users/andig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andig/subscriptions","organizations_url":"https://api.github.com/users/andig/orgs","repos_url":"https://api.github.com/users/andig/repos","events_url":"https://api.github.com/users/andig/events{/privacy}","received_events_url":"https://api.github.com/users/andig/received_events","type":"User","site_admin":false},"content_type":"application/vnd.debian.binary-package","state":"uploaded","size":20903388,"download_count":1,"created_at":"2024-02-14T22:32:00Z","updated_at":"2024-02-14T22:32:03Z","browser_download_url":"https://github.com/evcc-io/evcc/releases/download/0.124.2/evcc_0.124.2_arm64.deb"},{"url":"https://api.github.com/repos/evcc-io/evcc/releases/assets/151597685","id":151597685,"node_id":"RA_kwDODX4bUs4JCTJ1","name":"evcc_0.124.2_armhf.deb","label":"","uploader":{"login":"andig","id":184815,"node_id":"MDQ6VXNlcjE4NDgxNQ==","avatar_url":"https://avatars.githubusercontent.com/u/184815?v=4","gravatar_id":"","url":"https://api.github.com/users/andig","html_url":"https://github.com/andig","followers_url":"https://api.github.com/users/andig/followers","following_url":"https://api.github.com/users/andig/following{/other_user}","gists_url":"https://api.github.com/users/andig/gists{/gist_id}","starred_url":"https://api.github.com/users/andig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andig/subscriptions","organizations_url":"https://api.github.com/users/andig/orgs","repos_url":"https://api.github.com/users/andig/repos","events_url":"https://api.github.com/users/andig/events{/privacy}","received_events_url":"https://api.github.com/users/andig/received_events","type":"User","site_admin":false},"content_type":"application/vnd.debian.binary-package","state":"uploaded","size":21442836,"download_count":10,"created_at":"2024-02-14T22:32:00Z","updated_at":"2024-02-14T22:32:03Z","browser_download_url":"https://github.com/evcc-io/evcc/releases/download/0.124.2/evcc_0.124.2_armhf.deb"},{"url":"https://api.github.com/repos/evcc-io/evcc/releases/assets/151597659","id":151597659,"node_id":"RA_kwDODX4bUs4JCTJb","name":"evcc_0.124.2_linux-amd64.tar.gz","label":"","uploader":{"login":"andig","id":184815,"node_id":"MDQ6VXNlcjE4NDgxNQ==","avatar_url":"https://avatars.githubusercontent.com/u/184815?v=4","gravatar_id":"","url":"https://api.github.com/users/andig","html_url":"https://github.com/andig","followers_url":"https://api.github.com/users/andig/followers","following_url":"https://api.github.com/users/andig/following{/other_user}","gists_url":"https://api.github.com/users/andig/gists{/gist_id}","starred_url":"https://api.github.com/users/andig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andig/subscriptions","organizations_url":"https://api.github.com/users/andig/orgs","repos_url":"https://api.github.com/users/andig/repos","events_url":"https://api.github.com/users/andig/events{/privacy}","received_events_url":"https://api.github.com/users/andig/received_events","type":"User","site_admin":false},"content_type":"application/gzip","state":"uploaded","size":22526661,"download_count":8,"created_at":"2024-02-14T22:31:57Z","updated_at":"2024-02-14T22:32:00Z","browser_download_url":"https://github.com/evcc-io/evcc/releases/download/0.124.2/evcc_0.124.2_linux-amd64.tar.gz"},{"url":"https://api.github.com/repos/evcc-io/evcc/releases/assets/151597662","id":151597662,"node_id":"RA_kwDODX4bUs4JCTJe","name":"e
[tesla-proxy] TRACE 2024/02/16 11:28:09 {"response":null,"error":"vehicle unavailable: vehicle is offline or asleep","error_description":""}
[lp-1  ] ERROR 2024/02/16 11:28:09 vehicle odometer: asleep
[lp-1  ] DEBUG 2024/02/16 11:28:09 charge voltages: [5.3 1.5 0]V
[lp-1  ] DEBUG 2024/02/16 11:28:09 charge currents: [0.1 0 0.2]A
[lp-1  ] DEBUG 2024/02/16 11:28:09 charger status: B
[lp-1  ] INFO 2024/02/16 11:28:09 car connected
[lp-1  ] DEBUG 2024/02/16 11:28:09 pv timer elapse
[lp-1  ] DEBUG 2024/02/16 11:28:09 pv timer inactive
[lp-1  ] ERROR 2024/02/16 11:28:09 vehicle soc: asleep
[lp-1  ] DEBUG 2024/02/16 11:28:09 pv charge current: 0A = 0A + -3.4A (782W @ 1p)
[lp-1  ] DEBUG 2024/02/16 11:28:09 pv enable timer reset
[lp-1  ] DEBUG 2024/02/16 11:28:09 pv timer inactive
[site  ] DEBUG 2024/02/16 11:28:23 ----
[twc3  ] TRACE 2024/02/16 11:28:23 GET http://192.168.1.73/api/1/vitals
[twc3  ] TRACE 2024/02/16 11:28:23 {"contactor_closed":false,"vehicle_connected":true,"session_s":29699,"grid_v":234.7,"grid_hz":50.050,"vehicle_current_a":0.2,"currentA_a":0.1,"currentB_a":0.0,"currentC_a":0.2,"currentN_a":0.0,"voltageA_v":5.3,"voltageB_v":1.5,"voltageC_v":0.0,"relay_coil_v":11.9,"pcba_temp_c":26.8,"handle_temp_c":22.7,"mcu_temp_c":34.0,"uptime_s":1249915,"input_thermopile_uv":-207,"prox_v":0.0,"pilot_high_v":8.6,"pilot_low_v":-11.6,"session_energy_wh":12218.101,"config_status":5,"evse_state":4,"current_alerts":[49]}
[lp-1  ] DEBUG 2024/02/16 11:28:23 charge power: 0W
[site  ] DEBUG 2024/02/16 11:28:23 pv power: 0W
[site  ] DEBUG 2024/02/16 11:28:24 grid power: 791W
[site  ] DEBUG 2024/02/16 11:28:24 site power: 791W
[tesla-proxy] TRACE 2024/02/16 11:28:24 GET https://tesla.evcc.io/api/1/vehicles/LRWYHCFS3NC428511/vehicle_data
[tesla-proxy] TRACE 2024/02/16 11:28:24 {"response":null,"error":"vehicle unavailable: vehicle is offline or asleep","error_description":""}
[lp-1  ] ERROR 2024/02/16 11:28:24 vehicle odometer: asleep
[lp-1  ] DEBUG 2024/02/16 11:28:24 charge voltages: [5.3 1.5 0]V
[lp-1  ] DEBUG 2024/02/16 11:28:24 charge currents: [0.1 0 0.2]A
[lp-1  ] DEBUG 2024/02/16 11:28:24 charger status: B
[lp-1  ] DEBUG 2024/02/16 11:28:24 pv charge current: 0A = 0A + -3.44A (791W @ 1p)
[site  ] DEBUG 2024/02/16 11:28:38 ----
[twc3  ] TRACE 2024/02/16 11:28:38 GET http://192.168.1.73/api/1/vitals
[twc3  ] TRACE 2024/02/16 11:28:38 {"contactor_closed":false,"vehicle_connected":true,"session_s":29714,"grid_v":236.0,"grid_hz":50.038,"vehicle_current_a":0.2,"currentA_a":0.1,"currentB_a":0.0,"currentC_a":0.2,"currentN_a":0.0,"voltageA_v":5.3,"voltageB_v":1.5,"voltageC_v":0.0,"relay_coil_v":11.8,"pcba_temp_c":26.8,"handle_temp_c":22.6,"mcu_temp_c":34.0,"uptime_s":1249930,"input_thermopile_uv":-207,"prox_v":0.0,"pilot_high_v":8.6,"pilot_low_v":-11.6,"session_energy_wh":12218.101,"config_status":5,"evse_state":4,"current_alerts":[49]}
[lp-1  ] DEBUG 2024/02/16 11:28:38 charge power: 0W
[site  ] DEBUG 2024/02/16 11:28:38 pv power: 0W
[site  ] DEBUG 2024/02/16 11:28:38 grid power: 861W
[site  ] DEBUG 2024/02/16 11:28:38 site power: 861W
[lp-1  ] DEBUG 2024/02/16 11:28:38 charge voltages: [5.3 1.5 0]V
[lp-1  ] DEBUG 2024/02/16 11:28:38 charge currents: [0.1 0 0.2]A
[lp-1  ] DEBUG 2024/02/16 11:28:38 charger status: B
[lp-1  ] DEBUG 2024/02/16 11:28:38 pv charge current: 0A = 0A + -3.74A (861W @ 1p)
[site  ] DEBUG 2024/02/16 11:28:53 ----
[twc3  ] TRACE 2024/02/16 11:28:53 GET http://192.168.1.73/api/1/vitals
[twc3  ] TRACE 2024/02/16 11:28:53 {"contactor_closed":false,"vehicle_connected":true,"session_s":29729,"grid_v":239.1,"grid_hz":50.040,"vehicle_current_a":0.2,"currentA_a":0.1,"currentB_a":0.0,"currentC_a":0.2,"currentN_a":0.0,"voltageA_v":5.3,"voltageB_v":1.5,"voltageC_v":0.0,"relay_coil_v":11.9,"pcba_temp_c":26.8,"handle_temp_c":22.6,"mcu_temp_c":34.0,"uptime_s":1249945,"input_thermopile_uv":-207,"prox_v":1.9,"pilot_high_v":8.6,"pilot_low_v":-11.6,"session_energy_wh":12218.101,"config_status":5,"evse_state":4,"current_alerts":[49]}
[lp-1  ] DEBUG 2024/02/16 11:28:53 charge power: 0W
[site  ] DEBUG 2024/02/16 11:28:53 pv power: 0W
[site  ] DEBUG 2024/02/16 11:28:54 grid power: 831W
[site  ] DEBUG 2024/02/16 11:28:54 site power: 831W
[lp-1  ] DEBUG 2024/02/16 11:28:54 charge voltages: [5.3 1.5 0]V
[lp-1  ] DEBUG 2024/02/16 11:28:54 charge currents: [0.1 0 0.2]A
[lp-1  ] DEBUG 2024/02/16 11:28:54 charger status: B
[lp-1  ] DEBUG 2024/02/16 11:28:54 pv charge current: 0A = 0A + -3.61A (831W @ 1p)
[lp-1  ] DEBUG 2024/02/16 11:28:58 set charge mode: now
[site  ] DEBUG 2024/02/16 11:28:58 ----
[twc3  ] TRACE 2024/02/16 11:28:58 GET http://192.168.1.73/api/1/vitals
[twc3  ] TRACE 2024/02/16 11:28:58 {"contactor_closed":false,"vehicle_connected":true,"session_s":29734,"grid_v":238.0,"grid_hz":50.038,"vehicle_current_a":0.2,"currentA_a":0.1,"currentB_a":0.0,"currentC_a":0.2,"currentN_a":0.3,"voltageA_v":5.3,"voltageB_v":1.5,"voltageC_v":0.0,"relay_coil_v":11.9,"pcba_temp_c":26.8,"handle_temp_c":22.6,"mcu_temp_c":34.0,"uptime_s":1249950,"input_thermopile_uv":-207,"prox_v":0.0,"pilot_high_v":8.6,"pilot_low_v":-11.6,"session_energy_wh":12218.101,"config_status":5,"evse_state":4,"current_alerts":[49]}
[lp-1  ] DEBUG 2024/02/16 11:28:58 charge power: 0W
[site  ] DEBUG 2024/02/16 11:28:58 pv power: 0W
[site  ] DEBUG 2024/02/16 11:28:58 grid power: 722W
[site  ] DEBUG 2024/02/16 11:28:58 site power: 722W
[lp-1  ] DEBUG 2024/02/16 11:28:58 charge voltages: [5.3 1.5 0]V
[lp-1  ] DEBUG 2024/02/16 11:28:58 charge currents: [0.1 0 0.2]A
[lp-1  ] DEBUG 2024/02/16 11:28:58 charger status: B
[tesla-proxy] TRACE 2024/02/16 11:28:58 POST https://tesla.evcc.io/api/1/vehicles/LRWYHCFS3NC428511/command/set_charging_amps
[tesla-proxy] TRACE 2024/02/16 11:29:01 {"charging_amps": 32}
--
{"response":null,"error":"vehicle unavailable: vehicle is offline or asleep","error_description":""}
[lp-1  ] ERROR 2024/02/16 11:29:01 max charge current 32A: 500 Internal Server Error
[site  ] DEBUG 2024/02/16 11:29:08 ----
[twc3  ] TRACE 2024/02/16 11:29:08 GET http://192.168.1.73/api/1/vitals
[twc3  ] TRACE 2024/02/16 11:29:08 {"contactor_closed":false,"vehicle_connected":true,"session_s":29744,"grid_v":234.5,"grid_hz":50.047,"vehicle_current_a":0.2,"currentA_a":0.1,"currentB_a":0.0,"currentC_a":0.2,"currentN_a":0.0,"voltageA_v":5.3,"voltageB_v":1.5,"voltageC_v":0.0,"relay_coil_v":11.9,"pcba_temp_c":26.8,"handle_temp_c":22.6,"mcu_temp_c":34.0,"uptime_s":1249960,"input_thermopile_uv":-207,"prox_v":1.9,"pilot_high_v":8.6,"pilot_low_v":-11.6,"session_energy_wh":12218.101,"config_status":5,"evse_state":4,"current_alerts":[49]}
[lp-1  ] DEBUG 2024/02/16 11:29:08 charge power: 0W
[site  ] DEBUG 2024/02/16 11:29:08 pv power: 0W
[site  ] DEBUG 2024/02/16 11:29:08 grid power: 800W
[site  ] DEBUG 2024/02/16 11:29:08 site power: 800W
[lp-1  ] DEBUG 2024/02/16 11:29:08 charge voltages: [5.3 1.5 0]V
[lp-1  ] DEBUG 2024/02/16 11:29:08 charge currents: [0.1 0 0.2]A
[lp-1  ] DEBUG 2024/02/16 11:29:08 charger status: B
[tesla-proxy] TRACE 2024/02/16 11:29:08 POST https://tesla.evcc.io/api/1/vehicles/LRWYHCFS3NC428511/command/set_charging_amps
[tesla-proxy] TRACE 2024/02/16 11:29:11 {"charging_amps": 32}
--
{"response":null,"error":"vehicle unavailable: vehicle is offline or asleep","error_description":""}
[lp-1  ] ERROR 2024/02/16 11:29:11 max charge current 32A: 500 Internal Server Error
[site  ] DEBUG 2024/02/16 11:29:23 ----
[twc3  ] TRACE 2024/02/16 11:29:23 GET http://192.168.1.73/api/1/vitals
[twc3  ] TRACE 2024/02/16 11:29:23 {"contactor_closed":false,"vehicle_connected":true,"session_s":29760,"grid_v":237.0,"grid_hz":50.050,"vehicle_current_a":0.2,"currentA_a":0.1,"currentB_a":0.0,"currentC_a":0.2,"currentN_a":0.0,"voltageA_v":5.3,"voltageB_v":1.5,"voltageC_v":0.0,"relay_coil_v":11.9,"pcba_temp_c":26.8,"handle_temp_c":22.6,"mcu_temp_c":34.0,"uptime_s":1249976,"input_thermopile_uv":-207,"prox_v":0.0,"pilot_high_v":8.6,"pilot_low_v":-11.6,"session_energy_wh":12218.101,"config_status":5,"evse_state":4,"current_alerts":[49]}
[lp-1  ] DEBUG 2024/02/16 11:29:23 charge power: 0W
[site  ] DEBUG 2024/02/16 11:29:23 pv power: 0W
[site  ] DEBUG 2024/02/16 11:29:24 grid power: 701W
[site  ] DEBUG 2024/02/16 11:29:24 site power: 701W
[lp-1  ] DEBUG 2024/02/16 11:29:24 charge voltages: [5.3 1.5 0]V
[lp-1  ] DEBUG 2024/02/16 11:29:24 charge currents: [0.1 0 0.2]A
[lp-1  ] DEBUG 2024/02/16 11:29:24 charger status: B
[tesla-proxy] TRACE 2024/02/16 11:29:24 POST https://tesla.evcc.io/api/1/vehicles/LRWYHCFS3NC428511/command/set_charging_amps
[tesla-proxy] TRACE 2024/02/16 11:29:26 {"charging_amps": 32}
--
{"response":null,"error":"vehicle unavailable: vehicle is offline or asleep","error_description":""}
[lp-1  ] ERROR 2024/02/16 11:29:26 max charge current 32A: 500 Internal Server Error
[site  ] DEBUG 2024/02/16 11:29:38 ----
[twc3  ] TRACE 2024/02/16 11:29:38 GET http://192.168.1.73/api/1/vitals
[twc3  ] TRACE 2024/02/16 11:29:38 {"contactor_closed":false,"vehicle_connected":true,"session_s":29775,"grid_v":237.5,"grid_hz":50.055,"vehicle_current_a":0.2,"currentA_a":0.1,"currentB_a":0.0,"currentC_a":0.2,"currentN_a":0.1,"voltageA_v":5.3,"voltageB_v":1.5,"voltageC_v":0.0,"relay_coil_v":11.8,"pcba_temp_c":26.8,"handle_temp_c":22.6,"mcu_temp_c":34.0,"uptime_s":1249991,"input_thermopile_uv":-207,"prox_v":0.0,"pilot_high_v":8.6,"pilot_low_v":-11.6,"session_energy_wh":12218.101,"config_status":5,"evse_state":4,"current_alerts":[49]}
[lp-1  ] DEBUG 2024/02/16 11:29:38 charge power: 0W
[site  ] DEBUG 2024/02/16 11:29:38 pv power: 0W
[site  ] DEBUG 2024/02/16 11:29:39 grid power: 788W
[site  ] DEBUG 2024/02/16 11:29:39 site power: 788W
[lp-1  ] DEBUG 2024/02/16 11:29:39 charge voltages: [5.3 1.5 0]V
[lp-1  ] DEBUG 2024/02/16 11:29:39 charge currents: [0.1 0 0.2]A
[lp-1  ] DEBUG 2024/02/16 11:29:39 charger status: B
[tesla-proxy] TRACE 2024/02/16 11:29:39 POST https://tesla.evcc.io/api/1/vehicles/LRWYHCFS3NC428511/command/set_charging_amps
[tesla-proxy] TRACE 2024/02/16 11:29:41 {"charging_amps": 32}
--
{"response":null,"error":"vehicle unavailable: vehicle is offline or asleep","error_description":""}
[lp-1  ] ERROR 2024/02/16 11:29:41 max charge current 32A: 500 Internal Server Error
[site  ] DEBUG 2024/02/16 11:29:53 ----
[twc3  ] TRACE 2024/02/16 11:29:53 GET http://192.168.1.73/api/1/vitals
[twc3  ] TRACE 2024/02/16 11:29:53 {"contactor_closed":false,"vehicle_connected":true,"session_s":29790,"grid_v":237.6,"grid_hz":50.068,"vehicle_current_a":0.2,"currentA_a":0.1,"currentB_a":0.0,"currentC_a":0.2,"currentN_a":0.3,"voltageA_v":5.3,"voltageB_v":1.5,"voltageC_v":0.0,"relay_coil_v":11.9,"pcba_temp_c":26.8,"handle_temp_c":22.6,"mcu_temp_c":34.0,"uptime_s":1250006,"input_thermopile_uv":-207,"prox_v":0.0,"pilot_high_v":8.6,"pilot_low_v":-11.6,"session_energy_wh":12218.101,"config_status":5,"evse_state":4,"current_alerts":[49]}
[lp-1  ] DEBUG 2024/02/16 11:29:53 charge power: 0W
[site  ] DEBUG 2024/02/16 11:29:53 pv power: 0W
[site  ] DEBUG 2024/02/16 11:29:53 grid power: 699W
[site  ] DEBUG 2024/02/16 11:29:53 site power: 699W
[lp-1  ] DEBUG 2024/02/16 11:29:53 charge voltages: [5.3 1.5 0]V
[lp-1  ] DEBUG 2024/02/16 11:29:53 charge currents: [0.1 0 0.2]A
[lp-1  ] DEBUG 2024/02/16 11:29:54 charger status: B
[tesla-proxy] TRACE 2024/02/16 11:29:54 POST https://tesla.evcc.io/api/1/vehicles/LRWYHCFS3NC428511/command/set_charging_amps
[tesla-proxy] TRACE 2024/02/16 11:29:56 {"charging_amps": 32}
--
{"response":null,"error":"vehicle unavailable: vehicle is offline or asleep","error_description":""}
[lp-1  ] ERROR 2024/02/16 11:29:56 max charge current 32A: 500 Internal Server Error

haroldboom avatar Feb 16 '24 11:02 haroldboom

@andig is there an email address i Can message the tesla logs (include tokens). I think i can see the tesla info in the attached file though. Maybe is not what you're after

yipikaye avatar Feb 16 '24 11:02 yipikaye

@haroldboom could you do an

evcc vehicle

when it's asleep? Interesting that the Tesla proxy returns an HTTP 500 when asleep- pretty sure the Fleet API doesn't do that. Could you also try to configure the vehicle once more as tesla (not tesla-proxy) and do the same test again?

andig avatar Feb 16 '24 13:02 andig

@yipikaye there's always [email protected]

andig avatar Feb 16 '24 13:02 andig

Furthermore it seems that retrieving data is different from sending commands:

[tesla-proxy] TRACE 2024/02/16 11:28:24 GET https://tesla.evcc.io/api/1/vehicles/LRWYHCFS3NC428511/vehicle_data
[tesla-proxy] TRACE 2024/02/16 11:28:24 {"response":null,"error":"vehicle unavailable: vehicle is offline or asleep","error_description":""}
[lp-1  ] ERROR 2024/02/16 11:28:24 vehicle odometer: asleep

[tesla-proxy] TRACE 2024/02/16 11:29:54 POST https://tesla.evcc.io/api/1/vehicles/LRWYHCFS3NC428511/command/set_charging_amps
[tesla-proxy] TRACE 2024/02/16 11:29:56 {"charging_amps": 32}
--
{"response":null,"error":"vehicle unavailable: vehicle is offline or asleep","error_description":""}
[lp-1  ] ERROR 2024/02/16 11:29:56 max charge current 32A: 500 Internal Server Error

I.e. we need to handle the HTTP 500 for the latter case.

andig avatar Feb 16 '24 13:02 andig

@haroldboom could you do an

evcc vehicle

when it's asleep? Interesting that the Tesla proxy returns an HTTP 500 when asleep- pretty sure the Fleet API doesn't do that. Could you also try to configure the vehicle once more as tesla (not tesla-proxy) and do the same test again?

See attached outputs, I also did tesla-command vehicle_command.txt vehicle_tesla.txt vehicle_proxy.txt

Also my token had expired and I had to get another one from tesla.evcc.io (i just logged in, I didnt remove and re-add from the Tesla dashboard). Is that normal? I had my test machine shutdown overnight

haroldboom avatar Feb 16 '24 20:02 haroldboom

Is that normal?

No. Needs full trace log in new issue.

andig avatar Feb 16 '24 21:02 andig

Can we try two more things please? Send stop charge commands when vehicle is asleep for command and proxy versions, again with trace log. See cli options for how to.

andig avatar Feb 16 '24 21:02 andig

Can we try two more things please? Send stop charge commands when vehicle is asleep for command and proxy versions, again with trace log. See cli options for how to.

Attached stop_command.txt stop_proxy.txt

haroldboom avatar Feb 16 '24 21:02 haroldboom

Thanks @haroldboom for doing the hard yards on the log collection. My micro raspberry pi doesn't like it much lol

yipikaye avatar Feb 17 '24 03:02 yipikaye

@haroldboom if you run

evcc vehicle --help

you can see the options, so it becomes

evcc vehicle --stop

again, please for command and proxy.

andig avatar Feb 17 '24 09:02 andig

Hey Andy, sorry not sure why my outputs were blank. Here they are attached again: stop_tesla.txt stop_command.txt stop_proxy.txt

Also my token had expired again. It seems to expire when I have the PC shutdown for a few hours. I will create an issue when I get a chance

haroldboom avatar Feb 17 '24 09:02 haroldboom

Also my token had expired again.

Again: this needs a full trace log. And you should stop using the old tesla. It won't work, maybe that's what's killing the token. The other issue is clear, will provide a fix.

andig avatar Feb 17 '24 09:02 andig

Also my token had expired again.

Again: this needs a full trace log. And you should stop using the old tesla. It won't work, maybe that's what's killing the token. The other issue is clear, will provide a fix.

You are probably right it only started happening when I have been playing around with my config. Once this issue is gone I will see if the token expires still, I am thinking it won’t

haroldboom avatar Feb 17 '24 09:02 haroldboom

Can be tested in tomorrows nightly.

andig avatar Feb 17 '24 16:02 andig

Can be tested in tomorrows nightly.

Hey Andy has the nightly been pushed?

haroldboom avatar Feb 18 '24 09:02 haroldboom

@haroldboom I had an update it looks like it was run manually.

infinus avatar Feb 18 '24 16:02 infinus

Last nightly was broken. Should work now, hopefully. Make sure to read https://github.com/evcc-io/evcc/pull/12277 and set control: true.

andig avatar Feb 18 '24 16:02 andig