evcc-io / evcc

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

Easee: vehicle remote charge start: unexpected status: 403 #1750

Closed suhl-cloudian closed 2 years ago

suhl-cloudian commented 2 years ago

Describe the bug I build the latest version from 15.10.2021 to test the Easee per Wallbox implementation by cloning the repo and building it. When I start/stop the charge from the EVCC GUI I get the follwing error:

[lp-1 ] ERROR 2021/10/16 11:52:19 vehicle remote charge start: unexpected status: 403 or [lp-1 ] ERROR 2021/10/16 11:51:50 vehicle remote charge stop: unexpected status: 403

It looks like everything is working like expected. Means the charging stops and starts. Just this error is popping up in the interface. The logs are set to "trace", but no other info is logged:

To Reproduce Steps to reproduce the behavior:

  1. Go to 'EVCC GUI'
  2. Click on 'STOP' or 'NOW'
  3. See error

Expected behavior Surpress the error message if everything is working fine.

EVCC details: Show output of evcc -v:

evcc version 0.65 (270a29a)
Show output of evcc dump -c configfile:
```
evcc$ evcc dump -c configfile
Unsupported Config Type ""
```
Show evcc configuration file evcc.yaml:
```
uri: 0.0.0.0:7070 # uri for ui
interval: 10s # control cycle interval

# sponsor token enables optional features (request at https://cloud.evcc.io)
sponsortoken: xxxxx

# log settings
log: error
levels:
  core: debug
  lp-1: trace
  lp-2: trace

# meter definitions
# name can be freely chosen and is used as reference when assigning meters to site and loadpoints
# for examples see https://github.com/evcc-io/config#meters
meters:
- name: gridmeter # Name des Zählers. Falls du diesen änderst, musst du die site-Konfiguration auch anpassen.
  type: custom   # Typ des Zählers
  power:
    # Wir simulieren die Leistung über ein Shellscript, das 1000 Watt zurückgibt.
    # Positive Werte bedeuten einen Strombezug im Netz.
    type: script
    cmd: /bin/sh -c 'echo 1000'

# charger definitions
# name can be freely chosen and is used as reference when assigning charger to vehicle
# for examples see https://github.com/evcc-io/config#chargers
chargers:
- name: easee-garage
  type: easee # Wallbe charger
  user: xxxxx
  password: xxxxx
  charger: EHxxxxx37942
  cache: 10s
- name: easee-stellplatz
  type: easee
  user: xxxxx
  password: xxxxx
  charger: xxxxx
  cache: 10s

# vehicle definitions
# name can be freely chosen and is used as reference when assigning vehicle to loadpoint
# for examples see https://github.com/evcc-io/config#vehicles
vehicles:
- type: tronity
  title: Corsa-e # display name for UI
  capacity: 50 # kWh
  credentials:
    id: xxxxx
    secret: xxxxx
  vin: xxxxx
  name: Speedy
- type: tronity
  title: Model 3 # display name for UI
  capacity: 75 # kWh
  credentials:
    id: xxxxx
    secret: xxxxx
  vin: xxxxx
  name: Rodney

# site describes the EVU connection, PV and home battery
site:
  title: Home # display name for UI
  meters:
    grid: gridmeter # grid meter
    pv:  # pv meter
    battery:  # battery meter
#  prioritySoC: 60 # give home battery priority up to this soc (0 to disable)

# loadpoint describes the charger, charge meter and connected vehicle
loadpoints:
- title: Stellplatz # display name for UI
  charger: easee-stellplatz # charger
  meters:
    charge:  # charge meter
  vehicle: Rodney 
  mode: now
  soc:
    # polling defines usage of the vehicle APIs
    # Modifying the default settings it NOT recommended. It MAY deplete your vehicle's battery
    # or lead to vehicle manufacturer banning you from API use. USE AT YOUR OWN RISK.
    poll:
      # poll mode defines under which condition the vehicle API is called:
      #   charging: update vehicle ONLY when charging (this is the recommended default)
      #   connected: update vehicle when connected (not only charging), interval defines how often
      #   always: always update vehicle regardless of connection state, interval defines how often (only supported for single vehicle)
      mode: connected
      # poll interval defines how often the vehicle API may be polled if NOT charging
      interval: 15m
    min: 30 # immediately charge to 0% regardless of mode unless "off" (disabled)
    target: 70 # always charge to 100%
    #target: 100 # always charge to 100%
    estimate: true # set true to interpolate between api updates

- title: Garage # display name for UI
  charger: easee-garage # charger
  meters:
    charge:  # charge meter
  vehicle: Speedy
  mode: now
  soc:
    # polling defines usage of the vehicle APIs
    # Modifying the default settings it NOT recommended. It MAY deplete your vehicle's battery
    # or lead to vehicle manufacturer banning you from API use. USE AT YOUR OWN RISK.
    poll:
      # poll mode defines under which condition the vehicle API is called:
      #   charging: update vehicle ONLY when charging (this is the recommended default)
      #   connected: update vehicle when connected (not only charging), interval defines how often
      #   always: always update vehicle regardless of connection state, interval defines how often (only supported for single vehicle)
      mode: connected
      # poll interval defines how often the vehicle API may be polled if NOT charging
      interval: 15m
    min: 30 # immediately charge to 0% regardless of mode unless "off" (disabled)
    target: 80 # always charge to 100%
    #target: 100 # always charge to 100%
    estimate: true # set true to interpolate between api updates

# tariffs are the fixed or variable tariffs
# cheap can be used to define a tariff rate considered cheap enough for charging
tariffs:
  grid:
    # # either
    # type: tibber
    # cheap: 20 # ct/kWh
    # token: "4XXXX39529478ebd690d35ddd80e3308ffc49b59c65b142321aee963a4" # access token
    # homeid: "XXXXX-8cbf-4595-9bf7-c3cf192f7d9c" # optional if multiple homes associated to account

    # # or
    # type: awattar
    # cheap: 20 # ct/kWh
    # region: de # optional, choose at for Austria

# mqtt message broker
mqtt:
  # broker: localhost:1883
  # topic: evcc # root topic for publishing, set empty to disable
  # user:
  # password:

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

# eebus credentials
eebus:
  # uri: # :4712
  # public: # public key
  # private: # private key

# push messages
messaging:
  events:
    start: # charge start event
      title: Charge started
      msg: Started charging in "${mode}" mode
    stop: # charge stop event
      title: Charge finished
      msg: Finished charging ${chargedEnergy:%.1fk}kWh in ${chargeDuration}.
    connect: # vehicle connect event
      title: Car connected
      msg: "Car connected at ${pvPower:%.1fk}kW PV"
    disconnect: # vehicle connected event
      title: Car disconnected
      msg: Car disconnected after ${connectedDuration}
  services:
  # - type: pushover
  #   app: # app id
  #   recipients:
  #   - # list of recipient ids
  - type: telegram
    token: XXXX # bot id
    chats: -523509503
  #   - # list of chat ids
  # - type: email
  #   uri: smtp://:@:/?fromAddress=&toAddresses=

```

