Skip to content

EV Smart Charging

bolagnaise edited this page Feb 9, 2026 · 8 revisions

EV Smart Charging

PowerSync coordinates EV charging alongside battery optimization using dynamic power sharing. The EV charging plan is fed into the battery optimizer's load forecast so both systems plan around each other.

How It Works

The EV coordinator calculates available power for charging based on:

  1. Grid capacity limit
  2. Current battery charging power
  3. Solar surplus (production minus home load minus battery absorption)

The planned EV charging windows are overlaid onto the optimizer's load forecast, so the LP solver sees the expected EV load and adjusts battery scheduling accordingly.

Example: 2am cheap period, 7kW grid capacity

Battery schedule: Charge at 5kW
Available for EV: 7kW - 5kW = 2kW
EV charging amps: 2000W / 240V = 8A

If battery reduces to 3kW:
Available for EV: 7kW - 3kW = 4kW
EV charging amps: 4000W / 240V = 16A

During solar surplus:

Solar production: 8kW
Home load: 2kW
Battery charging: 4kW
Excess solar: 8kW - 2kW - 4kW = 2kW
Grid capacity still available: 7kW
Total for EV: 2kW + 7kW = 9kW (capped at charger max)

Charging Modes

Mode Description
Solar Only Only charge from excess solar production
Solar Preferred Prefer solar, use grid during cheap periods if needed
Cost Optimized Charge during cheapest periods (grid or solar)
Time Critical Charge immediately to meet departure time

Supported EV Chargers

EV charger support is experimental and depends on the HA integration for your charger exposing the right entities and services.

Charger Type Control Method Notes
Tesla Wall Connector Tesla BLE integration Requires Tesla BLE
OCPP Chargers OCPP HA integration Via ocpp.set_charge_rate service
Wallbox Wallbox HA integration Via wallbox.set_charging_current service
Easee Easee HA integration Via easee.set_charger_dynamic_limit service
Generic Switch + Number entity Any charger with on/off switch and amps control

If your charger's HA integration uses different service names or entity patterns, it may not work automatically. Please report issues on Discord.

Configuration

  1. In the mobile app: Settings > EV Charging
  2. Enable Smart EV Charging
  3. Select your Charger Type
  4. Enter charger connection details
  5. Set your Grid Capacity (typically 7kW single phase, 22kW three phase)

Charging Parameters

Setting Description
Departure Time When you need the car ready
Target SOC Desired battery percentage
Charging Mode Solar Only, Solar Preferred, Cost Optimized, or Time Critical
Home Battery Minimum Don't discharge home battery below this for EV charging
Max Grid Price Maximum price (c/kWh) willing to pay for grid charging

Optimizer Integration

When EV integration is enabled, the optimizer automatically:

  1. Reads the AutoScheduleExecutor's planned charging windows
  2. Overlays the expected EV power draw onto the household load forecast
  3. Runs the LP solver with the combined load (household + EV)
  4. The battery schedule accounts for EV charging — e.g., charges battery earlier to avoid competing for grid import during EV windows

This uses one-step delayed feedback (previous cycle's EV plan). Since both systems run every 5 minutes, this converges within 2-3 cycles.

Clone this wiki locally