evcc icon indicating copy to clipboard operation
evcc copied to clipboard

Draws from grid when house battery not full and 1p charge (maxGridSupplyWhileBatteryCharging)

Open toleabivol opened this issue 6 months ago • 12 comments

Describe the bug

Not totally sure if bug or my situation is really an edge case.

I have : go-e 3P charger, 1p AC charged Nissan Leaf 2018, Deye 3p Hybrid 8kW (3kW AC output per phase), 7,5kWp PV, HA When PV produces more than the inverter can output on one phase (3kW+) and the house battery is not full and the 1p car is charing then it will pull from the grid the remaining needed charging power. e.g. PV produces 7kW , then the inverter will supply 3kW to the charger and 4kW into the house battery and will draw 4kW from grid on the charging phase. I though using maxGridSupplyWhileBatteryCharging: 50 would fix the issue and make the car load with maximum possible power without drawing more than 50W from grid. But the result is that it switches back and forth from a low max current to a higher max current.

When the house battery if full, the inverter will send the excess current not in battery but to the other phase of the grid and "balance" the import on the other phase => 0 costs calculated by the grid meter.

Steps to reproduce

  1. Have house battery not full
  2. Have 1p charging AC car
  3. Have inverter that outputs less on one phase AC than there is total DC available
  4. Set evcc to charge with solar only
  5. set maxGridSupplyWhileBatteryCharging: 50
  6. Have PV that generates more than inverter can output on one phase
  7. Charge the car and watch the house grid meter
  8. The grid meter shows that on the charing phase it draws power from grid to match the current set by evcc -> KO
  9. Charge house battery till full
  10. Now watch the grid meter again - inverter will export current on one phase to balance the import on another phase which results the grid meter to stay at ~0 (no import and no export overall calculated and thus no grid costs) -> OK

Configuration details

# for home assistant
# open evcc at http://evcc.local:7070
network:
  schema: http
  host: evcc.local # .local suffix announces the hostname on MDNS
  port: 7070

log: info
levels:
  cache: error

# unique installation id
plant: xxx

interval: 30s # control cycle interval

mqtt:
  broker: core-mosquitto:1883
  user: xxx
  password: xxx

meters:
- type: custom
  name: grid
  power:
    source: mqtt
    topic: SUNSYNK/status/2210249218/grid_power
  energy:
    source: mqtt
    topic: SUNSYNK/status/2210249218/day_grid_import
#  currents:
#    - source: mqtt
#      topic: deye/ac/l1/current
#   - source: mqtt
#      topic: deye/ac/l2/current
#    - source: mqtt
#      topic: deye/ac/l3/current

- type: custom
  name: pv1
  power:
    source: mqtt
    topic: SUNSYNK/status/2210249218/pv1_power
- type: custom
  name: pv2
  power:
    source: mqtt
    topic: SUNSYNK/status/2210249218/pv2_power

- type: custom
  name: battery
  soc:
    source: mqtt
    topic: SUNSYNK/status/2210249218/battery_soc
  power:
    source: mqtt
    topic: SUNSYNK/status/2210249218/battery_power
  capacity: 9.6

chargers:
- type: template
  template: go-e
  host: 192.168.xx.xx
  name: go-eCharger

vehicles:
- type: template
  template: carwings
  title: Nissan Leaf 2018
  icon: car
  user: xxx
  password: xxx
  vin: xxx
  capacity: 40
  phases: 1
  cache: 60m
#  onIdentify:
#    mode: pv
#    minSoc: 20
#    targetSoc: 80
#    minCurrent: 6
#    maxCurrent: 32
  name: nissan

loadpoints:
- title: Garage
  charger: go-eCharger
  mode: pv
#  resetOnDisconnect: true
  vehicle: nissan

site:
  title: My home
  meters:
    grid: grid
    pv:
      - pv1
      - pv2
    battery:
      - battery
  residualPower: 100
  maxGridSupplyWhileBatteryCharging: 50
#  batteryDischargeControl: true

tariffs:
  currency: EUR # (default EUR)
  grid:
    # static grid price
    #type: fixed
    #price: 0.3246
    #price: 0.2367 # [currency]/kWh tibber 1ste Monat

    type: tibber
    token: xxx
    homeid: "xxx"

  feedin:
    # rate for feeding excess (pv) energy to the grid
    type: fixed
    price: 0.082 # [currency]/kWh
  co2:
    type: grünstromindex
    zip: xxxxx

