evcc-io / evcc

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

Loadpoint is not set into default mode "off" #8787

Closed bastian1607 closed 1 year ago

bastian1607 commented 1 year ago

Describe the bug

Nach dem Neustart oder nach dem Abstecken des E-Autos stellt sich der Loadpoint nicht wieder in default mode. Default sollte "off" sein. Mit 1.188.3 kein Problem gehabt.

(Bildschirmfoto wurde gemacht nachden das Log erstellt war; yaml wurde log auf "info" gestellt nach dem Kopieren)

grafik

EDIT: Updated Log to Debug.

Steps to reproduce

  1. Set default mode in yaml at loadpoint to "off".
  2. Restart EVCC OR disconnect car
  3. Mode is not set to off ...

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

# database configuration for persisting charge sessions and settings
# database:
#   type: sqlite
#   dsn: <path-to-db-file>

# sponsor token enables optional features (request at https://sponsor.evcc.io)
sponsortoken: payyours
plant: green

# telemetry enables aggregated statistics
#
# Telemetry allows collecting usage data (grid and green energy, charge power).
# Data is aggregated, no individual charging sessions are tracked. The collected,
# anonymous data can be retrieved using https://api.evcc.io.
#
# See https://github.com/evcc-io/evcc/pull/4343 or details.
#
# For time being, this is only available to sponsors, hence data is associated with
# the sponsor token's identity.
#
# telemetry: true

# log settings
log: error
levels:
  site: error
  lp-1: error
  lp-2: error
  cache: error
  db: error

# modbus proxy for allowing external programs to reuse the evcc modbus connection
# each entry will start a proxy instance at the given port speaking Modbus TCP and
# relaying to the given modbus downstream device (either TCP or RTU, RS485 or TCP)
modbusproxy:
  #  - port: 5200
  #    uri: solar-edge:502
  #    # rtu: true
  #    # readonly: true

# meter definitions
# name can be freely chosen and is used as reference when assigning meters to site and loadpoints
# for documentation see https://docs.evcc.io/docs/devices/meters
meters:
  - name: grid
    type: custom
    power: #Power # default value, optionally override # Leistung (W)
      source: mqtt
      topic: ir/power
  - name: pv
    type: custom
    power: # Leistung (W)
      source: mqtt
      topic: pv/power
    energy: # Energie (kWh) - Umrechnung von Wh -> kWh
      source: mqtt
      topic: pv/energy
      scale: 0.001
  - name: battery
    type: template
    template: senec-home
    usage: battery
    host: XXXX # IP-Adresse oder Hostname 

# charger definitions
# name can be freely chosen and is used as reference when assigning charger to vehicle
# for documentation see https://docs.evcc.io/docs/devices/chargers
chargers:
- name: wallbox
  type: template
  template: abl
  modbus: rs485tcpip
  id: 1
  host: XXXX # Hostname
  port: 502 # Port

# vehicle definitions
# name can be freely chosen and is used as reference when assigning vehicle to loadpoint
# for documentation see https://docs.evcc.io/docs/devices/vehicles
vehicles:
  - name: my_car
    type: template
    template: hyundai
    title: Ioniq # Wird in der Benutzeroberfläche angezeigt (Optional)
    user: XXXX # Benutzerkonto (bspw. E-Mail Adresse, User Id, etc.)
    password: XXXX # Passwort des Benutzerkontos (bei führenden Nullen bitte in einfache Hochkommata setzen)
    vin: XXXX # Erforderlich, wenn mehrere Fahrzeuge des Herstellers vorhanden sind (Optional)
    capacity: 77.4 # Akkukapazität in kWh (Optional)
    language: de # 'de' für Deutsch und 'en' für Englisch (Optional) 
    mode: pv # enable PV-charging when vehicle is identified
    minSoc: 10 # immediately charge to 0% regardless of mode unless "off" (disabled)
    targetSoc: 100 # limit charge to 90%

# site describes the EVU connection, PV and home battery
site:
  title: Zuhause # display name for UI
  meters:
    grid: grid # grid meter
    pv:
      - pv # list of pv inverters/ meters
    battery:
      - battery # list of battery meters
  residualPower: 100 # additional household usage margin
  prioritySoc: 0 # give home battery priority up to this soc (empty to disable)
  bufferSoc: 90 # continue charging on battery above soc (0 to disable)
  bufferStartSoc: 0 # start charging on battery above soc (0 to disable)
  maxGridSupplyWhileBatteryCharging: 0 # ignore battery charging if AC consumption is above this value
  smartCostLimit: 0 # set cost limit for automatic charging in PV mode

