evcc-io / evcc

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

resetOnDisconnect with mode off on Easee is broken #13093

Closed dm82m closed 6 months ago

dm82m commented 6 months ago

Describe the bug

If you unplug the car the mode and car is not reset. It stays like it was and leads to direct charge if another car is plugged. It worked before so I guess the failure started with current version.

Steps to reproduce

  1. disconnect the car
  2. check the settings in evcc

Configuration details

Mode: off

Log details

No logs, request if you need something

What type of operating system are you running?

HomeAssistant Add-on

Version

0.124.10

VolkerK62 commented 6 months ago

Hast du in der yaml das Auto dem Loadpoint fest zugewiesen?

dm82m commented 6 months ago

Nein. Ich hab auch nichts an der config geändert und bisher hat alles funktioniert. Also unveränderte config und der bug muss mit einem der letzten releases gekommen sein.

VolkerK62 commented 6 months ago

mit einem der letzten releases gekommen sein.

da wäre gut zu wissen, mit welchem. Wenn du jetzt wieder zurückgehst, funktioniert wieder alles wie gewohnt?

dm82m commented 6 months ago

Ich kann ja in Home Assistant leider kein add-on downgrade machen. Kann es also leider auch nicht rekonstruieren…

dm82m commented 6 months ago

@GrimmiMeloni kannst du das bei dir mit der easee evtl. Mal reproduzieren?

dm82m commented 6 months ago

@andig ist das schon gefixt in der aktuellen nightly oder warum close?

andig commented 6 months ago

NOTE Due to amount of issues raised we will close incomplete issues (unclear description what the issue actually is, missing log file, unsupported platform) without further comments.

GrimmiMeloni commented 6 months ago

@dm82m bitte teile mal deine Konfiguration. Bonusfrage: hast Du zwischen abstecken und anstecken mindestens ein Interval abgewartet?

dm82m commented 6 months ago

Ich hab heute zwischen abstecken und anstecken etwa 1,5h gewartet. Sollten genug Intervalle durchgelaufen sein. Entweder ist mit einer der letzten Versionen der bug reingekommen oder es gab eine Änderung auf der easee Seite die dazu führt. Wobei die easee Integration in Home Assistant den anstecken/abstecken Zustand 1a erkennt. Das wiederum lässt mich zu 99% auf evcc als Ursache schauen.

meine config ist unverändert, dh die hat mir älteren evcc Versionen ohne Probleme funktioniert. Aber dennoch hier:

network:
  # schema is the HTTP schema
  # setting to `https` does not enable https, it only changes the way URLs are generated
  schema: http
  # host is the hostname or IP address
  # if the host name contains a `.local` suffix, the name will be announced on MDNS
  # docker: MDNS announcements don't work. host must be set to the docker host's name.
  host: 192.168.178.4
  # port is the listening port for UI and api
  # evcc will listen on all available interfaces
  port: 7070

interval: 30s # control cycle interval. Interval <30s can lead to unexpected behavior, see https://docs.evcc.io/docs/reference/configuration/interval

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

# unique installation id
plant: secret

# database configuration for persisting charge sessions and settings
# database:
#   type: sqlite
#   dsn: <path-to-db-file>

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

# telemetry enables aggregated statistics
#
# Telemetry allows collecting usage data (grid and green energy, charge power).
# Data is aggregated, no individual charging sessions are tracked. The collected,
# anonymous data can be retrieved using https://api.evcc.io.
#
# See https://github.com/evcc-io/evcc/pull/4343 or details.
#
# For time being, this is only available to sponsors, hence data is associated with
# the sponsor token's identity.
#
# telemetry: true

# log settings
log: info
levels:
  site: debug
  lp-1: debug
  lp-2: debug
  cache: error
  db: error
  mercedes: debug #trace

# modbus proxy for allowing external programs to reuse the evcc modbus connection
# each entry will start a proxy instance at the given port speaking Modbus TCP and
# relaying to the given modbus downstream device (either TCP or RTU, RS485 or TCP)
modbusproxy:
  #  - port: 5200
  #    uri: solar-edge:502
  #    # rtu: true
  #    # readonly: true # use `deny` to raise modbus errors