Log details

Log when house battery not full (draws from grid)

[site ] DEBUG 2024/08/05 12:05:09 ----
[lp-1 ] DEBUG 2024/08/05 12:05:09 charge power: 1840W
[lp-1 ] DEBUG 2024/08/05 12:05:09 charge currents: [8.3 0.1 0.1]A
[site ] DEBUG 2024/08/05 12:05:09 pv power: 4718W
[site ] DEBUG 2024/08/05 12:05:09 battery soc: 91%
[site ] DEBUG 2024/08/05 12:05:09 battery power: -2095W
[site ] DEBUG 2024/08/05 12:05:09 grid meter: 6W
[site ] DEBUG 2024/08/05 12:05:09 site power: -1989W
[lp-1 ] DEBUG 2024/08/05 12:05:09 charge voltages: [219 221 222]V
[lp-1 ] DEBUG 2024/08/05 12:05:09 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/05 12:05:09 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/05 12:05:09 charge total import: 1763.000kWh
[lp-1 ] DEBUG 2024/08/05 12:05:09 charger status: C
[lp-1 ] DEBUG 2024/08/05 12:05:09 soc estimated: 18.00% (vehicle: 18.00%)
[lp-1 ] DEBUG 2024/08/05 12:05:09 vehicle soc: 18%
[lp-1 ] DEBUG 2024/08/05 12:05:09 vehicle range: 42km
[lp-1 ] DEBUG 2024/08/05 12:05:09 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/05 12:05:09 pv charge current: 16.6A = 8A + 8.65A (-1989W @ 1p)
[lp-1 ] DEBUG 2024/08/05 12:05:09 max charge current: 16A
[site ] DEBUG 2024/08/05 12:05:39 ----
[lp-1 ] DEBUG 2024/08/05 12:05:39 charge power: 3670W
[lp-1 ] DEBUG 2024/08/05 12:05:39 charge currents: [16.4 0 0.1]A
[site ] DEBUG 2024/08/05 12:05:39 pv power: 4785W
[site ] DEBUG 2024/08/05 12:05:39 battery soc: 91%
[site ] DEBUG 2024/08/05 12:05:39 battery power: -892W
[site ] DEBUG 2024/08/05 12:05:39 grid meter: 773W
[site ] DEBUG 2024/08/05 12:05:39 site power: 873W
[lp-1 ] DEBUG 2024/08/05 12:05:39 charge voltages: [219 221 222]V
[lp-1 ] DEBUG 2024/08/05 12:05:39 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/05 12:05:39 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/05 12:05:39 charge total import: 1763.000kWh
[lp-1 ] DEBUG 2024/08/05 12:05:39 charger status: C
[lp-1 ] DEBUG 2024/08/05 12:05:39 soc estimated: 18.00% (vehicle: 18.00%)
[lp-1 ] DEBUG 2024/08/05 12:05:39 vehicle soc: 18%
[lp-1 ] DEBUG 2024/08/05 12:05:39 vehicle range: 42km
[lp-1 ] DEBUG 2024/08/05 12:05:39 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/05 12:05:39 pv charge current: 12.2A = 16A + -3.8A (873W @ 1p)
[lp-1 ] DEBUG 2024/08/05 12:05:39 max charge current: 12A
[site ] DEBUG 2024/08/05 12:06:09 ----
[lp-1 ] DEBUG 2024/08/05 12:06:09 charge power: 2690W
[lp-1 ] DEBUG 2024/08/05 12:06:09 charge currents: [11.9 0 0]A
[site ] DEBUG 2024/08/05 12:06:09 pv power: 4728W
[site ] DEBUG 2024/08/05 12:06:09 battery soc: 91%
[site ] DEBUG 2024/08/05 12:06:09 battery power: -1022W
[site ] DEBUG 2024/08/05 12:06:09 grid meter: 17W
[site ] DEBUG 2024/08/05 12:06:09 site power: -905W
[lp-1 ] DEBUG 2024/08/05 12:06:09 charge voltages: [220 221 222]V
[lp-1 ] DEBUG 2024/08/05 12:06:09 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/05 12:06:09 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/05 12:06:09 charge total import: 1763.000kWh
[lp-1 ] DEBUG 2024/08/05 12:06:09 charger status: C
[lp-1 ] DEBUG 2024/08/05 12:06:09 soc estimated: 18.00% (vehicle: 18.00%)
[lp-1 ] DEBUG 2024/08/05 12:06:09 vehicle soc: 18%
[lp-1 ] DEBUG 2024/08/05 12:06:09 vehicle range: 42km
[lp-1 ] DEBUG 2024/08/05 12:06:09 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/05 12:06:09 pv charge current: 15.9A = 12A + 3.93A (-905W @ 1p)
[lp-1 ] DEBUG 2024/08/05 12:06:09 max charge current: 15A
[site ] DEBUG 2024/08/05 12:06:39 ----
[lp-1 ] DEBUG 2024/08/05 12:06:39 charge power: 3390W
[lp-1 ] DEBUG 2024/08/05 12:06:39 charge currents: [15.1 0.1 0]A
[site ] DEBUG 2024/08/05 12:06:39 pv power: 4940W
[site ] DEBUG 2024/08/05 12:06:39 battery soc: 91%
[site ] DEBUG 2024/08/05 12:06:39 battery power: -1096W
[site ] DEBUG 2024/08/05 12:06:39 grid meter: 586W
[site ] DEBUG 2024/08/05 12:06:39 site power: 686W
[lp-1 ] DEBUG 2024/08/05 12:06:39 charge voltages: [219 220 221]V
[lp-1 ] DEBUG 2024/08/05 12:06:39 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/05 12:06:39 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/05 12:06:39 charge total import: 1763.000kWh
[lp-1 ] DEBUG 2024/08/05 12:06:39 charger status: C
[lp-1 ] DEBUG 2024/08/05 12:06:39 soc estimated: 18.00% (vehicle: 18.00%)
[lp-1 ] DEBUG 2024/08/05 12:06:39 vehicle soc: 18%
[lp-1 ] DEBUG 2024/08/05 12:06:39 vehicle range: 42km
[lp-1 ] DEBUG 2024/08/05 12:06:39 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/05 12:06:39 pv charge current: 12A = 15A + -2.98A (686W @ 1p)
[lp-1 ] DEBUG 2024/08/05 12:06:39 max charge current: 12A
[site ] DEBUG 2024/08/05 12:07:09 ----
[lp-1 ] DEBUG 2024/08/05 12:07:09 charge power: 2710W
[lp-1 ] DEBUG 2024/08/05 12:07:09 charge currents: [12.1 0.1 0]A
[site ] DEBUG 2024/08/05 12:07:09 pv power: 5149W
[site ] DEBUG 2024/08/05 12:07:09 battery soc: 91%
[site ] DEBUG 2024/08/05 12:07:09 battery power: -1425W
[site ] DEBUG 2024/08/05 12:07:09 grid meter: 13W
[site ] DEBUG 2024/08/05 12:07:09 site power: -1312W
[lp-1 ] DEBUG 2024/08/05 12:07:09 charge voltages: [219 221 222]V
[lp-1 ] DEBUG 2024/08/05 12:07:09 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/05 12:07:09 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/05 12:07:09 charge total import: 1763.000kWh
[lp-1 ] DEBUG 2024/08/05 12:07:09 charger status: C
[lp-1 ] DEBUG 2024/08/05 12:07:09 soc estimated: 18.00% (vehicle: 18.00%)
[lp-1 ] DEBUG 2024/08/05 12:07:09 vehicle soc: 18%
[lp-1 ] DEBUG 2024/08/05 12:07:09 vehicle range: 42km
[lp-1 ] DEBUG 2024/08/05 12:07:09 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/05 12:07:09 pv charge current: 17.7A = 12A + 5.7A (-1312W @ 1p)
[lp-1 ] DEBUG 2024/08/05 12:07:09 max charge current: 17A
[site ] DEBUG 2024/08/05 12:07:39 ----
[lp-1 ] DEBUG 2024/08/05 12:07:39 charge power: 3830W
[lp-1 ] DEBUG 2024/08/05 12:07:39 charge currents: [17.2 0 0]A
[site ] DEBUG 2024/08/05 12:07:39 pv power: 5143W
[site ] DEBUG 2024/08/05 12:07:39 battery soc: 91%
[site ] DEBUG 2024/08/05 12:07:39 battery power: -1255W
[site ] DEBUG 2024/08/05 12:07:39 grid meter: 993W
[site ] DEBUG 2024/08/05 12:07:39 site power: 1093W
[lp-1 ] DEBUG 2024/08/05 12:07:39 charge voltages: [219 221 221]V
[lp-1 ] DEBUG 2024/08/05 12:07:39 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/05 12:07:39 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/05 12:07:39 charge total import: 1763.000kWh
[lp-1 ] DEBUG 2024/08/05 12:07:39 charger status: C
[lp-1 ] DEBUG 2024/08/05 12:07:39 soc estimated: 18.00% (vehicle: 18.00%)
[lp-1 ] DEBUG 2024/08/05 12:07:39 vehicle soc: 18%
[lp-1 ] DEBUG 2024/08/05 12:07:39 vehicle range: 42km
[lp-1 ] DEBUG 2024/08/05 12:07:39 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/05 12:07:39 pv charge current: 12.2A = 17A + -4.75A (1093W @ 1p)
[lp-1 ] DEBUG 2024/08/05 12:07:39 max charge current: 12A
[site ] DEBUG 2024/08/05 12:08:09 ----
[lp-1 ] DEBUG 2024/08/05 12:08:09 charge power: 2690W
[lp-1 ] DEBUG 2024/08/05 12:08:09 charge currents: [12 0 0.1]A
[site ] DEBUG 2024/08/05 12:08:09 pv power: 5149W
[site ] DEBUG 2024/08/05 12:08:09 battery soc: 91%
[site ] DEBUG 2024/08/05 12:08:09 battery power: -1457W
[site ] DEBUG 2024/08/05 12:08:09 grid meter: 9W
[site ] DEBUG 2024/08/05 12:08:09 site power: -1348W
[lp-1 ] DEBUG 2024/08/05 12:08:09 charge voltages: [219 221 221]V
[lp-1 ] DEBUG 2024/08/05 12:08:09 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/05 12:08:09 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/05 12:08:09 charge total import: 1763.000kWh
[lp-1 ] DEBUG 2024/08/05 12:08:09 charger status: C
[lp-1 ] DEBUG 2024/08/05 12:08:09 soc estimated: 18.00% (vehicle: 18.00%)
[lp-1 ] DEBUG 2024/08/05 12:08:09 vehicle soc: 18%
[lp-1 ] DEBUG 2024/08/05 12:08:09 vehicle range: 42km
[lp-1 ] DEBUG 2024/08/05 12:08:09 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/05 12:08:09 pv charge current: 17.9A = 12A + 5.86A (-1348W @ 1p)
[lp-1 ] DEBUG 2024/08/05 12:08:09 max charge current: 17A
[site ] DEBUG 2024/08/05 12:08:39 ----

