evcc-io / evcc

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

OpenWB Software 2.0: Warning for incorrect charger status #11517

Closed FelR closed 9 months ago

FelR commented 9 months ago

Describe the bug

After updating an OpenWB from software version 1.9 to 2.0, various warning messages are generated during charging.

Steps to reproduce

See bug description.

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.abc.xyz
  # port is the listening port for UI and api
  # evcc will listen on all available interfaces
  port: 7070

interval: 10s # control cycle interval

# 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

# 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

# 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:
  - name: grid
    type: template
    template: victron-energy
    usage: grid
    host: cerbo.abc.xyz
    port: 502
  - name: pv
    type: template
    template: victron-energy
    usage: pv
    host: cerbo.abc.xyz
    port: 502
  - name: battery
    type: template
    template: victron-energy
    usage: battery
    host: cerbo.abc.xyz
    port: 502

# 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: openwb_rechts
    type: template
    template: openwb-2.0
    modbus: tcpip
    id: 1
    host: raspi-openwb1.abc.xyz
    port: 1502
  - name: openwb_links
    type: template
    template: openwb
    host: raspi-openwb2.abc.xyz
    connector: 1
    phases1p3p: true

# 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: tesla
    type: template
    template: tesla
    title: Tesla
    accessToken: ###
    refreshToken: ###
    capacity: 79

# site describes the EVU connection, PV and home battery
site:
  title: ### # display name for UI
  meters:
    grid: grid # grid meter
    pv:
      - pv # list of pv inverters/ meters
    battery: battery # battery meter
  #prioritySoc: 70 # give home battery priority up to this soc (empty to disable)
  #bufferSoc: # ignore home battery discharge above soc (empty to disable)

# loadpoint describes the charger, charge meter and connected vehicle
loadpoints:
  - title: Garage Rechts # display name for UI
    charger: openwb_rechts # charger
    #meter: charge # charge meter
    mode: "off" # set default charge mode, use "off" to disable by default if charger is publicly available
    # vehicle: car1 # set default vehicle (disables vehicle detection)
    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)
    phases: 0 # electrical connection (normal charger: default 3 for 3 phase, 1p3p charger: 0 for "auto" or 1/3 for fixed phases)
    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)
    minCurrent: 6 # minimum charge current (default 6A)
    maxCurrent: 16 # maximum charge current (default 16A)
  - title: Garage Links # display name for UI
    charger: openwb_links # charger
    #meter: charge # charge meter
    mode: "off" # set default charge mode, use "off" to disable by default if charger is publicly available
    # vehicle: car1 # set default vehicle (disables vehicle detection)
    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)
    phases: 0 # electrical connection (normal charger: default 3 for 3 phase, 1p3p charger: 0 for "auto" or 1/3 for fixed phases)
    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)
    minCurrent: 6 # minimum charge current (default 6A)
    maxCurrent: 16 # maximum charge current (default 16A)

# tariffs are the fixed or variable tariffs
# cheap (tibber/awattar) can be used to define a tariff rate considered cheap enough for charging
tariffs:
  currency: EUR # three letter ISO-4217 currency code (default EUR)
  grid:
    # either static grid price (or price zones)
    type: fixed
    price: 0.294 # EUR/kWh
    #zones:
    #  - days: Mo-Fr
    #    hours: 2-5
    #    price: 0.2 # EUR/kWh
    #  - days: Sa,So
    #    price: 0.15 # EUR/kWh

    # # or variable via tibber
    # type: tibber
    # cheap: 0.2 # EUR/kWh
    # token: "476c477d8a039529478ebd690d35ddd80e3308ffc49b59c65b142321aee963a4" # access token
    # homeid: "cc83e83e-8cbf-4595-9bf7-c3cf192f7d9c" # optional if multiple homes associated to account

    # # or variable via awattar
    # type: awattar
    # cheap: 0.2 # EUR/kWh
    # region: de # optional, choose at for Austria
  feedin:
    # rate for feeding excess (pv) energy to the grid
    type: fixed
    price: 0.082 # EUR/kWh
  #planner:
    # planner tariff can be used for target charging if not grid tariff is specified
    # GrünStromIndex (Germany only) or ElectricityMaps provide CO2 intensity forecast

    # type: grünstromindex
    # zip: <zip>

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

