evcc-io / evcc

Solar Charging ☀️🚘
https://evcc.io
MIT License
3.66k stars 684 forks source link

Energy flow displayed incorrectly with house battery #17465

Open jeriox opened 3 days ago

jeriox commented 3 days ago

Describe the bug

We recently installed a hybrid inverter and a house battery. I included it into evcc and everything works fine. However, there is a quirk for our setup: we also have an old PV/inverter that does not support any reasonable method of communication, so it is not included in evcc. This leads to the following situation, where energy seems to appear out of nowhere (the old PV).

image

I was pleased to see that evcc renders the "?" to account for that mysterious energy. However, the proportions are off. evcc knows that 1.3kW are consumed, so I would expect the bar to account for that value, with around half of it (513W) marked in green as evcc knows the source of the energy. The other part labeled with the question mark should then be gray or a similar color. Also note how the small part of grid usage is displayed with a black color to the far right, but the icon (for whatever reason shrunk to a dot) is displayed between the sun and the question mark. I would also expect this to be aligned.

Steps to reproduce

  1. Set up a hybrid inverter with PV and battery within evcc
  2. Set up a grid meter within evcc
  3. Connect another energy generator that is not included within evcc
  4. Have the generator that is not included in evcc feed energy into the battery

Configuration details

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

log: debug
levels:
  cache: error

# unique installation id
plant: 1234

interval: 10s # control cycle interval

sponsortoken: 1234

meters:
  - type: template
    template: sma-energy-meter
    usage: grid
    name: grid1
    host: 1.2.3.5
  - name: pv_neu
    type: template
    template: sma-hybrid
    usage: pv

    # Modbus TCP
    modbus: tcpip
    id: 3
    host: 1.2.3.4
    port: 502
  - name: battery
    type: template
    template: sma-hybrid
    usage: battery

    # Modbus TCP
    modbus: tcpip
    id: 3
    host: 1.2.3.4
    port: 502

site:
  title: title
  meters:
    grid: grid1
    pv:
      - pv_neu
    battery: battery

chargers:
  - name: wallbox1
    type: template
    template: heidelberg
    id: 1
    device: /dev/ttyAMA0
    baudrate: 19200
    comset: 8E1
    modbus: rs485serial

loadpoints:
  - title: Garage
    charger: wallbox1
    vehicle: Kona
    disable:
      delay: 10m

tariffs:
  grid:
    type: tibber
    token: token
  feedin:
    type: fixed
    price: 0.39

vehicles:
  - name: Kona
    type: template
    template: hyundai
    capacity: 65.4

Log details

Nov 27 13:00:06 power evcc[26117]: [site  ] DEBUG 2024/11/27 13:00:06 ----
Nov 27 13:00:06 power evcc[26117]: [lp-1  ] DEBUG 2024/11/27 13:00:06 charge power: 0W
Nov 27 13:00:07 power evcc[26117]: [lp-1  ] DEBUG 2024/11/27 13:00:07 charge currents: [0 0 0]A
Nov 27 13:00:07 power evcc[26117]: [site  ] DEBUG 2024/11/27 13:00:07 grid power: 10W
Nov 27 13:00:07 power evcc[26117]: [site  ] DEBUG 2024/11/27 13:00:07 grid powers: [-100 -322 431]W
Nov 27 13:00:07 power evcc[26117]: [site  ] DEBUG 2024/11/27 13:00:07 grid currents: [-0.862 -1.57 2.04]A
Nov 27 13:00:07 power evcc[26117]: [site  ] DEBUG 2024/11/27 13:00:07 pv power: 972W
Nov 27 13:00:07 power evcc[26117]: [site  ] DEBUG 2024/11/27 13:00:07 battery soc: 54%
Nov 27 13:00:07 power evcc[26117]: [site  ] DEBUG 2024/11/27 13:00:07 battery power: -1744W
Nov 27 13:00:07 power evcc[26117]: [site  ] DEBUG 2024/11/27 13:00:07 battery has priority at soc 54% (< 80%)
Nov 27 13:00:07 power evcc[26117]: [site  ] DEBUG 2024/11/27 13:00:07 site power: 110W
Nov 27 13:00:07 power evcc[26117]: [lp-1  ] DEBUG 2024/11/27 13:00:07 charge voltages: [236 239 237]V
Nov 27 13:00:07 power evcc[26117]: [lp-1  ] DEBUG 2024/11/27 13:00:07 detected connected phases: 3p
Nov 27 13:00:07 power evcc[26117]: [lp-1  ] DEBUG 2024/11/27 13:00:07 charge total import: 5836.943kWh
Nov 27 13:00:07 power evcc[26117]: [lp-1  ] DEBUG 2024/11/27 13:00:07 charger status: A

What type of operating system are you running?

Linux

Nightly build

Version

evcc version 0.131.7

premultiply commented 2 days ago

Just add an additional meter on your second inverter to sample its production correctly.

jeriox commented 2 days ago

Just add an additional meter on your second inverter to sample its production correctly.

yeah thats what I'm planning to do long term, would still be happy to have it displayed correctly until then :)

naltatis commented 2 days ago

@jeriox can you please post the state json when this situation happens:

http://evcc.local:7070/api/state

I'm unsure why this mismatch happens.

andig commented 1 day ago

@naltatis why is this labeled as enhancement? Afaikt we're still trying to find an actual issue here?

naltatis commented 1 day ago

Gute Frage. Möglicherweise das falsche issue erwischt.