evcc-io / evcc

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

After upgrading from 0.130.6 to 0.130.7 no charging possible with go-e #15952

Closed sebnaf closed 2 months ago

sebnaf commented 2 months ago

Describe the bug

After upgrading to 0.130.7 without changing any configuration charging using go-e is not possible anymore, failing with

[lp-1 ] ERROR 2024/09/07 16:29:37 max charge current 5A: unexpected status: 500 (Internal Server Error)

Steps to reproduce

  1. update to 0.130.7
  2. ...

Configuration details

network:
  schema: http
  host: evcc.local
  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: <path-to-db-file>

plant: 2d2xyzde6

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

telemetry: true

# log settings
log: error
levels:
  site: info
  lp-1: info
  lp-2: info
  cache: trace
  db: warn
  vehicle: info
  tesla: info
  elektronenpumpe: info
  tronity: 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:
  - name: grid
    type: movingaverage
    decay: 0.2
    meter:
      type: custom
      power:
        source: sunspec
        #model: sunspec
        uri: 10.10.20.7:502
        id: 1
        subdevice: 1
        value: 203:W
        scale: -1.09
        # decay: 0.7
        #timeout: 2000
  - name: pv
    type: custom
    power:
      source: sunspec
      #model: sunspec
      uri: 10.10.20.7:502
      id: 1
      value: 101:W
      #timeout: 2000

# 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: elektronenpumpe
    type: go-e
    uri: http://10.10.20.22

# 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: tronity
  title: EM-IL 55E (Tronity)
  capacity: 72
  credentials:
    id: 96a2xyz28c
    secret: 8b7xyz7ad
  vin: LRWxyz676
  #id: 668xyzce4
  cache: 5m
  icon: tractor
  #minCurrent: 6
  #maxCurrent: 16

# site describes the EVU connection, PV and home battery
site:
  title: ohw3 # display name for UI
  meters:
    grid: grid # grid meter
    pv:
      - pv # list of pv inverters/ meters
  residualPower: 0 # 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: Elektronenpumpe # display name for UI
    charger: elektronenpumpe # charger
    #meter: charge # charge meter
    mode: "pv" # default charge mode to apply when vehicle is disconnected; use "off" to disable by default if charger is publicly available
    #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: always
        # 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: 10m # 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: 5m # threshold must be exceeded for this long
      threshold: 0 # maximum import power (W)
    guardDuration: 5 # switch charger contactor not more often than this (default 5m)

# tariffs are the fixed or variable tariffs
tariffs:
  currency: EUR # (default EUR)
  grid:
    # either
    type: tibber
    #cheap: 0.25 # [currency]/kWh
    token: "6-Kwxyzmw" # access token
    # homeid: "ccxyz9c" # optional if multiple homes associated to account
  feedin:
    type: fixed
    price: 0.065 # [currency]/kWh

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

#  feedin:
#    # rate for feeding excess (pv) energy to the grid
#    type: fixed
#    price: 0.08 # 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://10.0.55.22:8086
  database: evcc
  user: evcc
  password: evcc