Log details

[site  ] DEBUG 2024/01/06 09:45:34 ----
[lp-1  ] DEBUG 2024/01/06 09:45:34 charge power: 11324W
[lp-2  ] DEBUG 2024/01/06 09:45:34 charge power: 0W
[site  ] DEBUG 2024/01/06 09:45:34 pv power: 1487W
[site  ] DEBUG 2024/01/06 09:45:34 battery soc: 65%
[site  ] DEBUG 2024/01/06 09:45:34 battery power: 0W
[site  ] DEBUG 2024/01/06 09:45:34 grid power: 11510W
[site  ] DEBUG 2024/01/06 09:45:34 site power: 11510W
[lp-1  ] DEBUG 2024/01/06 09:45:34 charge currents: [16.1 16.2 16.1]A
[lp-1  ] DEBUG 2024/01/06 09:45:34 detected active phases: 3p
[lp-1  ] DEBUG 2024/01/06 09:45:34 charge total import: 764.341kWh
[lp-1  ] DEBUG 2024/01/06 09:45:34 charger status: C
[lp-1  ] DEBUG 2024/01/06 09:45:34 soc estimated: 79.19% (vehicle: 79.00%)
[lp-1  ] DEBUG 2024/01/06 09:45:34 vehicle soc: 79%
[lp-1  ] DEBUG 2024/01/06 09:45:34 vehicle soc limit: 80%
[lp-1  ] DEBUG 2024/01/06 09:45:34 vehicle range: 419km
[lp-1  ] WARN 2024/01/06 09:45:34 charger logic error: disabled but charging
[lp-1  ] DEBUG 2024/01/06 09:45:34 charger: guard elapse
[lp-1  ] DEBUG 2024/01/06 09:45:34 guard timer inactive
[lp-1  ] DEBUG 2024/01/06 09:45:34 set tesla plan soc: 0 @ 0001-01-01 00:53:28 +0053 LMT
[site  ] DEBUG 2024/01/06 09:45:44 ----

[site  ] DEBUG 2024/01/06 09:39:34 ----
[lp-1  ] DEBUG 2024/01/06 09:39:34 charge power: 0W
[lp-2  ] DEBUG 2024/01/06 09:39:34 charge power: 0W
[site  ] DEBUG 2024/01/06 09:39:34 pv power: 919W
[site  ] DEBUG 2024/01/06 09:39:34 battery soc: 65%
[site  ] DEBUG 2024/01/06 09:39:34 battery power: 0W
[site  ] DEBUG 2024/01/06 09:39:34 grid power: 716W
[site  ] DEBUG 2024/01/06 09:39:34 site power: 716W
[lp-1  ] DEBUG 2024/01/06 09:39:34 charge currents: [0 0 0]A
[lp-1  ] DEBUG 2024/01/06 09:39:34 charge total import: 764.174kWh
[lp-1  ] DEBUG 2024/01/06 09:39:34 charger status: B
[lp-1  ] WARN 2024/01/06 09:39:34 charger out of sync: expected enabled, got disabled
[lp-1  ] DEBUG 2024/01/06 09:39:34 charger: guard elapse
[lp-1  ] DEBUG 2024/01/06 09:39:34 guard timer inactive
[lp-1  ] DEBUG 2024/01/06 09:39:34 set tesla plan soc: 0 @ 0001-01-01 00:53:28 +0053 LMT
[lp-1  ] DEBUG 2024/01/06 09:39:34 charger enable
[lp-1  ] DEBUG 2024/01/06 09:39:34 wake-up timer: start
[site  ] DEBUG 2024/01/06 09:39:44 ----

What type of operating system are you running?

Docker container

Version

v0.123.5

andig commented 9 months ago

@MarkusGH siehst du das auch? Ich dachte eigentlich, die hätten wir gelöst?

andig commented 9 months ago

@FelR es braucht bitte mal ein trace log für openwb-2.0.

FelR commented 9 months ago

Hier einmal das Trace-Log während des Ladens:

