evcc-io / evcc

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

Battery discharges unintentionally #13670

Closed moerpel closed 5 months ago

moerpel commented 5 months ago

Describe the bug

I have configured evcc in the way that the battery shall only be involved in charging the car above a battery soc of 80%. Unfortunately this limit seems to be ignored by the setup. For the past days the battery fully discharged over the entire charging cycle. The GUI shows that the battery has been locked but discharges. From time to time (severeal minutes) the battery seems to be excluded from charging but it appears after a short while again and continues discharging.

327104626-3afe2d19-2d89-4c33-9c2c-9269a9c3397a 327104784-b9323676-7c6e-4f91-8b98-98e998ce0d86

Steps to reproduce

  1. Connect car with wallbox.
  2. Set charging plan in evcc.
  3. Check Battery discharge in evcc GUI and in Energy Manager app.
  4. Check if settings are correct in the way that battery discharging is being avoided during PV or charging according to plan. ...

Configuration details

Config: 

network:
  schema: http
  host: evcc.local # .local suffix announces the hostname on MDNS
  port: 7070

log: debug
levels:
  cache: error

# unique installation id
plant: uid

interval: 30s # control cycle interval

sponsortoken: token

telemetry: false

meters:
- type: template
  template: sma-home-manager 
  usage: grid  
  host: IP
  interface: eth0  
  name: grid1
- type: template
  template: sma-hybrid 
  id: 3  
  host: IP 
  port: 502  
  usage: pv  
  modbus: tcpip  
  watchdog: 30s  
  name: pv2
- type: template
  template: sma-hybrid 
  id: 3  
  host: IP
  port: 502  
  usage: battery  
  modbus: tcpip  
  capacity: 10.2  
  watchdog: 30s  
  name: battery1

chargers:
- type: template
  template: smaevcharger 
  host: IP
  user: user
  password: pw
  name: wallbox1

vehicles:
- type: template
  template: enyaq 
  title: Enyaq  
  icon: car  
  user:user 
  password: pw
  vin: vin
  capacity: 77  
  phases: 3  
  cache: 15m  
  mode: pv  
  timeout: 10s  
  name: enyaq
- type: template
  template: mini 
  title: Mini  
  icon: car  
  user: user
  password: pw
  vin: vin
  capacity: 33  
  phases: 3  
  cache: 15m  
  mode: pv  
  name: mini
  region: EU  

loadpoints:
- title: Garage
  charger: wallbox1
  mode: minpv

site:
  title: Home
  meters:
    grid: grid1
    pv:
    - pv2
    battery:
    - battery1

hems:
  type: sma
  AllowControl: false
tariffs:
  grid:
    type: tibber
    token: "token"

Log details

[lp-1  ] DEBUG 2024/05/01 14:17:59 charge power: 10632W
[sma   ] TRACE 2024/05/01 14:17:59 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[site  ] DEBUG 2024/05/01 14:17:59 pv power: 3555W
[site  ] DEBUG 2024/05/01 14:17:59 battery soc: 2%
[site  ] DEBUG 2024/05/01 14:17:59 battery power: 2442W
[site  ] DEBUG 2024/05/01 14:17:59 grid meter: 5314W
[site  ] DEBUG 2024/05/01 14:17:59 grid powers: [1765 1707 1842]W
[site  ] DEBUG 2024/05/01 14:17:59 grid currents: [7.69 7.44 7.92]A
[site  ] DEBUG 2024/05/01 14:17:59 site power: 7756W
[lp-1  ] DEBUG 2024/05/01 14:17:59 charge currents: [15.5 15.5 15.5]A
[lp-1  ] DEBUG 2024/05/01 14:17:59 detected active phases: 3p
[lp-1  ] DEBUG 2024/05/01 14:17:59 charger status: C
[sma   ] TRACE 2024/05/01 14:18:00 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:01 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:02 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:03 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:04 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:05 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:06 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:07 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:08 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:09 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:10 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:11 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:12 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:13 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:14 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:15 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:16 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:17 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:18 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:18 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:19 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:20 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:21 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:22 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:23 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:24 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:25 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:26 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:27 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:28 recv 192.168.178.97: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:28 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[site  ] DEBUG 2024/05/01 14:18:29 ----
[lp-1  ] DEBUG 2024/05/01 14:18:29 charge power: 10637W
[sma   ] TRACE 2024/05/01 14:18:29 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[site  ] DEBUG 2024/05/01 14:18:29 pv power: 3612W
[site  ] DEBUG 2024/05/01 14:18:29 battery soc: 2%
[site  ] DEBUG 2024/05/01 14:18:29 battery power: 2370W
[site  ] DEBUG 2024/05/01 14:18:29 grid meter: 5342W
[site  ] DEBUG 2024/05/01 14:18:29 grid powers: [1771 1711 1860]W
[site  ] DEBUG 2024/05/01 14:18:29 grid currents: [7.72 7.46 7.99]A
[site  ] DEBUG 2024/05/01 14:18:29 site power: 7712W
[lp-1  ] DEBUG 2024/05/01 14:18:29 charge currents: [15.5 15.5 15.5]A
[lp-1  ] DEBUG 2024/05/01 14:18:29 detected active phases: 3p
[lp-1  ] DEBUG 2024/05/01 14:18:29 charger status: C
[sma   ] TRACE 2024/05/01 14:18:30 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:31 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:32 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:33 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:34 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:35 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:36 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:37 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2024/05/01 14:18:38 recv 192.168.178.98: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]

Logs are from Home Assistant Add on but same happens with evcc on Linux on 0.124.0. Tested.

What type of operating system are you running?

Linux

Version

0.124.0 and 0.125.0

GrimmiMeloni commented 5 months ago

A log of the point in time when evcc does it's battery control (i.e. at start of charge) would be helpful. That said, if the battery shows as locked in the UI, this is an indication that evcc did perform the switch and considers the battery now locked. If it nevertheless discharges, it would mean that a third party outside of evcc's control has reenabled the battery OR the battery lock did not work in the first place. The latter can be checked if you provide the aforementioned logs.

moerpel commented 5 months ago

I'll do. But will probably not happen today.