# loadpoint describes the charger, charge meter and connected vehicle
loadpoints:
  - title: Carport # display name for UI
    charger: wallbox # charger
    vehicle: my_car 
    mode: "off" # set default charge mode, use "off" to disable by default if charger is publicly available
    # vehicle: car1 # set default vehicle (disables vehicle detection)
    resetOnDisconnect: true # set defaults when vehicle disconnects
    phases: 3 # electrical connection (normal charger: default 3 for 3 phase, 1p3p charger: 0 for "auto" or 1/3 for fixed phases)
    minCurrent: 6 # minimum charge current (default 6A)
    maxCurrent: 16 # maximum charge current (default 16A)

    # remaining settings are experts-only and best left at default values
    priority: 0 # relative priority for concurrent charging in PV mode with multiple loadpoints (higher values have higher priority)
    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 (only supported for single vehicle)
        mode: always
        # poll interval defines how often the vehicle API may be polled if NOT charging
        interval: 60m
      estimate: true # set false to disable interpolating between api updates (not recommended)
    enable: # pv mode enable behavior
      delay: 1m # threshold must be exceeded for this long
      threshold: 0 # grid power threshold (in Watts, negative=export). If zero, export must exceed minimum charge power to enable
    disable: # pv mode disable behavior
      delay: 3m # threshold must be exceeded for this long
      threshold: 0 # maximum import power (W)
    guardDuration: 5m # switch charger contactor not more often than this (default 5m)

# tariffs are the fixed or variable tariffs
tariffs:
  currency: EUR # three letter ISO-4217 currency code (default EUR)
  grid:
    # either static grid price (or price zones)
    type: fixed
    price: 0.3113 # EUR/kWh

    # or variable tariffs
    # type: tibber
    # token: "" # access token
    # homeid: "" # optional if multiple homes associated to account

    # type: awattar
    # region: de # optional, choose at for Austria
    # charges: # optional, additional charges per kWh
    # tax: # optional, additional tax (0.1 for 10%)

    # type: elering # Nordpool
    # region: ee # or lt, lv, fi
    # charges: # optional, additional charges per kWh
    # tax: # optional, additional tax (0.1 for 10%)
  feedin:
    # rate for feeding excess (pv) energy to the grid
    type: fixed
    price: 0.077789 # EUR/kWh
  co2:
    # co2 tariff provides co2 intensity forecast and is for co2-optimized target charging if no variable grid tariff is specified
    # type: grünstromindex # GrünStromIndex (Germany only)
    # zip: <zip>

    # type: electricitymaps # https://app.electricitymaps.com/map
    # uri: <uri>
    # token: <token>
    # zone: DE

# mqtt message broker
mqtt:
  broker: localhost:1883
  topic: evcc # root topic for publishing, set empty to disable
  user: XXXX
  password: XXXX

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

# eebus credentials
eebus:
  # uri: # :4712
  # interfaces: # limit eebus to specific network interfaces
  # - en0
  # certificate: # local signed certificate, required, can be generated via `evcc eebus-cert`
  #   public: # public key
  #   private: # private key

# 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}
    soc: # vehicle soc update event
      title: Soc updated
      msg: Battery charged to ${vehicleSoc:%.0f}%
    guest: # vehicle could not be identified
      title: Unknown vehicle
      msg: Unknown vehicle, guest connected?
  services:
  # - type: pushover
  #   app: # app id
  #   recipients:
  #   - # list of recipient ids
  # - type: telegram
  #   token: # bot id
  #   chats:
  #   - # list of chat ids
  # - type: email
  #   uri: smtp://<user>:<password>@<host>:<port>/?fromAddress=<from>&toAddresses=<to>
  # - type: ntfy
  #   uri: https://<host>/<topics>
  #   priority: <priority>
  #   tags: <tags>

Log details

