evcc-io / evcc

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

Vehicle always shown as offline #11478

Closed davidgiga1993 closed 10 months ago

davidgiga1993 commented 10 months ago

Describe the bug

After updating to 0.123.2 (I was 4 versions behind before) the vehicle is always shown as (Offline) . Additionally the max current limit doesn't seem to work anymore/only sometimes.

There was no additional change, just update evcc.

image

How can the vehicle be offline when the SoC is updated correctly?

Steps to reproduce

  1. Plugin pmcc to vehicle
  2. Wait for vehicle to start charge (using minCharge profile) 3.Max charge limit not applied, vehicle still shown as offline even though evcc shows SoC ...

Configuration details

network:
  # schema is the HTTP schema
  # setting to `https` does not enable https, it only changes the way URLs are generated
  schema: https
  # 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: evcc.home.dev-core.org
  # port is the listening port for UI and api
  # evcc will listen on all available interfaces
  port: 7070

interval: 30s # control cycle interval

log: info
levels:
  eebus: info
  site: info
  lp-1: info
  lp-2: info
  cache: error
  db: error

meters:
  - name: grid
    type: template
    template: sma-home-manager
    usage: grid
    host: pv-manager.home.local

  - name: pv
    type: template
    template: sma-inverter
    usage: pv
    host: pv-inverter.home.local

chargers:
  - name: porscheMobileConnect
    type: template
    template: pmcc
    ski: 'xxx...'
    ip: iccpd-0123207.home.local

vehicles:
  - name: taycan
    type: template
    template: iso15118
    capacity: 83.7
    title: Taycan
    mode: pv
    # Fix for EVCC setting max current to 32A for some reason when 
    # vehicle SoC is < min SoC
    maxCurrent: 14

site:
  title: Home # display name for UI
  meters:
    grid: grid # grid meter
    pv:
      - pv # list of pv inverters/ meters
    battery: []  # list of battery meters
  residualPower: -390 # allow charging from 50% grid (6A * 50% -> 690W)
  #deprecated prioritySoc: 0 # give home battery priority up to this soc (empty to disable)
  #deprecated bufferSoc: 0 # continue charging on battery above soc (0 to disable)
  #deprecated bufferStartSoc: 0 # start charging on battery above soc (0 to disable)
  maxGridSupplyWhileBatteryCharging: 0 # ignore battery charging if AC consumption is above this value
  #deprecated smartCostLimit: 0 # set cost limit for automatic charging in PV mode

# loadpoint describes the charger, charge meter and connected vehicle
loadpoints:
#  - title: Wallbox
#    charger: wallbox
#    mode: "pv" # set default charge mode, use "off" to disable by default if charger is publicly available
#    vehicle: taycan # set default vehicle (disables vehicle detection)
#    resetOnDisconnect: true # set defaults when vehicle disconnects
#    phases: 3 # electrical connection (normal charger: default 3 for 3 phase, 1p3p charger: 0 for "auto" or 1/3 for fixed phases)
#    minCurrent: 6 # minimum charge current (default 6A)
#    maxCurrent: 16 # maximum charge current (default 16A)

    # 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: 4m # 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: 10m # threshold must be exceeded for this long
#      threshold: 0 # maximum import power (W)
#    guardDuration: 15m # switch charger contactor not more often than this (default 5m)    

  - title: PorscheMobile # display name for UI
    charger: porscheMobileConnect # charger
    mode: "pv" # set default charge mode, use "off" to disable by default if charger is publicly available
    vehicle: taycan # set default vehicle (disables vehicle detection)
    # deprecated resetOnDisconnect: true # set defaults when vehicle disconnects
    phases: 3 # electrical connection (normal charger: default 3 for 3 phase, 1p3p charger: 0 for "auto" or 1/3 for fixed phases)
    minCurrent: 2 # minimum charge current (default 6A)
    maxCurrent: 14 # maximum charge current (default 16A)

    # 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: 5m
      estimate: true # set false to disable interpolating between api updates (not recommended)
    enable: # pv mode enable behavior
      delay: 4m # 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: 10m # threshold must be exceeded for this long
      threshold: 0 # maximum import power (W)
    guardDuration: 15m # 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.5547 # 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.1079 # 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

    # type: ngeso # National Grid Electricity System Operator data (United Kingdom only) https://carbonintensity.org.uk/
    # provides national data if both region and postcode are omitted - do not supply both at the same time!
    # region: 1 # optional, coarser than using a postcode - see https://api.carbonintensity.org.uk/ for full list
    # postcode: SW1A1AA # optional

# 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:
  shipid: EVCC-6163316413771377
  interfaces: [eth0]
  certificate:
    public: <redacted>

    private: <redacted>

# 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
  #   uri: smtp://<user>:<password>@<host>:<port>/?fromAddress=<from>&toAddresses=<to>
  # - type: ntfy
  #   uri: https://<host>/<topics>
  #   priority: <priority>
  #   tags: <tags>

Log details

At the time of the error debug logging wasn't enabled, here are the logs at the time of error:

evcc  | [lp-1  ] WARN 2024/01/04 14:04:27 charger out of sync: expected disabled, got enabled
evcc  | [lp-1  ] WARN 2024/01/04 14:04:57 charger logic error: current mismatch (got 0A, expected 2.2A)
evcc  | [lp-1  ] WARN 2024/01/04 14:16:27 charger out of sync: expected disabled, got enabled
evcc  | [lp-1  ] WARN 2024/01/04 14:16:57 charger logic error: current mismatch (got 0A, expected 2.2A)
evcc  | [lp-1  ] INFO 2024/01/04 14:26:57 stop charging <-
evcc  | [lp-1  ] INFO 2024/01/04 14:26:57 car disconnected
evcc  | [lp-1  ] INFO 2024/01/04 19:41:57 car connected
evcc  | [lp-1  ] WARN 2024/01/04 19:41:57 charger out of sync: expected disabled, got enabled
evcc  | [lp-1  ] WARN 2024/01/04 19:42:27 charger logic error: current mismatch (got -1A, expected 32A)
evcc  | [lp-1  ] INFO 2024/01/04 19:43:27 start charging ->

What type of operating system are you running?

Linux

Version

0.123.2

andig commented 10 months ago

I guess you have minsoc and targetsoc as part of the vehicle config? Then logfile should show an error and you‘ll need to remove those.

davidgiga1993 commented 10 months ago

I guess you have minsoc and targetsoc as part of the vehicle config? Then logfile should show an error and you‘ll need to remove those.

Yes I already migrated the yml file, evcc starts, just the described behavior appears. Why close this issue? It clearly happened after the update and yes I've followed the changelog guide to migrate the yml.

@andig I've updated the issue. See line 51 of the yml file, the maxCurrenton the vehicle doesn't seem to work anymore. It did in the past - thus my previous comment in the file

davidgiga1993 commented 10 months ago

Also I just received a PorscheMobile: charger logic error: current mismatch (got -1A, expected 32A)

davidgiga1993 commented 10 months ago

Just went back to the old yml and 0.121.5 and everything works fine. Thus this is a bug and should be handled as such..

davidgiga1993 commented 10 months ago

Did a couple of restarts of evcc and at some point if the vehicle is shown without the (offline) tag the max current gets set correctly with the version mentioned in the task. I'll take a look at the code when exactly this happens

andig commented 10 months ago

Then lats get a trace log of the charger. -1A cant be correct.