evcc-io / evcc

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

Beim Starten von HA evcc Addon wird der Betriebsmodus des Q-Cells WR von "Backupmodus" auf "Eigenverbrauch" geändert #13516

Closed itwuzel closed 4 months ago

itwuzel commented 4 months ago

Describe the bug

Beim Starten des evcc Addon Version 0.125.0 HomeAssistandVersion 2024.4.3 wird der Betriebsmodus des Q-Cells WR von "Backupmodus" auf "Eigenverbrauch" geändert.

Einstellungsproblem oder Bug?

Dadurch wird im Q-Cells System u.a. der eingestellte min. SOC für den Backupbetrieb unterschritten.

Steps to reproduce

1.HA Solax (Qcells) Integration über WaveShare TCP/IP <> Modbus RTU Gateway (Typ: Waveshare RS485 TO POE ETH (B)) 2.HA evcc AddOn ebenfalls über den gleichen WaveShare TCP/IP <> Modbus RTU Gateway mit dem Q-Cells WR Verbunden

  1. Q-Cells WR im Betriebsmodus "Backup Mode"
  2. starten des Addon
  3. Q-Cells WR ist jetzt im Betriebsmodus "Eigenverbrauch"

Aktuell wird evcc nur testweise ohne Wallbox betrieben.

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

interval: 30s # control cycle interval. Interval <30s can lead to unexpected behavior, see https://docs.evcc.io/docs/reference/configuration/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:

# 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: info
log: debug
levels:
  site: debug
  lp-1: debug
  lp-2: debug
  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 # use `deny` to raise modbus errors

# 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: Q-Cells_Grid
    type: template
    template: solax
    usage: grid

    # RS485 via TCP/IP (Modbus RTU)
    #modbus: rs485tcpip
    modbus: tcpip
    id: 1
    host: 192.168.22.10 # Hostname
    port: 502 # Port

  - name: Q-Cells_PV
    type: template
    template: solax
    usage: pv

    # RS485 via TCP/IP (Modbus RTU)
    # modbus: rs485tcpip
    modbus: tcpip
    id: 1
    host: 192.168.22.10 # Hostname
    port: 502 # Port

  - name: Q-Cells_Battery
    type: template
    template: solax
    usage: battery  

    # RS485 via TCP/IP (Modbus RTU)
    # modbus: rs485tcpip
    modbus: tcpip
    id: 1
    host: 192.168.22.10 # Hostname
    port: 502 # Port
    # Modbus TCP
    #modbus: tcpip
    #id: 1
    #host: 192.0.2.2 # Hostname
    #port: 502 # Port 

# 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: wallbe
    type: wallbe # Wallbe charger
    uri: 192.168.22.24:502 # ModBus address

# 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: offline
    title: my_car # Wird in der Benutzeroberfläche angezeigt (optional)
    capacity: 50 # Akkukapazität in kWh (optional) 

# site describes the EVU connection, PV and home battery
site:
  title: Garage # display name for UI
  meters:
    grid:       Q-Cells_Grid    # grid meter
    pv:         Q-Cells_PV      # list of pv inverters/ meters
    battery:    Q-Cells_Battery # list of battery meters
    #aux:
    #  - aux # list of auxiliary meters for adjusting grid operating point
  residualPower: 0 # additional household usage margin
  maxGridSupplyWhileBatteryCharging: 0 # ignore battery charging if AC consumption is above this value

# loadpoint describes the charger, charge meter and connected vehicle
loadpoints:
  - title: Wallbox # display name for UI
    charger: wallbe # charger
    # meter: charge # charge meter
    mode: "off" # default charge mode to apply when vehicle is disconnected; use "off" to disable by default if charger is publicly available

    # 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: charging
        # 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.4135 # EUR/kWh
    # zones:
     # - days: Mon-Fri
     #   hours: 2-5
     #   price: 0.2 # EUR/kWh
     # - days: Sat,Sun
     #   price: 0.15 # EUR/kWh

    # or variable tariffs
    # type: tibber
    # token: "476c477d8a039529478ebd690d35ddd80e3308ffc49b59c65b142321aee963a4" # access token
    # homeid: "cc83e83e-8cbf-4595-9bf7-c3cf192f7d9c" # 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: octopusenergy
    # tariff: AGILE-FLEX-22-11-25 # Tariff code
    # region: A # optional

    # type: elering # Nordpool
    # region: ee # or lt, lv, fi
    # charges: # optional, additional charges per kWh
    # tax: # optional, additional tax (0.1 for 10%)

    # type: energinet # Energinet using the price in DKK
    # region: dk1 # or dk2
    # charges: # optional, additional charges per kWh
    # tax: # optional, additional tax (0.1 for 10%)

    # type: entsoe # Entso-E european market data
    # domain: BZN|DE-LU # https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html#_areas
    # securitytoken: # api token
    # charges: # optional, additional charges per kWh
    # tax: # optional, additional tax (0.1 for 10%)

    # type: custom # price from a plugin source; see https://docs.evcc.io/docs/reference/plugins
    # price:
    #   source: http
    #   uri: https://example.org/price.json
    #   jq: .price.current

  feedin:
    # rate for feeding excess (pv) energy to the grid
    type: fixed
    price: 0.08 # EUR/kWh

    # type: octopusenergy
    # tariff: AGILE-FLEX-22-11-25 # Tariff code
    # region: A # optional
  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

    # type: ngeso # National Grid Electricity System Operator data (United Kingdom only) https://carbonintensity.org.uk/
    # provides national data if both region and postcode are omitted - do not supply both at the same time!
    # region: 1 # optional, coarser than using a postcode - see https://api.carbonintensity.org.uk/ for full list
    # postcode: SW1A1AA # optional

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

