evcc-io / evcc

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

Load management grid meter time out failed #14248

Closed Lightmanster closed 5 months ago

Lightmanster commented 5 months ago

Describe the bug

Set EVCC in Fast mode. Car connected , will charge with 3x 16A. If Grid meter input failed, (connection lost in my test case) evcc will continue with current load. (3x 16A). Normal behaviour without evcc and Loadbalance at Alfen charger is after 1 minute no data it will failback to min load of 6 A to prevent overload of main circuit.

EVCC still communicate with alfen LP even without grid meter input, so LP will not go in failback minimum load.

Preferable is a timeout (60s) in gridmeter for incorrect or no data input. After 60 s tell LP to go to minimum load of 6 A.

Steps to reproduce

  1. Do a charge session full load 3x 16A
  2. disconnect grid meter
  3. Load continue with 3x 16A also when grid is overloaded ...

Configuration details

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

log: debug
levels:
#  cache: error
   dsmr: fatal
#  lp-1: fatal
#  script: fatal

interval: 20s # control cycle interval

# sponsors can set telemetry: true to enable anonymous data aggregation
# see https://github.com/evcc-io/evcc/discussions/4554
telemetry: false

influx:
  url: http://localhost:8086
  database: evcc

tariffs:
  currency: EUR # (default EUR)
  grid:
    # static grid price with price zones)
    type: fixed
    price: 0.289 # EUR/kWh
    zones:
      - days: Mo-Fr
        hours: 23-0
        price: 0.251 # EUR/kWh
      - days: Sa,So
        price: 0.251 # EUR/kWh
      - days: Mo-Fr
        hours: 0-7
        price: 0.251 # EUR/kWh

mqtt:
  broker: 192.168.100.18:1883
  topic: evcc

meters:
- name: pv1
  type: custom
  power:
     source: mqtt
     topic: domoticz/out/MQTT/Huidige productie Panelen
     jq: .svalue1

- name: my_grid
  type: template
  template: dsmr
  usage: grid
  host: 192.168.100.18
  port: 7801

chargers:
- type: template
  template: alfen 
  id: 1  
  host: 192.168.100.140  
  port: 502  
  modbus: tcpip  
  name: alfen

vehicles:
- name: Tesla
#  type: template
#  title: Tesla
#  template: teslamate
#  id: 1
#  capacity: 82 
#  icon: car

  type: custom
  title: Tesla
  capacity: 82
  features: ["coarsecurrent"]
  onIdentify:
   mode: now
      #    minSoc: 10
      #  targetSoc: 82
  soc:
    source: mqtt
    topic: teslamate/cars/1/battery_level
    timeout: 720h # 30d
  range:
    source: mqtt
    topic: teslamate/cars/1/rated_battery_range_km
    timeout: 720h # 30d
  status:
    source: combined
    plugged:
      source: mqtt
      topic: teslamate/cars/1/plugged_in
      timeout: 720h # 30d
    charging:
      source: mqtt
      topic: teslamate/cars/1/charger_actual_current
      timeout: 720h # 30d
  climater:
    source: mqtt
    topic: teslamate/cars/1/is_climate_on
    timeout: 720h # 30d

circuits:
  - name: main
    maxPower: 15870
    maxCurrent : 23
    meter: my_grid
    parent: null

loadpoints:
- title: Oprit
  charger: alfen
  mode: pv
  vehicle: Tesla
  enable:
    threshold: 0
    delay: 1m
  disable:
     threshold: 200
     delay: 1m
  soc:
    poll:
      mode: connected
      interval: 1m
    estimate: true
  phases: 0
  circuit: main

site:
  title: Thuis
  meters:
    grid: my_grid
    pv:
    - pv1
  circuit: main

Log details

At 14:52:52 I disconnect the gridmeter