Show evcc log output with --log debug:

```
[lp-1  ] INFO 2021/10/16 11:51:50 set charge mode: off
[lp-1  ] DEBUG 2021/10/16 11:51:50 charge power: 10688W
[lp-1  ] DEBUG 2021/10/16 11:51:50 charge currents: [0 0 0]A
[lp-1  ] DEBUG 2021/10/16 11:51:50 charger status: C
[lp-1  ] DEBUG 2021/10/16 11:51:50 next soc poll remaining time: 14m46s
[lp-1  ] DEBUG 2021/10/16 11:51:50 soc estimated: 73.45% (vehicle: 71.00%)
[lp-1  ] DEBUG 2021/10/16 11:51:50 vehicle soc: 73%
[lp-1  ] DEBUG 2021/10/16 11:51:50 vehicle range: 379km
[lp-1  ] ERROR 2021/10/16 11:51:50 vehicle remote charge stop: unexpected status: 403
[lp-1  ] DEBUG 2021/10/16 11:51:51 charger disable
[lp-1  ] DEBUG 2021/10/16 11:51:56 charge power: 9419W
[lp-1  ] DEBUG 2021/10/16 11:51:56 charge currents: [0 0 0]A
[lp-1  ] DEBUG 2021/10/16 11:51:56 charger status: B
[lp-1  ] INFO 2021/10/16 11:51:56 stop charging <-
[lp-1  ] DEBUG 2021/10/16 11:51:56 soc estimated: 73.45% (vehicle: 71.00%)
[lp-1  ] DEBUG 2021/10/16 11:51:56 vehicle soc: 73%
[lp-1  ] DEBUG 2021/10/16 11:51:56 vehicle range: 379km
[lp-2  ] DEBUG 2021/10/16 11:52:06 charge power: 0W
[lp-2  ] DEBUG 2021/10/16 11:52:06 charge currents: [15.6 15.8 15.6]A
[lp-2  ] DEBUG 2021/10/16 11:52:06 charger status: A
[lp-1  ] DEBUG 2021/10/16 11:52:16 charge power: 0W
[lp-1  ] DEBUG 2021/10/16 11:52:16 charge currents: [0 0 0]A
[lp-1  ] DEBUG 2021/10/16 11:52:16 charger status: B
[lp-1  ] DEBUG 2021/10/16 11:52:16 next soc poll remaining time: 14m39s
[lp-1  ] INFO 2021/10/16 11:52:18 set charge mode: now
[lp-1  ] DEBUG 2021/10/16 11:52:18 charge power: 0W
[lp-1  ] DEBUG 2021/10/16 11:52:18 charge currents: [0 0 0]A
[lp-1  ] DEBUG 2021/10/16 11:52:18 charger status: B
[lp-1  ] DEBUG 2021/10/16 11:52:18 next soc poll remaining time: 14m37s
[lp-1  ] DEBUG 2021/10/16 11:52:18 charger enable
[lp-1  ] ERROR 2021/10/16 11:52:19 vehicle remote charge start: unexpected status: 403
[lp-2  ] DEBUG 2021/10/16 11:52:26 charge power: 0W
[lp-2  ] DEBUG 2021/10/16 11:52:26 charge currents: [0.009 0.009 0.01]A
[lp-2  ] DEBUG 2021/10/16 11:52:26 charger status: A
[lp-1  ] DEBUG 2021/10/16 11:52:36 charge power: 1305W
[lp-1  ] DEBUG 2021/10/16 11:52:36 charge currents: [0 0 0]A
[lp-1  ] DEBUG 2021/10/16 11:52:36 charger status: C
[lp-1  ] INFO 2021/10/16 11:52:36 start charging ->
[lp-1  ] DEBUG 2021/10/16 11:52:36 soc estimated: 73.45% (vehicle: 71.00%)
[lp-1  ] DEBUG 2021/10/16 11:52:36 vehicle soc: 73%
[lp-1  ] DEBUG 2021/10/16 11:52:36 vehicle range: 379km
[lp-2  ] DEBUG 2021/10/16 11:52:46 charge power: 0W
[lp-2  ] DEBUG 2021/10/16 11:52:46 charge currents: [6.81 6.81 0.01]A
[lp-2  ] DEBUG 2021/10/16 11:52:46 charger status: A
[lp-1  ] DEBUG 2021/10/16 11:52:56 charge power: 10606W
[lp-1  ] DEBUG 2021/10/16 11:52:56 charge currents: [0 0 0]A
[lp-1  ] DEBUG 2021/10/16 11:52:56 charger status: C
[lp-1  ] DEBUG 2021/10/16 11:52:56 next soc poll remaining time: 14m40s
[lp-1  ] DEBUG 2021/10/16 11:52:56 soc estimated: 73.45% (vehicle: 71.00%)

```
Show evcc log output with docker logs :