[site  ] DEBUG 2024/01/06 14:40:26 ----
[openwb-2.0] TRACE 2024/01/06 14:40:26 modbus: send 00 34 00 00 00 06 01 04 27 74 00 02
[openwb-2.0] TRACE 2024/01/06 14:40:26 modbus: recv 00 34 00 00 00 07 01 04 04 00 00 2c b0
[lp-1  ] DEBUG 2024/01/06 14:40:26 charge power: 11440W
[lp-2  ] DEBUG 2024/01/06 14:40:26 charge power: 0W
[site  ] DEBUG 2024/01/06 14:40:26 pv power: 178W
[site  ] DEBUG 2024/01/06 14:40:26 battery soc: 65%
[site  ] DEBUG 2024/01/06 14:40:26 battery power: -419W
[site  ] DEBUG 2024/01/06 14:40:26 grid power: 12981W
[site  ] DEBUG 2024/01/06 14:40:26 site power: 12562W
[openwb-2.0] TRACE 2024/01/06 14:40:26 modbus: send 00 35 00 00 00 06 01 04 27 7b 00 03
[openwb-2.0] TRACE 2024/01/06 14:40:26 modbus: recv 00 35 00 00 00 09 01 04 06 06 4a 06 54 06 51
[lp-1  ] DEBUG 2024/01/06 14:40:26 charge currents: [16.1 16.2 16.2]A
[openwb-2.0] TRACE 2024/01/06 14:40:26 modbus: send 00 36 00 00 00 06 01 04 27 76 00 02
[openwb-2.0] TRACE 2024/01/06 14:40:26 modbus: recv 00 36 00 00 00 07 01 04 04 00 0b ad 32
[openwb-2.0] TRACE 2024/01/06 14:40:26 modbus: send 00 37 00 00 00 06 01 04 27 76 00 02
[openwb-2.0] TRACE 2024/01/06 14:40:26 modbus: recv 00 37 00 00 00 07 01 04 04 00 0b ad 32
[lp-1  ] DEBUG 2024/01/06 14:40:26 charge total import: 765.234kWh
[openwb-2.0] TRACE 2024/01/06 14:40:26 modbus: send 00 38 00 00 00 06 01 04 27 83 00 01
[openwb-2.0] TRACE 2024/01/06 14:40:26 modbus: recv 00 38 00 00 00 05 01 04 02 00 01
[lp-1  ] DEBUG 2024/01/06 14:40:26 charger status: C
[openwb-2.0] TRACE 2024/01/06 14:40:26 modbus: send 00 39 00 00 00 06 01 04 27 b0 00 0a
[openwb-2.0] TRACE 2024/01/06 14:40:26 modbus: recv 00 39 00 00 00 17 01 04 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[lp-1  ] DEBUG 2024/01/06 14:40:26 soc estimated: 80.04% (vehicle: 80.00%)
[lp-1  ] DEBUG 2024/01/06 14:40:26 vehicle soc: 80%
[lp-1  ] DEBUG 2024/01/06 14:40:26 vehicle soc limit: 80%
[lp-1  ] DEBUG 2024/01/06 14:40:26 vehicle range: 420km
[openwb-2.0] TRACE 2024/01/06 14:40:26 modbus: send 00 3a 00 00 00 06 01 04 27 84 00 01
[openwb-2.0] TRACE 2024/01/06 14:40:26 modbus: recv 00 3a 00 00 00 05 01 04 02 06 40
[lp-1  ] WARN 2024/01/06 14:40:26 charger logic error: disabled but charging
[lp-1  ] DEBUG 2024/01/06 14:40:26 set tesla plan soc: 0 @ 0001-01-01 00:53:28 +0053 LMT
[site  ] DEBUG 2024/01/06 14:40:36 ----

Und einmal nachdem das Fahrzeug den Ladevorgang beendet hat:

