EVCC · Pašpatēriņš · Fronius · SMA · SG Ready · KNX · 10 min lasīšanai

Elektroauto uzlāde no saules paneļiem ar EVCC un KNX: Fronius Modbus un SG Ready saskaņošana

EVCC (Electric Vehicle Charge Controller) ir atvērtā koda pašpatēriņa kontrolieris, kas nolasa reāllaika saules ģenerāciju no Fronius vai SMA invertoriem, izmantojot Modbus TCP, un automātiski pielāgo elektroauto uzlādes strāvu atbilstoši saules enerģijas pārpalikumam. Integrācija ar KNX, izmantojot EVCC KNX spraudni, ļauj pārslēgt režīmus un uzraudzīt statusu no ēkas automatizācijas slāņa.

EVCC pārskats: ko tas dara un kā darbojas

EVCC ir atvērtā koda projekts (github.com/evcc-io/evcc), kas kalpo kā specializēts pašpatēriņa kontrolieris elektroauto uzlādei. Tas savienojas ar saules invertoru, lai nolasītu reāllaika ģenerāciju un tīkla jaudu, savienojas ar vienu vai vairākiem uzlādes stacijām, izmantojot OCPP vai vietējos API, un nepārtraukti pielāgo uzlādes strāvu, lai maksimāli palielinātu saules enerģijas izmantošanu uzlādei, nevis eksportētu to tīklā.

EVCC darbojas kā Docker konteiners vai Home Assistant papildinājums, padarot to viegli izvietojamu uz Raspberry Pi 4 kopā ar Home Assistant. EVCC tīmekļa panelis nodrošina reāllaika vizualizāciju par saules jaudu, tīkla plūsmu, akumulatora uzlādes līmeni un uzlādes stāvokli. KNX integrācijai EVCC KNX spraudnis, kas iespējots evcc.yaml failā, publicē EVCC stāvokļa mainīgos uz KNX grupu adresēm un nolasa režīmu izvēles grupu adreses no KNX spiedpogām.

EVCC izvietošanas iespējas

  • Raspberry Pi 4 (4 GB): EVCC Docker konteinerā, darbojas 24/7 ar ~4 W patēriņu
  • Home Assistant OS: Oficiālais EVCC papildinājums, viens serveris
  • Synology NAS: Docker konteiners Container Manager
  • Proxmox VM: Docker vai vietējā Linux bināra versija mājas serveriem

EVCC atbalstītie automobiļi (daļējs saraksts)

  • Tesla (Model 3, Model Y, Model S) — caur Tesla API
  • VW ID.4, ID.3 — caur WeConnect API
  • Hyundai Ioniq 5, Ioniq 6 — caur Bluelink API
  • BMW iX, i4 — caur BMW ConnectedDrive API
  • Auto bez API: fiksēts 80% akumulatora ierobežojums

Fronius GEN24 Modbus konfigurācija evcc.yaml

EVCC nolasa Fronius GEN24 invertoru caur SunSpec Modbus TCP, izmantojot iebūvēto Fronius skaitītāja tipu. Konfigurācijā nepieciešama statiska IP adrese invertoram un Modbus TCP ieslēgšana Fronius tīmekļa servera iestatījumos.

evcc.yaml — Fronius GEN24 skaitītāja un lādētāja konfigurācija

meters:
  - name: fronius_pv
    type: template
    template: fronius-symo
    uri: http://192.168.1.100   # Fronius static IP
    usage: pv                   # PV generation meter

  - name: fronius_grid
    type: template
    template: fronius-smart-meter
    uri: http://192.168.1.100
    usage: grid                 # Grid import/export meter

  - name: fronius_battery
    type: template
    template: fronius-battery
    uri: http://192.168.1.100
    usage: battery              # Battery SOC + charge power (GEN24 Plus only)

chargers:
  - name: easee_home
    type: template
    template: easee
    user: user@email.com
    password: EaseeAppPassword
    charger: XXXXXXXX           # Easee charger serial number

vehicles:
  - name: my_tesla
    type: template
    template: tesla
    title: Tesla Model 3
    accessToken: <Tesla API token>
    refreshToken: <Tesla refresh token>

site:
  title: Home
  meters:
    grid: fronius_grid
    pv: fronius_pv
    battery: fronius_battery
  loadpoints:
    - title: EV Charger
      charger: easee_home
      vehicle: my_tesla
      mode: pv                  # Default: PV-only self-consumption mode
      minCurrent: 6             # Minimum 6A (1.38kW @ 230V)
      maxCurrent: 16            # Maximum 16A (3.68kW @ 230V)

evcc.yaml — SMA Energy Meter alternatīva