andig commented 2 years ago

Daten fehlen

suhl-cloudian commented 2 years ago

Was meinst Du damit? Daten vom Bugreport?

suhl-cloudian commented 2 years ago

Fehler scheint von Tronity zu kommen:

[tronity] TRACE 2021/10/16 12:24:47 
POST /v1/vehicles/5fcf59b7a2a3d90012df0906/charge_start HTTP/1.1
Host: api-eu.tronity.io
User-Agent: Go-http-client/1.1
Content-Length: 0
Authorization: Bearer xxxx
Content-Type: 
Accept-Encoding: gzip

HTTP/2.0 403 Forbidden
Content-Length: 40
Access-Control-Allow-Credentials: true
Alt-Svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400, h3-28=":443"; ma=86400, h3-27=":443"; ma=86400
Cf-Cache-Status: DYNAMIC
Cf-Ray: 69f1441e6b2f6946-FRA
Content-Security-Policy: default-src 'self';connect-src 'self' https://api.tronity.io;script-src 'self' https://connect-tronity.web.app;img-src * data:;style-src 'self' 'unsafe-inline' https://connect-tronity.web.app;font-src 'self' https://connect-tronity.web.app
Content-Type: application/json; charset=utf-8
Date: Sat, 16 Oct 2021 12:24:47 GMT
Etag: W/"28-U8jz4ag/pp9XnJ7D8ZTSv5nAl68"
Expect-Ct: max-age=0
Nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
Referrer-Policy: no-referrer
Report-To: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=q6dDLBXsWQi8cq0ldmtWlCvg5OkTxHB%2B13MCOwIAFN%2FVdROv89c4l%2BUlUC5XGW5F2XWj%2BSzqEoLxO3zmECL4DJcf7SKXpGyZsoz516XCfvt9HfwwB7roBwTKyHRknyN9mYGN"}],"group":"cf-nel","max_age":604800}
Server: cloudflare
Strict-Transport-Security: max-age=15552000; includeSubDomains
Vary: Origin, Accept-Encoding
X-Content-Type-Options: nosniff
X-Dns-Prefetch-Control: off
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Xss-Protection: 0

{"statusCode":403,"message":"Forbidden"}
[lp-1  ] ERROR 2021/10/16 12:24:47 vehicle remote charge start: unexpected status: 403
andig commented 2 years ago

Es fehlten alle relevanten und im Issue angeforderten Daten- Config wie auch Logfile. Dass das irgendwas mit Tronity zu tun haben könnte war völlig unklar. Für solche Suchspiele fehlt mir die Zeit.