evcc-io / evcc

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

Wallbox Commander 2 - OCPP kann nicht mehr laden / entsperrt werden #15114

Closed Frintrop closed 3 months ago

Frintrop commented 3 months ago

Describe the bug

Die letzten Monate lief eigentlich alles wunderbar. Seit ein paar Tagen ( nach unseren Urlaub ), ohne aktive Änderung der Konfiguration entsperrt evcc die beiden Wallboxen Commander 2 nicht mehr. Fehlermeldung: charger enable: ocpp message (3161866985): ProtocolError - validation of RemoteStartTransaction failed

Normalerweise nutzte ich einwandfrei das Template pulsarplus, habe zum Testen aber ocpp ausprobiert.

Steps to reproduce

-Fahrzeug einstecken -PV oder Schnell - Laden aktivieren

Configuration details

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: 10.100.10.71
  # 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

# database configuration for persisting charge sessions and settings
#database:
#   type: sqlite
#   dsn: /config/evcc.db

# 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: debug
levels:
  site: debug
  charger: debug
  circuit-garage: debug
  circuit-house: debug
  ocpp: trace
  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 # 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:
  - name: grid
    type: template
    template: sofarsolar-g3
    usage: grid

    # Modbus TCP
    modbus: tcpip
    id: 1
    host: 10.100.100.41 # Hostname
    port: 8899 # Port 

  - name: pv
    type: template
    template: sofarsolar-g3
    usage: pv

    # Modbus TCP
    modbus: tcpip
    id: 1
    host: 10.100.100.41 # Hostname
    port: 8899 # Port 

  - name: battery
    type: template
    template: sofarsolar-g3
    usage: battery

    # Modbus TCP
    modbus: tcpip
    id: 1
    host: 10.100.100.41 # Hostname
    port: 8899 # Port     

#    power: Power # default value, optionally override
#    energy: Sum # default value, optionally override
# - name: pv
#   type: ...
# - name: battery
#   type: ...
# - name: charge
#   type: ...
# - name: aux
#   type: ...

# 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: WallboxLinks
   type: template
   template: ocpp
   timeout: 1m # optional 
   stationid: 102249
 - name: WallboxRechts
   type: template
   template: ocpp
#pulsarplus
   timeout: 1m 
   stationid: 65065

# 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: bmwix
    type: template
    template: bmw
    title: BMW iX M60
    user: 
    password: 
    vin: 
    capacity: 115 
    mode: pv
    priority: 10
    #cache: 12m
  - name: bmw3
    type: template
    template: bmw
    title: BMW 3er Touring
    user: 
    password:
    vin:
    #capacity: 12 
    mode: pv
    priority: 9
    #cache: 12m

# tariffs are the fixed or variable tariffs
tariffs:
  currency: EUR # three letter ISO-4217 currency code (default EUR)
  grid:
    type: tibber
    token: 
    homeid:
  feedin:
    # rate for feeding excess (pv) energy to the grid
    type: fixed
    price: 0.08 # EUR/kWh
  co2:

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

circuits:
- name: garage
  maxPower: 22000
  parent: house
- name: house
  maxPower: 52000
  meter: grid

# loadpoint describes the charger, charge meter and connected vehicle
loadpoints:
  - title: Wallbox Links # display name for UI
    charger: WallboxLinks # charger
    circuit: garage
    #resetOnDisconnect: true 
    mode: off
    soc:
      poll:
        mode: charging
        interval: 60m
      estimate: true

  - title: Wallbox Rechts # display name for UI
    charger: WallboxRechts # charger
    circuit: garage
    mode: "off" 
    soc:
      poll:
        mode: charging
        interval: 60m
      estimate: true

# remaining settings are experts-sonly 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)
#  - title: Wallbox Rechts # display name for UI
#    charger: WallboxRechts # charger
#    mode: "off" # default charge mode to apply when vehicle is disconnected; use "off" to disable by default if charger is publicly available

    # 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)

    # 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%)

    # type: entsoe # Entso-E european market data
    # domain: BZN|DE-LU # https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html#_areas
    # securitytoken: # api token
    # charges: # optional, additional charges per kWh
    # tax: # optional, additional tax (0.1 for 10%)

    # type: pun # PUN - Prezzo unico nazionale - Hourly Italian wholesale prices
    # charges: 0 # optional, additional charges per kWh
    # tax: 0 # optional, additional tax (0.1 for 10%)

    # type: amber
    # token: # api token from https://app.amber.com.au/developers/
    # siteid: # site ID returned by the API
    # channel: general

    # type: custom # price from a plugin source; see https://docs.evcc.io/docs/reference/plugins
    # price:
    #   source: http
    #   uri: https://example.org/price.json
    #   jq: .price.current