# SMA Sunny Boy + SMA Energy Meter
meters:
  - name: sma_pv
    type: template
    template: sma-sunnyboy
    uri: https://192.168.1.101   # SMA inverter static IP (HTTPS)
    password: <SMA web UI password>
    usage: pv

  - name: sma_grid
    type: template
    template: sma-energymeter
    # SMA Energy Meter uses Multicast UDP — no IP config needed
    serial: 1234567890           # Serial from SMA Energy Meter label
    usage: grid

EVCC KNX spraudnis: iespējošana un konfigurēšana

EVCC KNX spraudnis savieno EVCC ar KNX kopni caur KNX IP interfeisu (KNXnet/IP tunelēšana vai maršrutēšana). Tas publicē EVCC slodzes punkta stāvokli uz KNX grupu adresēm un klausās režīma komandas no KNX pogām vai automatizācijas scenārijiem. Iespējojiet to evcc.yaml sadaļā messaging vai plugins.

evcc.yaml — KNX spraudņa konfigurācija

# evcc.yaml — KNX plugin section
knx:
  gateway: 192.168.1.10   # KNX IP interface / IP router static IP
  # or use: gateway: 224.0.23.12 (KNX multicast for IP routing)

  # Mode selection GAs — written by KNX pushbutton or automation
  # Values: 0=off, 1=now (fast), 2=minpv (min+pv), 3=pv (solar only)
  mode: "10/1/0"

  # Status GAs — published by EVCC to KNX (read-only from KNX side)
  activeMode: "10/1/1"         # Current active mode (DPT 5.010)
  charging: "10/1/2"           # Charging active boolean (DPT 1.001)
  chargePower: "10/1/3"        # Current charge power W (DPT 13.010)
  sessionEnergy: "10/1/4"      # Session energy kWh (DPT 14.056)
  vehicleSoc: "10/1/5"         # Vehicle SOC % (DPT 5.001, if API connected)
  pvPower: "10/1/6"            # PV power W from inverter (DPT 13.010)
  gridPower: "10/1/7"          # Grid power W signed (DPT 13.010)
EVCC režīmsKNX vērtībaUzvedībaTriggers no KNX
Izslēgts0Uzlāde atslēgta — EV atvienots no grafikaIlga pogas nospiešana vai manuāla pārslēgšana
Tagad (ātri)1Uzlāde ar maksimālo strāvu neatkarīgi no saules enerģijasShort press: 'Charge Now' scene
min PV2Uzlāde ar minimumu (6A) + palielināšana ar saules pārpalikumuShort press: 'Min + Solar' scene
PV3Tikai no saules: apturēšana zem 6A sliekšņa, atsākšana, kad ir pārpalikumsNoklusējums / KNX grafiks plkst. 09:00

SG Ready siltumsūkņa koordinācija: prioritātes loģika

When both EVCC (controlling EV charging) and SG Ready (controlling heat pump) compete for the same PV surplus, a priority arbitration layer prevents grid import while maximising total self-consumption across both loads. The coordination logic runs in KNX (MDT Logic Module) or Home Assistant automations using EVCC's KNX status GAs.

SG Ready + EVCC prioritāšu koordinācijas loģika

Source data from KNX GAs (all published by EVCC KNX plugin):
  GA 10/1/6 = PV power W (from Fronius Modbus)
  GA 10/1/7 = Grid power W (negative = export, positive = import)
  GA 10/1/3 = Current EV charge power W

Priority logic (KNX Logic Module or HA automation):

STEP 1 — Heat pump base load:
  IF GA 10/1/7 < −500W (exporting > 500W):
    → SG Ready State 3 (S2=1, S1=0) = encouraged mode
    Heat pump increases setpoint by +2°C, absorbs ~1 kW extra

STEP 2 — EV charging from remainder:
  Available for EV = GA 10/1/7 (grid export W) − 0W margin
  IF available > 1400W (enough for 6A minimum):
    → Write EVCC mode=pv to GA 10/1/0 (value 3)
    EVCC automatically adjusts current to use remaining surplus

STEP 3 — Maximum surplus (SG Ready State 4):
  IF GA 10/1/7 < −6000W AND EVCC charging at maximum (16A):
    → SG Ready State 4 (S1=1, S2=1) = maximum HP power
    Heat pump runs at rated capacity, absorbs 3–6 kW additional

STEP 4 — Grid import prevention:
  IF GA 10/1/7 > +200W (importing more than 200W):
    → SG Ready → State 2 (normal, reduce heat pump load)
    → If still importing after 60s: EVCC mode=off (suspend EV)
    Prevents the heat pump + EV combination from causing grid import

EVCC ABB Terra lādētāja konfigurācija