Jun 08 14:52:12 raspberrypi evcc[16337]: [site  ] DEBUG 2024/06/08 14:52:12 ----
Jun 08 14:52:12 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 14:52:12 charge power: 11182W
Jun 08 14:52:12 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 14:52:12 charge currents: [16.1 16.1 16.1]A
Jun 08 14:52:12 raspberrypi evcc[16337]: [circuit-main] DEBUG 2024/06/08 14:52:12 power: 10149W
Jun 08 14:52:12 raspberrypi evcc[16337]: [circuit-main] DEBUG 2024/06/08 14:52:12 current: 16A
Jun 08 14:52:12 raspberrypi evcc[16337]: [site  ] DEBUG 2024/06/08 14:52:12 pv power: 1903W
Jun 08 14:52:12 raspberrypi evcc[16337]: [site  ] DEBUG 2024/06/08 14:52:12 grid meter: 10149W
Jun 08 14:52:12 raspberrypi evcc[16337]: [site  ] DEBUG 2024/06/08 14:52:12 grid currents: [14 12 16]A
Jun 08 14:52:12 raspberrypi evcc[16337]: [site  ] DEBUG 2024/06/08 14:52:12 site power: 10149W
Jun 08 14:52:12 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 14:52:12 detected active phases: 3p
Jun 08 14:52:12 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 14:52:12 !! session: chargeRater.chargedEnergy=0.9 - chargedAtStartup=0.0
Jun 08 14:52:12 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 14:52:12 charge total import: 4931.662kWh
Jun 08 14:52:12 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 14:52:12 charger status: C
Jun 08 14:52:12 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 14:52:12 soc estimated: 69.66% (vehicle: 69.00%)
Jun 08 14:52:12 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 14:52:12 vehicle soc: 70%
Jun 08 14:52:12 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 14:52:12 vehicle range: 357km
Jun 08 14:52:32 raspberrypi evcc[16337]: [site  ] DEBUG 2024/06/08 14:52:32 ----
Jun 08 14:52:32 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 14:52:32 charge power: 11209W
Jun 08 14:52:32 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 14:52:32 charge currents: [16.1 16.1 16.1]A
Jun 08 14:52:32 raspberrypi evcc[16337]: [circuit-main] DEBUG 2024/06/08 14:52:32 power: 10073W
Jun 08 14:52:32 raspberrypi evcc[16337]: [circuit-main] DEBUG 2024/06/08 14:52:32 current: 16A
Jun 08 14:52:32 raspberrypi evcc[16337]: [site  ] DEBUG 2024/06/08 14:52:32 pv power: 1903W
Jun 08 14:52:32 raspberrypi evcc[16337]: [site  ] DEBUG 2024/06/08 14:52:32 grid meter: 10073W
Jun 08 14:52:32 raspberrypi evcc[16337]: [site  ] DEBUG 2024/06/08 14:52:32 grid currents: [14 12 16]A
Jun 08 14:52:32 raspberrypi evcc[16337]: [site  ] DEBUG 2024/06/08 14:52:32 site power: 10073W
Jun 08 14:52:32 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 14:52:32 detected active phases: 3p
Jun 08 14:52:32 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 14:52:32 !! session: chargeRater.chargedEnergy=1.0 - chargedAtStartup=0.0
Jun 08 14:52:32 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 14:52:32 charge total import: 4931.724kWh
Jun 08 14:52:32 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 14:52:32 charger status: C
Jun 08 14:52:32 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 14:52:32 soc estimated: 69.73% (vehicle: 69.00%)
Jun 08 14:52:32 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 14:52:32 vehicle soc: 70%
Jun 08 14:52:32 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 14:52:32 vehicle range: 357km
Jun 08 14:52:52 raspberrypi evcc[16337]: [site  ] DEBUG 2024/06/08 14:52:52 ----
Jun 08 14:52:52 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 14:52:52 charge power: 11200W
Jun 08 14:52:52 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 14:52:52 charge currents: [16.1 16.1 16.1]A
Jun 08 14:52:52 raspberrypi evcc[16337]: [circuit-main] DEBUG 2024/06/08 14:52:52 power: 10073W
Jun 08 14:52:52 raspberrypi evcc[16337]: [circuit-main] DEBUG 2024/06/08 14:52:52 current: 16A
Jun 08 14:52:52 raspberrypi evcc[16337]: [site  ] ERROR 2024/06/08 14:52:52 circuit power: i/o timeout
Jun 08 14:52:52 raspberrypi evcc[16337]: i/o timeout
Jun 08 14:52:52 raspberrypi evcc[16337]: [site  ] DEBUG 2024/06/08 14:52:52 pv power: 1903W
Jun 08 14:52:52 raspberrypi evcc[16337]: [site  ] ERROR 2024/06/08 14:52:52 grid meter: i/o timeout
Jun 08 14:52:52 raspberrypi evcc[16337]: i/o timeout
Jun 08 14:53:12 raspberrypi evcc[16337]: [site  ] DEBUG 2024/06/08 14:53:12 ----
Jun 08 14:53:12 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 14:53:12 charge power: 11203W
Jun 08 14:53:12 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 14:53:12 charge currents: [16.1 16.1 16.1]A
Jun 08 14:53:12 raspberrypi evcc[16337]: [circuit-main] DEBUG 2024/06/08 14:53:12 power: 10073W
Jun 08 14:53:12 raspberrypi evcc[16337]: [circuit-main] DEBUG 2024/06/08 14:53:12 current: 16A
Jun 08 14:53:12 raspberrypi evcc[16337]: [site  ] ERROR 2024/06/08 14:53:12 circuit power: i/o timeout
Jun 08 14:53:12 raspberrypi evcc[16337]: i/o timeout

..
..
..