# 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/07/28 19:23:23 pv power: 2100W
[site  ] DEBUG 2024/07/28 19:23:25 battery soc: 77%
[site  ] DEBUG 2024/07/28 19:23:25 battery power: -180W
[site  ] DEBUG 2024/07/28 19:23:25 grid meter: 20W
[site  ] DEBUG 2024/07/28 19:23:26 grid powers: [-90 390 -280]W
[site  ] DEBUG 2024/07/28 19:23:27 grid currents: [-0.37 1.63 -1.5]A
[site  ] DEBUG 2024/07/28 19:23:28 battery has priority at soc 77% (< 95%)
[site  ] DEBUG 2024/07/28 19:23:28 site power: 120W
[lp-2  ] DEBUG 2024/07/28 19:23:28 !! active phases: 3p = min(0p measured 0p vehicle 3p physical 0p charger)
[lp-2  ] DEBUG 2024/07/28 19:23:28 charger status: B
[lp-2  ] DEBUG 2024/07/28 19:23:28 !! active phases: 3p = min(0p measured 0p vehicle 3p physical 0p charger)
[circuit-garage] DEBUG 2024/07/28 19:23:28 validate power: 0W + (0W -> 22080W) > 22000W capped at 22000W
[ocpp  ] TRACE 2024/07/28 19:23:28 send 65065: [2,"3455599554","RemoteStartTransaction",{"connectorId":1,"idTag":"evcc","chargingProfile":{"chargingProfileId":1,"stackLevel":0,"chargingProfilePurpose":"TxProfile","chargingProfileKind":"Relative","chargingSchedule":{"chargingRateUnit":"A","chargingSchedulePeriod":[{"startPeriod":0,"limit":31.884057971014492}]}}}]
[ocpp  ] TRACE 2024/07/28 19:23:28 recv 65065: [4,"3455599554","ProtocolError","validation of RemoteStartTransaction failed",{}]
[lp-2  ] ERROR 2024/07/28 19:23:28 charger enable: ocpp message (3455599554): ProtocolError - validation of RemoteStartTransaction failed
[site  ] DEBUG 2024/07/28 19:23:50 ----
[lp-1  ] DEBUG 2024/07/28 19:23:50 charge power: 0W
[lp-2  ] DEBUG 2024/07/28 19:23:50 charge power: 0W
[circuit-garage] DEBUG 2024/07/28 19:23:50 power: 0W
[circuit-garage] DEBUG 2024/07/28 19:23:50 current: 31.9A
[circuit-house] DEBUG 2024/07/28 19:23:52 power: -40W
[circuit-house] DEBUG 2024/07/28 19:23:52 current: 1.55A

What type of operating system are you running?

HomeAssistant Add-on

Version

0.129.0

Frintrop commented 3 months ago

Mir ist eingefallen, dass ich einige Zeit vor dem Urlaub das Lastmanagement angepasst habe und die Circuits von maxCurrent auf maxPower umgestellt habe, da maxCurrent nicht funktionierte.

Wenn ich diese Einstellung in der evcc.yaml auskommentiere

circuits:

funktioniert OCPP wieder !!!!

Frintrop commented 3 months ago

Vielleicht ist der Wert 31.884057971014492 zu lang ?

Frintrop commented 3 months ago

Bei dieser Konfig funktioniert OCPP

circuits:

Bei dieser kommt auch die Fehlermeldung "charger enable: ocpp message ProtocolError - validation of RemoteStartTransaction failed".

circuits:

andig commented 3 months ago

@Frintrop könntest Du bitte prüfen, ob eine der letzten Versionen von evcc noch funktioniert?

/cc @premultiply

Frintrop commented 3 months ago

@Frintrop könntest Du bitte prüfen, ob eine der letzten Versionen von evcc noch funktioniert?

/cc @premultiply

@andig , wie geht dies am schnellsten, wenn ich Homeassistant benutze ?

premultiply commented 3 months ago

Homeassisent nicht benutzen sondern einfach lokal auf einem Rechner testen?

Die Formatierung ist jedenfalls im Rahmen des laufenden OCPP-Umbaus im morgigen Nightly korrekt. https://github.com/evcc-io/evcc/blob/1515a67fc0e7446a076e9c0690bdb98c76d122e3/charger/ocpp.go#L410

Achtung, da sind auch noch diverse andere Verhaltensänderungen zu vorherigen Versionen im Detail möglich. Dazu den Erläuterungstext hier https://github.com/evcc-io/evcc/pull/14888 beachten!

Gerne Feedback geben. Danke!