evcc-io / evcc

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

Ocpp: Solaredge v0.130.6 does not start #15795

Closed timostr closed 2 months ago

timostr commented 2 months ago

Describe the bug

Version 0.130.6 does not start. Going back to version 0.130.3 fixes the start problem.

The web interface of the walllbox shows connected for the occp connection.

Latest version of HomeAssistant is installed:

Steps to reproduce

  1. Update to evcc 0.130.6 ...

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

interval: 30s # control cycle interval (default 30s)

# sponsor token enables optional features (request at https://cloud.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
plant: ****

# log settings
log: debug # info
levels:
  site: debug
  lp-1: trace
  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: 502
#    uri: 192.168.188.56:1502 # Vom Wechselrichter
#    # 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: solaredge-hybrid
    usage: grid
    modbus: tcpip
    id: 1
    host: 192.168.188.42
    port: 502
    timeout: 10s 
  - name: pv
    type: template
    template: solaredge-hybrid
    usage: pv
    modbus: tcpip
    id: 1
    host: 192.168.188.42
    port: 502
    timeout: 10s # 231009 TSt: changed from 10s to 60s
  - name: my_battery
    type: template
    template: solaredge-hybrid
    usage: battery
    modbus: tcpip
    id: 1
    host: 192.168.188.42
    port: 502
    timeout: 10s

# 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: SolaredgeWallbox
    type: template
    template: ocpp
    idtag: f5eh6qml76xasy5ec82p
    stationid: 99009919
    connector: 1
  #- name: SolaredgeWallbox
  #  type: template
  #  template: keba-modbus
  #  modbus: tcpip
  #  id: 255
  #  host: 192.168.188.99
  #  port: 502
  #- name: SolaredgeWallbox
  #  type: template
  #  template: keba
  #  host: 192.168.188.99

# 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: ID5
    type: template
    template: vw
    title: ID.5
    user: *****
    password: "****"
    vin: ******
    timeout: 10s
    capacity: 77 # kWh
    # phases: 3

# site describes the EVU connection, PV and home battery
site:
  title: Zuhause # display name for UI
  meters:
    grid: grid # grid meter
    pv:
      - pv # list of pv inverters/ meters
    battery:
      - my_battery
  #bufferSoC: 90 # ignore home battery discharge above soc (empty to disable)
  #prioritySoC: 80 # give home battery priority up to this soc (empty to disable)
  maxGridSupplyWhileBatteryCharging: 50
  residualPower: 250

# loadpoint describes the charger, charge meter and connected vehicle
loadpoints:
  - title: Garage # display name for UI
    charger: SolaredgeWallbox # charger
    #meter: charge # charge meter
    mode: "pv" # set default charge mode, use "off" to disable by default if charger is publicly available
    vehicle: ID5 # 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: connected
        # 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: -2000 # 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: 2000 # 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
    #type: fixed
    #price: 0.3957 # EUR/kWh

    # # or variable via tibber
    type: tibber
    token: "*****" # access token
    homeid: "*****" # optional if multiple homes associated to account

  co2:
    type: template
    template: grünstromindex
    zip: 31135

    # # 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.08 # EUR/kWh

# mqtt message broker
mqtt:
  broker: 192.168.188.42:1883
  topic: evcc # root topic for publishing, set empty to disable
  user: mqtt-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

starting evcc: 'EVCC_DATABASE_DSN=/data/evcc.db evcc --config /config/evcc.yaml'
[main  ] INFO 2024/08/29 11:19:27 evcc 0.130.6
[main  ] INFO 2024/08/29 11:19:27 using config file: /config/evcc.yaml
[mqtt  ] INFO 2024/08/29 11:19:27 connecting evcc-556216010 at tcp://192.168.188.42:1883
[mqtt  ] DEBUG 2024/08/29 11:19:27 tcp://192.168.188.42:1883 connected
[main  ] INFO 2024/08/29 11:19:27 listening at :7070
[99009919-1] DEBUG 2024/08/29 11:19:37 waiting for chargepoint: 5m0s
[ocpp  ] DEBUG 2024/08/29 11:19:42 charge point connected: 99009919
[main  ] FATAL 2024/08/29 11:21:54 cannot create charger 'SolaredgeWallbox': cannot create charger type 'template': cannot create charger type 'ocpp': timeout
[main  ] FATAL 2024/08/29 11:21:54 will attempt restart in: 15m0s

What type of operating system are you running?

HomeAssistant Add-on

Version

0.130.6

andig commented 2 months ago

Needs trace log containing site, loadpoint, ocpp.

timostr commented 2 months ago

Well this is actually a problem. evcc v0.130.6 is starting with following log settings: log: trace levels: site: trace lp-1: trace lp-2: trace cache: trace db: trace ocpp: trace

Anyhow log file is attached: 49686a9f_evcc_2024-08-29T10-38-32.129Z.log

timostr commented 2 months ago

Problem is reproducable with following log settings: log: info levels: site: debug lp-1: trace lp-2: debug cache: error db: error ocpp: trace 49686a9f_evcc_2024-08-29T10-47-59.606Z.log

timostr commented 2 months ago

Reproduceable as well with: log: trace # info levels: site: trace # debug lp-1: trace # debug lp-2: debug # debug cache: error # error db: error # error ocpp: trace 49686a9f_evcc_2024-08-29T11-24-09.302Z.log

andig commented 2 months ago

Closing until requested log available.

timostr commented 2 months ago

I've provided requested log files. What is missing?

andig @.***> schrieb am Do., 29. Aug. 2024, 17:52:

Closing until requested log available.

— Reply to this email directly, view it on GitHub https://github.com/evcc-io/evcc/issues/15795#issuecomment-2318210810, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYXYOUY37KD27JVILIYVMLZT47UVAVCNFSM6AAAAABNKAQKZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJYGIYTAOBRGA . You are receiving this because you authored the thread.Message ID: @.***>

andig commented 2 months ago

which one is the single log requested?