ABB Terra AC lādētāji (11 kW un 22 kW) bieži tiek izmantoti komerciālās KNX ēkās. EVCC atbalsta ABB Terra, izmantojot OCPP 1.6J, ar tādu pašu konfigurācijas pieeju kā Easee, bet nedaudz atšķirīgu OCPP savienojuma URL formātu.

evcc.yaml — ABB Terra lādētāja konfigurācija

chargers:
  - name: abb_terra_1
    type: template
    template: ocpp
    id: ABBTerra01              # Charge point ID configured in ABB Terra
    # ABB Terra OCPP central system URL in charger settings:
    # ws://192.168.1.200:8887/ABBTerra01
    maxCurrent: 32              # ABB Terra AC W22 max 32A 3-phase

# ABB Terra specific: enable OCPP in charger web UI
# URL: http://<ABB-terra-IP>/configuration
# OCPP Central System URI: ws://evcc-server-ip:8887/ABBTerra01
# OCPP version: OCPP16 (select from dropdown)

EVCC panelis ar KNX statusa grupu adresēm

EVCC tīmekļa panelis (pieejams http://evcc-server-ip:7070) nodrošina reāllaika pašpatēriņa vizualizāciju. KNX vizualizācijas sistēmām (Gira X1, IP-Symcon, ARISTO BewO) EVCC KNX statusa GA nodod reāllaika datus paneļu displejiem un mobilo lietotņu paneļiem.

KNX vizualizācijas integrācija EVCC statusam

Gira X1 / Gira HomeServer visualisation page:
  Display widget: "PV Power" → reads GA 10/1/6 (DPT 13.010 W)
  Display widget: "Grid Power" → reads GA 10/1/7 (DPT 13.010 W)
  Display widget: "EV Charging W" → reads GA 10/1/3
  Toggle button: "Charge Mode" → writes 1/2/3 to GA 10/1/0
  Indicator lamp: "Charging Active" → reads GA 10/1/2 (DPT 1.001)

IP-Symcon dashboard:
  Create KNX variables linked to EVCC GAs
  Dashboard widget type: Gauge (PV Power, 0–10000W)
  Dashboard widget type: LED indicator (Charging Active)
  Dashboard widget type: Selector (Mode: Off/Now/MinPV/PV)
  → Variable change triggers IPS script to write GA 10/1/0

KNX touch panel (e.g. Gira e2 or MDT IP touch panel):
  EV charging page with live power values
  Mode selector from page pushbutton widgets
  Session energy total shown in kWh display element

Nodošana ekspluatācijā ar reāllaika PV datiem

EVCC nodošana ekspluatācijā jāveic dienā ar aktīvu saules ģenerāciju, lai pārbaudītu, vai visa ķēde — no Fronius Modbus datiem caur EVCC loģiku līdz OCPP strāvas regulēšanai un KNX GA atjauninājumiem — darbojas pareizi reālos apstākļos.

EVCC nodošanas ekspluatācijā testu secība

Step 1 — Inverter data verification:
  Open EVCC dashboard (http://evcc-ip:7070)
  Confirm: PV power > 0W on sunny morning by 10:00
  Confirm: Grid power negative (exporting) when PV > building load
  Cross-check: EVCC PV power should match Fronius webserver ±5%

Step 2 — Charger connection test:
  Plug EV into charger
  EVCC dashboard: Loadpoint shows "Connected" status
  Vehicle SOC displayed (if API configured)

Step 3 — PV mode test:
  Set EVCC mode: PV (write 3 to GA 10/1/0 from ETS6)
  Observe: EVCC begins charging when surplus > 1.4 kW
  EVCC dashboard: current slider visible and tracking solar

Step 4 — KNX status GA verification:
  ETS6 Group Monitor: watch GA 10/1/3 (charge power)
  Verify: value updates every 30 seconds as current changes
  Watch GA 10/1/2: confirms 1 (true) when EV charging active

Step 5 — Mode switching from KNX:
  ETS6 → write 1 to GA 10/1/0 (mode: now/fast)
  Confirm: EVCC dashboard shows "Now" mode, current jumps to 16A
  Write 3 back → confirm PV mode resume, current reduces to surplus-matched level

Step 6 — SG Ready coordination test:
  With EV charging at 6A (low surplus): confirm SG Ready stays at State 2
  With >3kW surplus: confirm SG Ready activates State 3
  Confirm EV current increases alongside SG Ready activation

Vai nepieciešams EVCC pašpatēriņa panelis ar KNX integrāciju?

Mēs konfigurējam EVCC ar Fronius vai SMA Modbus, KNX spraudņa iestatīšanu, SG Ready koordinācijas loģiku un pilnu nodošanas ekspluatācijā dokumentāciju — izvietots un pārbaudīts uz Raspberry Pi vai HA Green kopā ar jūsu KNX paneli.

Pieprasīt piedāvājumu →
Ielādējas...
Uz augšu