Using config file: /config/evcc.yaml
starting evcc: 'EVCC_DATABASE_DSN=/data/evcc.db evcc --config /config/evcc.yaml'
[main  ] INFO 2023/07/03 19:37:52 evcc 0.118.5
[main  ] INFO 2023/07/03 19:37:52 using config file: /config/evcc.yaml
[main  ] INFO 2023/07/03 19:37:52 starting ui and api at :7070
[mqtt  ] INFO 2023/07/03 19:37:52 connecting evcc-118220389 at tcp://localhost:1883
[mqtt  ] DEBUG 2023/07/03 19:37:52 tcp://localhost:1883 connected
[mqtt  ] DEBUG 2023/07/03 19:37:52 tcp://localhost:1883 subscribe ir/power
[lp-1  ] WARN 2023/07/03 19:37:55 poll mode '{always 1h0m0s}' may deplete your battery or lead to API misuse. USE AT YOUR OWN RISK.
[site  ] DEBUG 2023/07/03 19:37:55 static grid tariff
[site  ] WARN 2023/07/03 19:37:55 bufferStartSoc must be larger than bufferSoc
[site  ] INFO 2023/07/03 19:37:55 site config:
[site  ] INFO 2023/07/03 19:37:55   meters:      grid ✓ pv ✓ battery ✓
[site  ] INFO 2023/07/03 19:37:55     grid:      power ✓ energy ✗ currents ✗
[site  ] INFO 2023/07/03 19:37:55     pv 1:      power ✓ energy ✓ currents ✗
[site  ] INFO 2023/07/03 19:37:55     battery 1: power ✓ energy ✗ currents ✗ soc ✓ capacity ✗
[site  ] INFO 2023/07/03 19:37:55   vehicles:
[site  ] INFO 2023/07/03 19:37:55     vehicle 1: range ✓ finish ✓ status ✓ climate ✗ wakeup ✓
[lp-1  ] INFO 2023/07/03 19:37:55 loadpoint 1:
[lp-1  ] INFO 2023/07/03 19:37:55   mode:        off
[lp-1  ] INFO 2023/07/03 19:37:55   charger:     power ✓ energy ✗ currents ✓ phases ✗ wakeup ✓
[lp-1  ] INFO 2023/07/03 19:37:55   meters:      charge ✓
[lp-1  ] INFO 2023/07/03 19:37:55     charge:    power ✓ energy ✗ currents ✓
[site  ] DEBUG 2023/07/03 19:37:55 static grid tariff
[lp-1  ] DEBUG 2023/07/03 19:37:55 phase timer inactive
[lp-1  ] DEBUG 2023/07/03 19:37:55 pv timer inactive
[lp-1  ] DEBUG 2023/07/03 19:37:55 guard timer inactive
[lp-1  ] INFO 2023/07/03 19:37:55 vehicle updated: unknown -> Ioniq
[lp-1  ] DEBUG 2023/07/03 19:37:55 set charge mode: pv
[lp-1  ] DEBUG 2023/07/03 19:37:55 set min soc: 10
[lp-1  ] DEBUG 2023/07/03 19:37:55 set target soc: 100
[site  ] DEBUG 2023/07/03 19:37:55 ----
[lp-1  ] DEBUG 2023/07/03 19:37:55 charge power: 0W
[site  ] DEBUG 2023/07/03 19:37:55 static grid tariff
[site  ] DEBUG 2023/07/03 19:37:55 pv power: 3961W
[site  ] DEBUG 2023/07/03 19:37:55 battery soc: 100%
[site  ] DEBUG 2023/07/03 19:37:55 battery power: 6W
[site  ] DEBUG 2023/07/03 19:37:55 grid power: -3820W
[site  ] DEBUG 2023/07/03 19:37:55 site power: -3714W
[lp-1  ] DEBUG 2023/07/03 19:37:55 vehicle odometer: 1750km
[lp-1  ] DEBUG 2023/07/03 19:37:55 charge currents: [0 0 0]A
[lp-1  ] DEBUG 2023/07/03 19:37:55 charger status: A
[lp-1  ] INFO 2023/07/03 19:37:55 car disconnected
[lp-1  ] DEBUG 2023/07/03 19:37:55 set charge mode: off
[lp-1  ] DEBUG 2023/07/03 19:37:55 set min current: 6
[lp-1  ] DEBUG 2023/07/03 19:37:55 set max current: 16
[lp-1  ] DEBUG 2023/07/03 19:37:55 set min soc: 0
[lp-1  ] DEBUG 2023/07/03 19:37:55 set target soc: 100
[lp-1  ] DEBUG 2023/07/03 19:37:55 set charge mode: pv
[lp-1  ] DEBUG 2023/07/03 19:37:55 set min soc: 10
[lp-1  ] DEBUG 2023/07/03 19:37:55 set target soc: 100
[lp-1  ] DEBUG 2023/07/03 19:37:55 vehicle status: A
[lp-1  ] DEBUG 2023/07/03 19:37:55 vehicle soc: 74%
[lp-1  ] DEBUG 2023/07/03 19:37:55 vehicle soc limit: 100%
[lp-1  ] DEBUG 2023/07/03 19:37:55 vehicle range: 319km
[site  ] DEBUG 2023/07/03 19:37:55 ----
[lp-1  ] DEBUG 2023/07/03 19:37:55 charge power: 0W
[site  ] DEBUG 2023/07/03 19:37:55 static grid tariff
[site  ] DEBUG 2023/07/03 19:37:55 pv power: 3961W
[site  ] DEBUG 2023/07/03 19:37:55 battery soc: 100%
[site  ] DEBUG 2023/07/03 19:37:55 battery power: 5W
[site  ] DEBUG 2023/07/03 19:37:55 grid power: -3820W
[site  ] DEBUG 2023/07/03 19:37:55 site power: -3715W
[lp-1  ] DEBUG 2023/07/03 19:37:55 charge currents: [0 0 0]A
[lp-1  ] DEBUG 2023/07/03 19:37:55 charger status: A
[lp-1  ] DEBUG 2023/07/03 19:37:55 next soc poll remaining time: 59m59s

