-
-
Notifications
You must be signed in to change notification settings - Fork 16
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.
The EV coordinator calculates available power for charging based on:
- Grid capacity limit
- Current battery charging power
- 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)
| 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 |
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.
- In the mobile app: Settings > EV Charging
- Enable Smart EV Charging
- Select your Charger Type
- Enter charger connection details
- Set your Grid Capacity (typically 7kW single phase, 22kW three phase)
| 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 |
When EV integration is enabled, the optimizer automatically:
- Reads the AutoScheduleExecutor's planned charging windows
- Overlays the expected EV power draw onto the household load forecast
- Runs the LP solver with the combined load (household + EV)
- 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.