# 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

# Log nach start des HA Addon und aus dem Logbereich des Addon

Using config file: /config/evcc.yaml
starting evcc: 'EVCC_DATABASE_DSN=/data/evcc.db evcc --config /config/evcc.yaml'
[main  ] INFO 2024/04/20 14:31:15 evcc 0.125.0
[main  ] INFO 2024/04/20 14:31:15 using config file: /config/evcc.yaml
[main  ] INFO 2024/04/20 14:31:15 starting ui and api at :7070
[site  ] WARN 2024/04/20 14:31:15 battery configured but residualPower is missing or <= 0 (add residualPower: 100 to site), see https://docs.evcc.io/en/docs/reference/configuration/site#residualpower
[site  ] INFO 2024/04/20 14:31:15 site config:
[site  ] INFO 2024/04/20 14:31:15   meters:      grid ✓ pv ✓ battery ✓
[site  ] INFO 2024/04/20 14:31:15     grid:      power ✓ energy ✓ currents ✗
[site  ] INFO 2024/04/20 14:31:15     pv 1:      power ✓ energy ✓ currents ✗
[site  ] INFO 2024/04/20 14:31:15     battery 1: power ✓ energy ✗ currents ✗ soc ✓ capacity ✗
[site  ] INFO 2024/04/20 14:31:15   vehicles:
[site  ] INFO 2024/04/20 14:31:15     vehicle 1: range ✗ finish ✗ status ✗ climate ✗ wakeup ✗
[lp-1  ] INFO 2024/04/20 14:31:15 loadpoint 1:
[lp-1  ] INFO 2024/04/20 14:31:15   mode:        off
[lp-1  ] INFO 2024/04/20 14:31:15   charger:     power ✗ energy ✗ currents ✗ phases ✗ wakeup ✗
[lp-1  ] INFO 2024/04/20 14:31:15   meters:      charge ✗
[site  ] DEBUG 2024/04/20 14:31:15 set battery discharge control: true
[lp-1  ] DEBUG 2024/04/20 14:31:15 phase timer inactive
[lp-1  ] DEBUG 2024/04/20 14:31:15 pv timer inactive
[lp-1  ] ERROR 2024/04/20 14:31:18 charger enabled: dial tcp 192.168.22.24:502: connect: no route to host
[site  ] DEBUG 2024/04/20 14:31:18 ----
[lp-1  ] DEBUG 2024/04/20 14:31:18 charge power: 0W
[site  ] DEBUG 2024/04/20 14:31:18 pv power: 3847W
[site  ] DEBUG 2024/04/20 14:31:18 battery soc: 100%
[site  ] DEBUG 2024/04/20 14:31:18 battery power: 0W
[site  ] DEBUG 2024/04/20 14:31:18 grid meter: -3015W
[site  ] DEBUG 2024/04/20 14:31:18 site power: -3015W
[lp-1  ] ERROR 2024/04/20 14:31:21 charger status: dial tcp 192.168.22.24:502: connect: no route to host
[site  ] DEBUG 2024/04/20 14:31:21 set battery mode: normal
[site  ] DEBUG 2024/04/20 14:31:48 ----

What type of operating system are you running?

HomeAssistant Add-on

Version

0.125.0

andig commented 4 months ago

Battery control ausschalten!

itwuzel commented 4 months ago

Danke für die schnelle Antwort!

Hmm, sorry bin noch nicht so firm...

Du meinst die Bezüge in der der site bzw. meters Konfiguration wieder auskommentieren? Scheint geholfen zu haben.

Bedeutet ich kann die Batterienutzung so nicht steuern, oder? Bug oder Future?

Gruß Thomas

VolkerK62 commented 4 months ago

ich denke @andig meinte den Schalter in den Batterieeinstellungen (am unteren Rand). https://docs.evcc.io/docs/features/battery#entladesperre-beim-schnelladen

itwuzel commented 4 months ago

Ahh!

Das ist der Trick und hat das Verhalten wie erwartet geändert! Es wird damit nicht mehr der Betriebsmodus geändert.

Wäre evtl. ein Tipp für die Doku oder FAQ

Vielen Dank Thomas

andig commented 4 months ago

Du meinst wir müssen "benutze den Schalter nicht" dokumentieren? Oder was fehlt da konkret?

itwuzel commented 4 months ago

Evtl. einen Hinweis dass ein aktivieren der Einstellung bei Q-Cells (und vermutlich auch bei Solax) den Betriebsmodus von "Backup Betrieb" auf Eigenverbrauch umstellt.

andig commented 4 months ago

Gerne direkt PR fürs Template

itwuzel commented 4 months ago

Sorry, PR == Pull Request?

Komme mit GitHub oder dem Arbeiten damit nicht zurecht, aber ist ja soweit alles gut. Bin leider kein Programmierer der sich täglich damit auseinandersetzt.

Schönen 1. Mai Feiertag.

andig commented 4 months ago

@itwuzel genau, Pull Request. Du kannst das Template https://github.com/evcc-io/evcc/blob/fd653ec838eeedfa40ed26835184649fd705e51a/templates/definition/meter/solax.yaml direkt hier auf Github bearbeiten und speichern. Sollte ganz einfach sein!