Jun 08 15:02:32 raspberrypi evcc[16337]: [site  ] DEBUG 2024/06/08 15:02:32 ----
Jun 08 15:02:32 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 15:02:32 charge power: 11308W
Jun 08 15:02:32 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 15:02:32 charge currents: [16.2 16.2 16.2]A
Jun 08 15:02:32 raspberrypi evcc[16337]: [circuit-main] DEBUG 2024/06/08 15:02:32 power: 10073W
Jun 08 15:02:32 raspberrypi evcc[16337]: [circuit-main] DEBUG 2024/06/08 15:02:32 current: 16A
Jun 08 15:02:32 raspberrypi evcc[16337]: [site  ] ERROR 2024/06/08 15:02:32 circuit power: i/o timeout
Jun 08 15:02:32 raspberrypi evcc[16337]: i/o timeout
Jun 08 15:02:32 raspberrypi evcc[16337]: [site  ] DEBUG 2024/06/08 15:02:32 pv power: 1903W
Jun 08 15:02:33 raspberrypi evcc[16337]: [site  ] ERROR 2024/06/08 15:02:33 grid meter: i/o timeout
Jun 08 15:02:33 raspberrypi evcc[16337]: i/o timeout
Jun 08 15:02:52 raspberrypi evcc[16337]: [site  ] DEBUG 2024/06/08 15:02:52 ----
Jun 08 15:02:52 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 15:02:52 charge power: 11205W
Jun 08 15:02:52 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 15:02:52 charge currents: [16.1 16.1 16.1]A
Jun 08 15:02:52 raspberrypi evcc[16337]: [circuit-main] DEBUG 2024/06/08 15:02:52 power: 10073W
Jun 08 15:02:52 raspberrypi evcc[16337]: [circuit-main] DEBUG 2024/06/08 15:02:52 current: 16A
Jun 08 15:02:52 raspberrypi evcc[16337]: [site  ] ERROR 2024/06/08 15:02:52 circuit power: i/o timeout
Jun 08 15:02:52 raspberrypi evcc[16337]: i/o timeout
Jun 08 15:02:52 raspberrypi evcc[16337]: [site  ] DEBUG 2024/06/08 15:02:52 pv power: 1903W
Jun 08 15:02:53 raspberrypi evcc[16337]: [site  ] ERROR 2024/06/08 15:02:53 grid meter: i/o timeout
Jun 08 15:02:53 raspberrypi evcc[16337]: i/o timeout
Jun 08 15:03:12 raspberrypi evcc[16337]: [site  ] DEBUG 2024/06/08 15:03:12 ----
Jun 08 15:03:12 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 15:03:12 charge power: 11181W
Jun 08 15:03:12 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 15:03:12 charge currents: [16.1 16 16.1]A
Jun 08 15:03:12 raspberrypi evcc[16337]: [circuit-main] DEBUG 2024/06/08 15:03:12 power: 10073W
Jun 08 15:03:12 raspberrypi evcc[16337]: [circuit-main] DEBUG 2024/06/08 15:03:12 current: 16A
Jun 08 15:03:12 raspberrypi evcc[16337]: [site  ] ERROR 2024/06/08 15:03:12 circuit power: i/o timeout
Jun 08 15:03:12 raspberrypi evcc[16337]: i/o timeout
Jun 08 15:03:12 raspberrypi evcc[16337]: [site  ] DEBUG 2024/06/08 15:03:12 pv power: 1903W
Jun 08 15:03:12 raspberrypi evcc[16337]: [site  ] ERROR 2024/06/08 15:03:12 grid meter: i/o timeout
Jun 08 15:03:12 raspberrypi evcc[16337]: i/o timeout
Jun 08 15:03:32 raspberrypi evcc[16337]: [site  ] DEBUG 2024/06/08 15:03:32 ----
Jun 08 15:03:32 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 15:03:32 charge power: 11206W
Jun 08 15:03:32 raspberrypi evcc[16337]: [lp-1  ] DEBUG 2024/06/08 15:03:32 charge currents: [16.2 16.1 16.1]A
Jun 08 15:03:32 raspberrypi evcc[16337]: [circuit-main] DEBUG 2024/06/08 15:03:32 power: 10073W
Jun 08 15:03:32 raspberrypi evcc[16337]: [circuit-main] DEBUG 2024/06/08 15:03:32 current: 16A
Jun 08 15:03:32 raspberrypi evcc[16337]: [site  ] ERROR 2024/06/08 15:03:32 circuit power: i/o timeout
Jun 08 15:03:32 raspberrypi evcc[16337]: i/o timeout

What type of operating system are you running?

Linux

Version

126.6

andig commented 5 months ago

That's a very good point. Imho we should treat any circuit as overloaded if we don't have measurements.

/cc @premultiply my idea would be to set as-is values to math.Inf() or any other high value after defined timeout which will in turn treat a circuit as overloaded?