Log when house battery full (does not draw from grid)

[site ] DEBUG 2024/08/05 12:50:09 ----
[lp-1 ] DEBUG 2024/08/05 12:50:09 charge power: 4220W
[lp-1 ] DEBUG 2024/08/05 12:50:09 charge currents: [19 0 0]A
[site ] DEBUG 2024/08/05 12:50:09 pv power: 5498W
[site ] DEBUG 2024/08/05 12:50:09 battery soc: 100%
[site ] DEBUG 2024/08/05 12:50:09 battery power: 1W
[site ] DEBUG 2024/08/05 12:50:09 grid meter: -213W
[site ] DEBUG 2024/08/05 12:50:09 site power: -112W
[lp-1 ] DEBUG 2024/08/05 12:50:09 charge voltages: [217 219 221]V
[lp-1 ] DEBUG 2024/08/05 12:50:09 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/05 12:50:09 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/05 12:50:09 !! session: chargeRater.chargedEnergy=2.0 - chargedAtStartup=0.0
[lp-1 ] DEBUG 2024/08/05 12:50:09 charge total import: 1765.000kWh
[lp-1 ] DEBUG 2024/08/05 12:50:09 charger status: C
[lp-1 ] DEBUG 2024/08/05 12:50:09 soc estimated: 23.25% (vehicle: 21.00%)
[lp-1 ] DEBUG 2024/08/05 12:50:09 vehicle soc: 23%
[lp-1 ] DEBUG 2024/08/05 12:50:09 vehicle range: 49km
[lp-1 ] DEBUG 2024/08/05 12:50:09 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/05 12:50:09 pv charge current: 19.5A = 19A + 0.489A (-112W @ 1p)
[site ] DEBUG 2024/08/05 12:50:39 ----
[lp-1 ] DEBUG 2024/08/05 12:50:39 charge power: 4220W
[lp-1 ] DEBUG 2024/08/05 12:50:39 charge currents: [18.9 0.1 0]A
[site ] DEBUG 2024/08/05 12:50:39 pv power: 5498W
[site ] DEBUG 2024/08/05 12:50:39 battery soc: 100%
[site ] DEBUG 2024/08/05 12:50:39 battery power: 1W
[site ] DEBUG 2024/08/05 12:50:39 grid meter: -213W
[site ] DEBUG 2024/08/05 12:50:39 site power: -112W
[lp-1 ] DEBUG 2024/08/05 12:50:39 charge voltages: [218 219 220]V
[lp-1 ] DEBUG 2024/08/05 12:50:39 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/05 12:50:39 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/05 12:50:39 !! session: chargeRater.chargedEnergy=2.0 - chargedAtStartup=0.0
[lp-1 ] DEBUG 2024/08/05 12:50:39 charge total import: 1765.000kWh
[lp-1 ] DEBUG 2024/08/05 12:50:39 charger status: C
[lp-1 ] DEBUG 2024/08/05 12:50:39 soc estimated: 23.25% (vehicle: 21.00%)
[lp-1 ] DEBUG 2024/08/05 12:50:39 vehicle soc: 23%
[lp-1 ] DEBUG 2024/08/05 12:50:39 vehicle range: 49km
[lp-1 ] DEBUG 2024/08/05 12:50:39 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/05 12:50:39 pv charge current: 19.5A = 19A + 0.489A (-112W @ 1p)
[site ] DEBUG 2024/08/05 12:51:09 ----
[lp-1 ] DEBUG 2024/08/05 12:51:09 charge power: 4260W
[lp-1 ] DEBUG 2024/08/05 12:51:09 charge currents: [19.1 0 0]A
[site ] DEBUG 2024/08/05 12:51:09 pv power: 5428W
[site ] DEBUG 2024/08/05 12:51:09 battery soc: 100%
[site ] DEBUG 2024/08/05 12:51:09 battery power: 0W
[site ] DEBUG 2024/08/05 12:51:09 grid meter: -225W
[site ] DEBUG 2024/08/05 12:51:09 site power: -125W
[lp-1 ] DEBUG 2024/08/05 12:51:09 charge voltages: [218 220 220]V
[lp-1 ] DEBUG 2024/08/05 12:51:09 detected connected phases: 3p
[lp-1 ] DEBUG 2024/08/05 12:51:09 detected active phases: 1p
[lp-1 ] DEBUG 2024/08/05 12:51:09 !! session: chargeRater.chargedEnergy=2.0 - chargedAtStartup=0.0
[lp-1 ] DEBUG 2024/08/05 12:51:09 charge total import: 1765.000kWh
[lp-1 ] DEBUG 2024/08/05 12:51:09 charger status: C
[lp-1 ] DEBUG 2024/08/05 12:51:09 soc estimated: 23.25% (vehicle: 21.00%)
[lp-1 ] DEBUG 2024/08/05 12:51:09 vehicle soc: 23%
[lp-1 ] DEBUG 2024/08/05 12:51:09 vehicle range: 49km
[lp-1 ] DEBUG 2024/08/05 12:51:09 !! active phases: 1p = min(1p measured 1p vehicle 3p physical 0p charger)
[lp-1 ] DEBUG 2024/08/05 12:51:09 pv charge current: 19.5A = 19A + 0.542A (-125W @ 1p)

What type of operating system are you running?

Linux

Version

1.129.0

toleabivol avatar Aug 05 '24 10:08 toleabivol