[site  ] DEBUG 2024/01/06 14:44:46 ----
[openwb-2.0] TRACE 2024/01/06 14:44:46 modbus: send 00 a5 00 00 00 06 01 04 27 74 00 02
[openwb-2.0] TRACE 2024/01/06 14:44:46 modbus: recv 00 a5 00 00 00 07 01 04 04 00 00 00 00
[lp-1  ] DEBUG 2024/01/06 14:44:46 charge power: 0W
[lp-2  ] DEBUG 2024/01/06 14:44:46 charge power: 0W
[site  ] DEBUG 2024/01/06 14:44:46 pv power: 461W
[site  ] DEBUG 2024/01/06 14:44:46 battery soc: 65%
[site  ] DEBUG 2024/01/06 14:44:46 battery power: 0W
[site  ] DEBUG 2024/01/06 14:44:46 grid power: 1408W
[site  ] DEBUG 2024/01/06 14:44:46 site power: 1408W
[openwb-2.0] TRACE 2024/01/06 14:44:46 modbus: send 00 a6 00 00 00 06 01 04 27 7b 00 03
[openwb-2.0] TRACE 2024/01/06 14:44:46 modbus: recv 00 a6 00 00 00 09 01 04 06 00 00 00 00 00 00
[lp-1  ] DEBUG 2024/01/06 14:44:46 charge currents: [0 0 0]A
[openwb-2.0] TRACE 2024/01/06 14:44:46 modbus: send 00 a7 00 00 00 06 01 04 27 76 00 02
[openwb-2.0] TRACE 2024/01/06 14:44:46 modbus: recv 00 a7 00 00 00 07 01 04 04 00 0b ad 47
[lp-1  ] DEBUG 2024/01/06 14:44:46 charge total import: 765.255kWh
[openwb-2.0] TRACE 2024/01/06 14:44:46 modbus: send 00 a8 00 00 00 06 01 04 27 83 00 01
[openwb-2.0] TRACE 2024/01/06 14:44:46 modbus: recv 00 a8 00 00 00 05 01 04 02 00 00
[openwb-2.0] TRACE 2024/01/06 14:44:46 modbus: send 00 a9 00 00 00 06 01 04 27 82 00 01
[openwb-2.0] TRACE 2024/01/06 14:44:46 modbus: recv 00 a9 00 00 00 05 01 04 02 00 01
[lp-1  ] DEBUG 2024/01/06 14:44:46 charger status: B
[openwb-2.0] TRACE 2024/01/06 14:44:46 modbus: send 00 aa 00 00 00 06 01 04 27 b0 00 0a
[openwb-2.0] TRACE 2024/01/06 14:44:46 modbus: recv 00 aa 00 00 00 17 01 04 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[openwb-2.0] TRACE 2024/01/06 14:44:46 modbus: send 00 ab 00 00 00 06 01 04 27 84 00 01
[openwb-2.0] TRACE 2024/01/06 14:44:46 modbus: recv 00 ab 00 00 00 05 01 04 02 06 40
[lp-1  ] WARN 2024/01/06 14:44:46 charger out of sync: expected enabled, got disabled
[lp-1  ] DEBUG 2024/01/06 14:44:46 charger: guard elapse
[lp-1  ] DEBUG 2024/01/06 14:44:46 guard timer inactive
[lp-1  ] DEBUG 2024/01/06 14:44:46 set tesla plan soc: 0 @ 0001-01-01 00:53:28 +0053 LMT
[openwb-2.0] TRACE 2024/01/06 14:44:46 modbus: send 00 ac 00 00 00 06 01 06 27 bb 06 40
[openwb-2.0] TRACE 2024/01/06 14:44:46 modbus: recv 00 ac 00 00 00 06 01 06 27 bb 06 40
[lp-1  ] DEBUG 2024/01/06 14:44:46 charger enable
[lp-1  ] DEBUG 2024/01/06 14:44:46 wake-up timer: start
[site  ] DEBUG 2024/01/06 14:44:56 ----
MarkusGH commented 9 months ago

@MarkusGH siehst du das auch? Ich dachte eigentlich, die hätten wir gelöst?

Die Fehlermeldungen sind korrekt - die OpenWB 2.0 benimmt sich nicht richtig und der Loadpoint beklagt sich zu Recht.

Fix in https://github.com/evcc-io/evcc/pull/11543

andig commented 9 months ago

@FelR hast Du bitte mal ein trace log wo Du von Sofortladen auf "aus" umschaltest? Nur das Stück, bis die Fehlermeldung kommt. DANKE!

FelR commented 9 months ago

Habe nur am Wochenende Zugriff auf die Wallbox. Kann leider erst wieder in 5 Tagen weiter testen.