evcc-io / evcc

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

MQTT savings werden nicht mehr übertragen #10513

Closed zwiebelxxl closed 10 months ago

zwiebelxxl commented 10 months ago

Describe the bug

In der Version 0.121.2 (vielleicht auch schon früher) vermisse ich die savings* Topics wie savingsTotalCharged savingsGridCharged savingsSelfConsumptionCharged savingsSelfConsumptionPercent savingsEffectivePrice savingsAmount

Ich weiß das an der Berechnung der savings sich etwas verändert hat. Aber es wäre schön wenn die absoluten Werte weiterhin auch über MQTT zu bekommen sind.

Steps to reproduce

Wenn ich mit dem MQTT Explorer auf die Topics des evcc schaue fehlen die savings*.

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.local
  # port is the listening port for UI and api
  # evcc will listen on all available interfaces
  port: 7070

interval: 10s # control cycle interval

# sponsor token: *****
sponsortoken: *****

# log settings
#log: error
log: debug
#log: trace
levels:
  core: error
  lp-1: error
  lp-2: error
  #core: trace
  #lp-1: trace
  #lp-2: trace

# meter definitions
# name can be freely chosen and is used as reference when assigning meters to site and loadpoints
# for examples see https://github.com/andig/evcc-config#meters
meters:
- name: pv
  #type: custom
  #type: default
  type: template
  template: fronius-solarapi-v1
  usage: pv
  host: 192.168.10.11 # IP-Adresse oder Hostname
    #power:
    #source: http
    #type: http
    #uri: http://192.168.10.11/solar_api/v1/GetPowerFlowRealtimeData.fcgi
    #jq: if .Body.Data.Site.P_PV == null then 0 else .Body.Data.Site.P_PV end
- name: pv2
  type: template
  template: fronius-gen24
  usage: pv
  host: 192.168.10.126 # IP-Adresse oder Hostname

- name: pv2_battery
  type: template
  template: fronius-gen24
  usage: battery
  host: 192.168.10.126 # IP-Adresse oder Hostname
  port: 502 # Port # Optional

- name: grid
  #type: custom
  #type: template
  #type: default
  type: template
  #template: fronius-solarapi-v1
  template: fronius-gen24
  usage: grid
  #host: 192.168.10.11 # IP-Adresse oder Hostname pv1
  host: 192.168.10.126 # IP-Adresse oder Hostname pv2
    #power:
    #source: http
    #type: http
    #uri: http://192.168.10.11/solar_api/v1/GetPowerFlowRealtimeData.fcgi
    #jq: if .Body.Data.Site.P_Grid == null then 0 else .Body.Data.Site.P_Grid end

- name: sdm630mqtt
  type: custom
  power: # Leistung (W)
    source: mqtt
    topic: mqttGenericBridge/phoenix_meter/Power_Sum__W
    timeout: 90s
    #energy: # Sum
    #source: mqtt
    #topic: mqttGenericBridge/wallbox/Energy_import__kWh
    #timeout: 600s

    #- name: wallboxmeter
    #type: custom
    #power:
  currents: # optional currents (A)
   - source: mqtt # L1 plugin type
     topic: mqttGenericBridge/phoenix_meter/Current_L1__A
   - source: mqtt # L2 plugin type
     topic: mqttGenericBridge/phoenix_meter/Current_L2__A
   - source: mqtt # L3 plugin type
     topic: mqttGenericBridge/phoenix_meter/Current_L3__A

# charger definitions
# name can be freely chosen and is used as reference when assigning charger to vehicle
# for examples see https://github.com/andig/evcc-config#chargers
# EM-CP-PP-ETH -> phoenix-em-eth
#- type: phoenix-em-eth
chargers:
  - name: phoenix # wallbe
    type: phoenix-em-eth
    uri: 192.168.10.35
    #   power: false    # charge meter connected to controller
    #  energy: false   # charge meter connected to controller
    # currents: false # charge meter connected to controller
    #power: true    # charge meter connected to controller
    #energy: true   # charge meter connected to controller
    #currents: true # charge meter connected to controller

  - name: wallbox2
    type: template
    template: go-e-v3
    host: 192.168.10.107

# vehicle definitions
# name can be freely chosen and is used as reference when assigning vehicle to loadpoint
# for examples see https://github.com/andig/evcc-config#vehicles
vehicles:
   - type: template
     template: hyundai
     name: ev1
     title: IONIQ 5
     user: *****
     password: *****
     vin: *****
     capacity: 58
     language: de
     #target: 100 # always charge to 100%
     #type: hyundai
     #template: template

tariffs:
  currency: EUR # (default EUR)
  grid:
    # static grid price
    type: fixed
    #price: 0.3113 # EUR/kWh
    price: 0.3495 # EUR/kWh

  feedin:
    # rate for feeding excess (pv) energy to the grid
    type: fixed
    price: 0.123 # EUR/kWh
      # planner:
    # planner tariff can be used for target charging if not grid tariff is specified
    # GrünStromIndex (Germany only) or ElectricityMaps provide CO2 intensity forecast
    #type: grünstromindex
    #zip: 86807
    #  co2:
    #type: electricitymaps
      #uri: https://api-access.electricitymaps.com/free-tier/
      #uri: https://api-access.electricitymaps.com/free-tier/carbon-intensity/history
      #token: *****
      #zone: DE

# site describes the EVU connection, PV and home battery
site:
  #residualPower: -1000 # 1000W Netzbezug im PV Modus erlaubt
  #residualPower: -500 # 1000W Netzbezug im PV Modus erlaubt
  title: Zuhause # display name for UI
  meters:
    grid: grid # grid meter
    pvs:
    - pv
    - pv2
    batteries:
    - pv2_battery
  prioritySoc: 60 # Hausbatterie bekommt bis zum Soc 50% Priorität beim laden
  bufferSoc: 90 # Hausbatterie wird oberhalb Soc 80% als Puffer genutzt