# 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 of {{.vehicleTitle}} started
      msg: |
        Wallbox {{.title}} started charging {{.vehicleTitle}} in {{ toString .mode | upper }} mode.
        --------------------------
        evcc Status {{printf `(%d-%02d-%02d %02d:%02d:%02d)` now.Year now.Month now.Day now.Hour now.Minute now.Second}}
        Netz-Leistung: {{round (divf .gridPower 1000) 3 }} kW
        Solar-Leistung: {{round (divf .pvPower 1000) 3 }} kW
        Eigenverbrauch: {{round (divf .homePower 1000) 3 }} kW
        {{if .batteryConfigured}}Batteriespeicher-Status: {{round (divf .batteryPower 1000) 3 }} kW ({{.batterySoc }} %){{end}}
    stop: # charge stop event
      title: Charge of {{.vehicleTitle}} finished
      msg: |
        Wallbox {{.title}} finished charging {{.vehicleTitle}} 
        with {{round (divf .chargedEnergy 1000) 2 }} kWh in {{.chargeDuration}}.
        --------------------------
        evcc Status {{printf `(%d-%02d-%02d %02d:%02d:%02d)` now.Year now.Month now.Day now.Hour now.Minute now.Second}}
        Netz-Leistung: {{round (divf .gridPower 1000) 3 }} kW
        Solar-Leistung: {{round (divf .pvPower 1000) 3 }} kW
        Eigenverbrauch: {{round (divf .homePower 1000) 3 }} kW
        {{if .batteryConfigured}}Batteriespeicher-Status: {{round (divf .batteryPower 1000) 3 }} kW ({{.batterySoc }} %){{end}}
    connect: # vehicle connect event
      title: "{{.vehicleTitle}} connected on wallbox {{.title}}"
      msg: |
        {{.vehicleTitle}} connected on wallbox {{.title}} at {{round (divf .pvPower 1000) 2 }} kW PV.
        --------------------------
        evcc Status {{printf `(%d-%02d-%02d %02d:%02d:%02d)` now.Year now.Month now.Day now.Hour now.Minute now.Second}}
        Netz-Leistung: {{round (divf .gridPower 1000) 3 }} kW
        Solar-Leistung: {{round (divf .pvPower 1000) 3 }} kW
        Eigenverbrauch: {{round (divf .homePower 1000) 3 }} kW
        {{if .batteryConfigured}}Batteriespeicher-Status: {{round (divf .batteryPower 1000) 3 }} kW ({{.batterySoc }} %){{end}}
    disconnect: # vehicle connected event
      title: "{{.vehicleTitle}} disconnected of wallbox {{.title}}"
      msg: |
        {{.vehicleTitle}} disconnected of wallbox {{.title}} after {{.connectedDuration}}.
        --------------------------
        evcc Status {{printf `(%d-%02d-%02d %02d:%02d:%02d)` now.Year now.Month now.Day now.Hour now.Minute now.Second}}
        Netz-Leistung: {{round (divf .gridPower 1000) 3 }} kW
        Solar-Leistung: {{round (divf .pvPower 1000) 3 }} kW
        Eigenverbrauch: {{round (divf .homePower 1000) 3 }} kW
        {{if .batteryConfigured}}Batteriespeicher-Status: {{round (divf .batteryPower 1000) 3 }} kW ({{.batterySoc }} %){{end}}
    guest: # vehicle could not be identified
      title: Unknown vehicle
      msg: Unknown vehicle, guest connected?
  services:
    - type: pushover
      app: aq5gxyz27w
      recipients:
        - uanxyz2c

Log details

-> https://pastes.dev/AQ7PNjCiso

What type of operating system are you running?

Linux

Nightly build

Version

0.130.7

sebnaf commented 2 months ago

This can be narrowed down to

[lp-1 ] DEBUG 2024/09/07 16:30:07 pv charge current: min 5A > 0A (263W @ 1p, battery: false) [go-e ] TRACE 2024/09/07 16:30:07 GET http://10.10.20.22/api/set?amp=5

and

[go-e ] TRACE 2024/09/07 16:30:07 {"amp":"amp: failed: Value 5 exceeds range 6 to 32 (5)"} [lp-1 ] ERROR 2024/09/07 16:30:07 max charge current 5A: unexpected status: 500 (Internal Server Error)

However - why did this work prior 0.130.7 with the same settings?

VolkerK62 commented 2 months ago

do you have a mincurrent of 5A configured? is it working with 6A?

andig commented 2 months ago

5A geht halt nicht und kann egtl nie funktioniert haben….

sebnaf commented 2 months ago

Sorry - genau die Config hat über Monate funktioniert. Deswegen widerspreche ich dem "eigentlich". Ich habe es auch gerade nochmals mit der 0.130.6 erfolgreich getestet.

Möchtet ihr das Tracelog der 0.130.6 haben?

andig commented 2 months ago

Brauchts nicht. Warum auch immer das jetzt anders sein mag- 5A geht einfach nicht.