# meter definitions
# name can be freely chosen and is used as reference when assigning meters to site and loadpoints
# for documentation see https://docs.evcc.io/docs/devices/meters
meters:
  - type: template
    template: fronius-gen24
    usage: grid
    host: 192.168.178.5
    port: 502
    name: grid
  - type: template
    template: fronius-gen24
    usage: pv
    host: 192.168.178.5
    port: 502
    name: pv
  - type: template
    template: sunspec-inverter-control
    usage: battery
    host: 192.168.178.5
    port: 502
    modbus: tcpip
    id: 1
    name: battery
  # original; ohne batteriesteuerung
  #- type: template
  #  template: fronius-gen24
  #  usage: battery
  #  host: 192.168.178.5
  #  port: 502
  #  name: battery
  # über die solarapi des wechselrichters
  #- type: template
  #  template: fronius-solarapi-v1
  #  usage: battery
  #  host: 192.168.178.5
  #  port: 502
  #  name: battery
  #  user: customer
  #  password: pass

# charger definitions
# name can be freely chosen and is used as reference when assigning charger to vehicle
# for documentation see https://docs.evcc.io/docs/devices/chargers
chargers:
  - name: chargerDirk
    type: template
    template: easee
    user: dirk@x.de
    password: pass
    charger: id
    authorize: true
    timeout: 20s
  - name: chargerUte
    type: template
    template: easee
    user: dirk@x.de
    password: pass
    charger: id 
    authorize: true
    timeout: 20s

# vehicle definitions
# name can be freely chosen and is used as reference when assigning vehicle to loadpoint
# for documentation see https://docs.evcc.io/docs/devices/vehicles
vehicles:
  - name: dima-car
    type: mercedes
    account: dirk@x.de
    region: EMEA
    title: DIMA-CAR
    capacity: 60 # kWh
    onIdentify: # set defaults when vehicle is identified
      mode: pv # enable PV-charging when vehicle is identified
    tokens:
      access: token1
      refresh: token2
#  - name: dima-car
#    type: custom
#    title: DIMA-CAR
#    capacity: 60 # kWh
#    onIdentify: # set defaults when vehicle is identified
#      mode: pv # enable PV-charging when vehicle is identified
#    soc: # battery soc (%)
#      source: http
#      uri: http://192.168.178.4:8123/api/states/sensor.dima_car_state_of_charge
#      method: GET # default HTTP method
#      headers:
#        - authorization: Bearer token
#        - content-type: application/json
#      jq: .state | tonumber # parse response json
#    range: # optional electric range (km)
#      source: http
#      uri: http://192.168.178.4:8123/api/states/sensor.dima_car_range_electric
#      method: GET # default HTTP method
#      headers:
#        - authorization: Bearer token
#        - content-type: application/json
#      jq: .state | tonumber # parse response json

# site describes the EVU connection, PV and home battery
site:
  title: Home # display name for UI
  meters:
    grid: grid # grid meter
    pv: pv # pv inverter/ meter
    battery: battery # battery meter
  residualPower: 100 # additional household usage margin
  maxGridSupplyWhileBatteryCharging: 0 # ignore battery charging if AC consumption is above this value