# loadpoint describes the charger, charge meter and connected vehicle
loadpoints:
- title: Garage # display name for UI
  charger: wallbox2 # charger
  #vehicles: # use if multiple vehicles allowed to charge on this loadpoint
  #vehicle: ev1
  # - ID.3
  #vehicles: ev1
  # - ID.3
  # - e-Up
  mode: pv
  resetOnDisconnect: true # set defaults when vehicle disconnects
  soc:
    # polling defines usage of the vehicle APIs
    # Modifying the default settings it NOT recommended. It MAY deplete your vehicle's battery
    # or lead to vehicle manufacturer banning you from API use. USE AT YOUR OWN RISK.
    poll:
      # poll mode defines under which condition the vehicle API is called:
      #   charging: update vehicle ONLY when charging (this is the recommended default)
      #   connected: update vehicle when connected (not only charging), interval defines how often
      #   always: always update vehicle regardless of connection state, interval defines how often
      mode: charging
      # updated at 23.5.22
      #mode: always
      # poll interval defines how often the vehicle API may be polled if NOT charging
      #interval: 60m
      interval: 90m
    min: 0 # immediately charge to 0% regardless of mode unless "off" (disabled)
      #target: 100 # always charge to 100%
    estimate: false # set true to interpolate between api updates
    #onDisconnect: # set defaults when vehicle disconnects
    #mode: pv # switch back to pv mode
    #targetSoC: 100 # charge to 100%
  phases: 0 # ev phases (default 3)
  enable: # pv mode enable behavior
    delay: 1m # threshold must be exceeded for this long
    threshold: 0 # minimum export power (W). 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: 200 # maximum import power (W)
  guardduration: 5m # switch charger contactor not more often than this (default 10m)
  mincurrent: 6 # minimum charge current (default 6A)
  maxcurrent: 16 # maximum charge current (default 16A)

- title: Garage2 # display name for UI
  charger: phoenix # charger
  meter:  sdm630mqtt
  #vehicles: # use if multiple vehicles allowed to charge on this loadpoint
  #vehicle: ev1
  # - ID.3
  #vehicles: ev1
  # - ID.3
  # - e-Up
  mode: pv
  resetOnDisconnect: true # set defaults when vehicle disconnects
  soc:
    # polling defines usage of the vehicle APIs
    # Modifying the default settings it NOT recommended. It MAY deplete your vehicle's battery
    # or lead to vehicle manufacturer banning you from API use. USE AT YOUR OWN RISK.
    poll:
      # poll mode defines under which condition the vehicle API is called:
      #   charging: update vehicle ONLY when charging (this is the recommended default)
      #   connected: update vehicle when connected (not only charging), interval defines how often
      #   always: always update vehicle regardless of connection state, interval defines how often
      mode: charging
      # updated at 23.5.22
      #mode: always
      # poll interval defines how often the vehicle API may be polled if NOT charging
      #interval: 60m
      interval: 90m
    min: 0 # immediately charge to 0% regardless of mode unless "off" (disabled)
      #target: 100 # always charge to 100%
    estimate: false # set true to interpolate between api updates
    #onDisconnect: # set defaults when vehicle disconnects
    #mode: pv # switch back to pv mode
    #targetSoC: 100 # charge to 100%
  phases: 3 # ev phases (default 3)
  enable: # pv mode enable behavior
    delay: 1m # threshold must be exceeded for this long
    threshold: 0 # minimum export power (W). 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: 200 # maximum import power (W)
  guardduration: 5m # switch charger contactor not more often than this (default 10m)
  mincurrent: 6 # minimum charge current (default 6A)
  maxcurrent: 16 # maximum charge current (default 16A)

# mqtt message broker
mqtt:
  # broker: localhost:1883
  # topic: evcc # root topic for publishing, set empty to disable
  broker: 192.168.10.16:1883
  topic: evcc # root topic for publishing, set empty to disable
  clientid: evcc_585507366
  # user: *****
  # password: *****

# influx database
influx:
  # url: http://localhost:8086
  # database: evcc
  # user: *****
  # password: *****

# push messages
messaging:
  events:
    start: # charge start event
      title: Charge started
      msg: Started charging in "${mode}" mode
    stop: # charge stop event
      title: Charge finished
      msg: Finished charging ${chargedEnergy:%.1fk}kWh in ${chargeDuration}.
    connect: # vehicle connect event
      title: Car connected
      msg: "Car connected at ${pvPower:%.1fk}kW PV"
    disconnect: # vehicle connected event
      title: Car disconnected
      msg: Car disconnected after ${connectedDuration}
  services:
  # - type: pushover
  #   app: *****
  #   recipients: *****
  #   - # list of recipient ids
  # - type: telegram
  #   token: *****
  #   chats: *****
  #   - # list of chat ids
  # - type: email
  #   uri: smtp://<user: *****

</details>
Version: `0.121.2`

Log details

evcc startet normal und logs bringen hier denk ich nichts.

What type of operating system are you running?

Linux

Version

evcc version 0.121.2

andig commented 10 months ago

Duplikat zu https://github.com/evcc-io/evcc/issues/10515

emcepe commented 10 months ago

das ist ja witzig. Bei mir sehe ich via MQTT die savings.* :)

zwiebelxxl commented 10 months ago

hier geht es darum das die Werte garnicht mit MQTT übertragen werden.

Bei dem issue #10515 geht es um Formatierung von Werten.