evcc icon indicating copy to clipboard operation
evcc copied to clipboard

Home Battery Discharge Control not Working with Minimum SoC

Open Percy2Live opened this issue 3 months ago • 10 comments

Describe the bug

The option "prevent home battery discharge for fast charge" does work well - except if there is a minimum SoC configured for the vehicle. In that case the vehicle will automatically start to charge when plugged in - but the home battery will be used for that.

Expected behaviour: The home battery should not be used in that case, similar to what happens when the fast charge option is selected

Steps to reproduce

  1. Activate the option prevent home battery discharge for fast charge
  2. Enable a minimum SoC for the vehicle in the arrival tab (e.g. 80%)
  3. Plug in the vehicle with a lower SoC (e.g. 50%)

The vehicle will start to charge automatically, but the home battery will be used. When step 2 is skipped and fast charge is selected instead, everything works like expected: The home battery is not used

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: evcc
  # port is the listening port for UI and api
  # evcc will listen on all available interfaces
  port: 7070
#uri: #############
interval: 10s # control cycle interval
sponsortoken: #######

log: debug

meters:

- name: Homemanager
  type: sma
  serial: 1901### # insert your own serialnumber 
    
- name: Tripower
  type: template
  template: sma-inverter
  usage: pv
  host: 192.1####P-Adresse oder Hostname
  password: ### # Anlagenpasswort / Installateurspasswort # Optional 

- name: STP_SE
  type: template
  template: sma-hybrid
  usage: pv
    
  # Modbus TCP Inverter
  modbus: tcpip
  id: 3
  host: 19####9 # Hostname
  port: 502 # Port 

- name: byd
  type: template
  template: sma-hybrid
  usage: battery
    
  # Modbus TCP Battery
  modbus: tcpip
  id: 3
  host: 1###9 # Hostname
  port: 502 # Port
    
chargers:
#- type: template
#  template: go-e-v3 
#  host: 1####3  
#  name: wbPascal
- type: template
  template: go-e-v3 
  host: 1####55  
  name: wbSandra

vehicles:
- type: template
  template: nissan 
  title: Leaf Pascal 
  user: ####  
  password: ####
  vin: #####  
  capacity: 40  
  name: ev1 

loadpoints:
- title: Ladepunkt Sandra
  charger: wbSandra
  vehicle: ev1
#  mode: now
  mode: pv
#  mode: minpv #In Kombination mit den Sunny Portal Einstellungen kann in diesem Modus auch mit reduziertem PV Anteil geladen werden, z.B. mit 30% Netzbezug
  phases: 1 # ev phases (default 3)
  enable: # pv mode enable behavior
    delay: 5m # threshold must be exceeded for this long
#Summer value
    threshold: -1600 # grid power threshold (in Watts, negative=export). If zero, export must exceed minimum charge power to enable
#Winter value
#    threshold: -1000 # 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
#Summer value
    threshold: 300 # maximum import power (W)
#Winter value
#    threshold: 900 # maximum import power (W)
  guardDuration: 10m # switch charger contactor not more often than this (default 5m)
  minCurrent: 6 # minimum charge current (default 6A)
  maxCurrent: 32 # maximum charge current (default 16A)
  soc:
    poll:
      mode: always
      interval: 120m #interval for polling while not charging
#    min: 0
#    target: 100
    estimate: true

#- title: Ladepunkt Pascal
#  charger: wbPascal
#  vehicles: 
#  - ev1
#  mode: pv
#  resetOnDisconnect: true
#  phases: 3 # ev phases (default 3)
#  enable: # pv mode enable behavior
#    delay: 5m # threshold must be exceeded for this long
#    threshold: -1600 # 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: 300 # maximum import power (W)
#  guardDuration: 10m # switch charger contactor not more often than this (default 5m)
#  minCurrent: 6 # minimum charge current (default 6A)
#  maxCurrent: 32 # maximum charge current (default 16A)
#  soc:
#    poll:
#      mode: charging
#      interval: 60m
#    min: 0
#    target: 100
#    estimate: true

site:
  title: Home Ladestation # display name for UI
  meters:
    grid: Homemanager # grid meter
    pv:
      - Tripower # list of pv inverters/ meters
      - STP_SE
    battery: # battery meter
      - byd
#  prioritySoC: 50 # give home battery priority up to this soc (empty to disable)
#  bufferSoC: 85 # Ist SoC der Batterie > bufferSoC, wird dieser Teil als PV Erzeugung zum Laden des Fahrzeugs genutzt (auch im PV Modus) (empty to disable)
  residualPower: -200 #-690 #Wintermodus: Wie viel Netzbezug ist ok, damit trotzdem geladen wird (z.B. -1000W)

#hems: #Versuch, die SMA Logik zur Steuerung zu verwenden. Aktuell "allowcontrol" auf false gesetzt, da es nicht so funktioniert wie gewünscht
#  type: sma
#  allowcontrol: false
#  vendorid: ###
#  deviceid: ###

# 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.26 # EUR/kWh
  feedin:
    # rate for feeding excess (pv) energy to the grid
    type: fixed
    price: 0.127 # EUR/kWh
influx:
  url: http://#####
  database: evcc
  user: #####
  password: #####
  
plant: #####

What type of operating system are you running?

Docker container

Version

evcc version 0.124.9

Percy2Live avatar Mar 20 '24 20:03 Percy2Live