# loadpoint describes the charger, charge meter and connected vehicle
loadpoints:
  - title: Dirk # display name for UI
    charger: chargerDirk # charger
    mode: off # set default charge mode, use "off" to disable by default if charger is publicly available
    phases: 0 # electrical connection (normal charger: default 3 for 3 phase, 1p3p charger: 0 for "auto" or 1/3 for fixed phases)
    # remaining settings are experts-only and best left at default values
    priority: 0 # relative priority for concurrent charging in PV mode with multiple loadpoints (higher values have higher priority)
    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: charging
        # poll interval defines how often the vehicle API may be polled if NOT charging
        interval: 60m
      estimate: true # set false to disable interpolating between api updates (not recommended)
    enable: # pv mode enable behavior
      delay: 1m # threshold must be exceeded for this long
      threshold: 0 # grid power threshold (in Watts, negative=export). If zero, export must exceed minimum charge power to enable
    disable: # pv mode disable behavior
      delay: 3m # threshold must be exceeded for this long
      threshold: 0 # maximum import power (W)
    guardDuration: 5m # switch charger contactor not more often than this (default 5m)
  - title: Ute # display name for UI
    charger: chargerUte # charger
    mode: off # set default charge mode, use "off" to disable by default if charger is publicly available
    phases: 0 # electrical connection (normal charger: default 3 for 3 phase, 1p3p charger: 0 for "auto" or 1/3 for fixed phases)
    # remaining settings are experts-only and best left at default values
    priority: 0 # relative priority for concurrent charging in PV mode with multiple loadpoints (higher values have higher priority)
    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: charging
        # poll interval defines how often the vehicle API may be polled if NOT charging
        interval: 60m
      estimate: true # set false to disable interpolating between api updates (not recommended)
    enable: # pv mode enable behavior
      delay: 1m # threshold must be exceeded for this long
      threshold: 0 # grid power threshold (in Watts, negative=export). If zero, export must exceed minimum charge power to enable
    disable: # pv mode disable behavior
      delay: 3m # threshold must be exceeded for this long
      threshold: 0 # maximum import power (W)
    guardDuration: 5m # switch charger contactor not more often than this (default 5m)

# tariffs are the fixed or variable tariffs
tariffs:
  currency: EUR # three letter ISO-4217 currency code (default EUR)
  grid:
    # either static grid price (or price zones)
    type: fixed
    price: 0.2463 # EUR/kWh
    #zones:
    #  - days: Mo-Fr
    #    hours: 2-5
    #    price: 0.2 # EUR/kWh
    #  - days: Sa,So
    #    price: 0.15 # EUR/kWh

    # or variable tariffs
    # type: tibber
    # token: "476c477d8a039529478ebd690d35ddd80e3308ffc49b59c65b142321aee963a4" # access token
    # homeid: "cc83e83e-8cbf-4595-9bf7-c3cf192f7d9c" # optional if multiple homes associated to account

    # type: awattar
    # region: de # optional, choose at for Austria
    # charges: # optional, additional charges per kWh
    # tax: # optional, additional tax (0.1 for 10%)

    # type: octopusenergy
    # tariff: AGILE-FLEX-22-11-25 # Tariff code
    # region: A # optional

    # type: elering # Nordpool
    # region: ee # or lt, lv, fi
    # charges: # optional, additional charges per kWh
    # tax: # optional, additional tax (0.1 for 10%)

    # type: energinet # Energinet using the price in DKK
    # region: dk1 # or dk2
    # charges: # optional, additional charges per kWh
    # tax: # optional, additional tax (0.1 for 10%)
  feedin:
    # rate for feeding excess (pv) energy to the grid
    type: fixed
    price: 0.082 # EUR/kWh

    # type: octopusenergy
    # tariff: AGILE-FLEX-22-11-25 # Tariff code
    # region: A # optional
  co2:
    # co2 tariff provides co2 intensity forecast and is for co2-optimized target charging if no variable grid tariff is specified
    # type: grünstromindex # GrünStromIndex (Germany only)
    # zip: <zip>

    # type: electricitymaps # https://app.electricitymaps.com/map
    # uri: <uri>
    # token: <token>
    # zone: DE

# 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
  # 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 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}
    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: # app id
  #   recipients:
  #   - # list of recipient ids
  # - type: telegram
  #   token: # bot id
  #   chats:
  #   - # list of chat ids
  # - type: email
GrimmiMeloni commented 6 months ago

Ok, 1,5h sollten ausreichen. 😅 Auch die Konfig sieht auf den ersten Blick richtig aus. Teile bitte mal ein Debug Log das den Fehler zeigt.

dm82m commented 6 months ago

Ich sagte ja schon, dass das mit der identische findig schon funktioniert hat. Was soll ich auf debug Level stellen? Dann mach ich das, auch wenn’s mir Home Assistant addon wieder eine Qual wird an die Logs zu kommen.