What type of operating system are you running?

HomeAssistant Add-on

Version

1.188.5

bastian1607 commented 1 year ago

Gut zu sehen, dass der Default "off" überschrieben wird.

[site  ] DEBUG 2023/07/03 19:37:55 ----
[lp-1  ] DEBUG 2023/07/03 19:37:55 charge power: 0W
[site  ] DEBUG 2023/07/03 19:37:55 static grid tariff
[site  ] DEBUG 2023/07/03 19:37:55 pv power: 3961W
[site  ] DEBUG 2023/07/03 19:37:55 battery soc: 100%
[site  ] DEBUG 2023/07/03 19:37:55 battery power: 6W
[site  ] DEBUG 2023/07/03 19:37:55 grid power: -3820W
[site  ] DEBUG 2023/07/03 19:37:55 site power: -3714W
[lp-1  ] DEBUG 2023/07/03 19:37:55 vehicle odometer: 1750km
[lp-1  ] DEBUG 2023/07/03 19:37:55 charge currents: [0 0 0]A
[lp-1  ] DEBUG 2023/07/03 19:37:55 charger status: A
[lp-1  ] INFO 2023/07/03 19:37:55 car disconnected

[lp-1 ] DEBUG 2023/07/03 19:37:55 set charge mode: off

[lp-1  ] DEBUG 2023/07/03 19:37:55 set min current: 6
[lp-1  ] DEBUG 2023/07/03 19:37:55 set max current: 16
[lp-1  ] DEBUG 2023/07/03 19:37:55 set min soc: 0
[lp-1  ] DEBUG 2023/07/03 19:37:55 set target soc: 100

[lp-1 ] DEBUG 2023/07/03 19:37:55 set charge mode: pv

[lp-1  ] DEBUG 2023/07/03 19:37:55 set min soc: 10
[lp-1  ] DEBUG 2023/07/03 19:37:55 set target soc: 100
[lp-1  ] DEBUG 2023/07/03 19:37:55 vehicle status: A
[lp-1  ] DEBUG 2023/07/03 19:37:55 vehicle soc: 74%
[lp-1  ] DEBUG 2023/07/03 19:37:55 vehicle soc limit: 100%
[lp-1  ] DEBUG 2023/07/03 19:37:55 vehicle range: 319km
[site  ] DEBUG 2023/07/03 19:37:55 ----
bastian1607 commented 1 year ago

IMG_9242 IMG_9243

Vielleicht interessant: Selbst wenn ich im Lademodus auf „Aus“ stelle, stellt sich EVCC nach dem disconnecten vom Auto wieder auf PV.

Sind neue Einstellungen in der yaml notwendig? Rotes Dreieck in dem Fall nur, weil ich das Verhalten getestet hatte und daher die "xxx/lala.cgi" von der Senec etwas zu oft hintereinander gepollt hatte...

premultiply commented 1 year ago

Das Fahrzeug Ioniq ist in der Konfig als mode: pv konfiguriert. Und genau das wird auch gemacht.

bastian1607 commented 1 year ago

Das tut EVCC aber nicht. Bitte Beschreibung, Screenshots, yaml und Logfile beachten. Der Default mode ist „off“. Nach dem Abstecken des Autos (Modus aus) wird der Lademodus auf PV gestellt (Modus PV) -> Screenshot im Kommentar Wenn kein Auto angesteckt ist und EVCC neu gestartet wird, wird der Lademodus auf PV gestellt -> Logfile und Screenshots in der Beschreibung

Edit: Es geht mir nicht um das Verhalten von EVCC, wenn das Fahrzeug angesteckt wird, sondern abgesteckt, sprich der Default des Loadpoints.

bastian1607 commented 1 year ago

Ich denke es hat was mit der Fahrzeugerkennung zu tun, so wie das Debug aussieht. Konnte es wieder reproduzieren bei ausgestecktem (!) Auto.

Diese Zeilen stehen direkt nacheinander. Also ja, @premultiply , default bei car ist pv, aber car ist nicht eingesteckt, daher müsste er ja den default des loadpoints nehmen. Das Verhalten war sonst auch immer so.

[lp-1 ] INFO 2023/07/03 21:22:15 vehicle updated: unknown -> Ioniq [lp-1 ] DEBUG 2023/07/03 21:22:15 set charge mode: pv

Auszug aus der yaml: `loadpoints: