An electric car is often the biggest flexible load a house with solar panels has. If it charges while the panels are exporting, that energy stays at home instead of going to the grid at a low price. evcc is an open-source energy manager built for exactly this: it reads how much power you are exporting, adjusts the charging current to match and pauses when the surplus is gone. It runs locally, on a Raspberry Pi, a NAS, a spare PC or alongside Home Assistant, and talks to chargers, meters and inverters over your home network.

This guide covers what evcc needs to work, why a small surplus often is not enough to start charging, how phase switching helps, and how to stop evcc and the home battery from competing for the same sunshine.

What evcc needs

Three things decide whether surplus charging will work in your house.

A readable grid meter. evcc works from the power at the grid connection: how much you are importing or exporting right now. That reading can come from the utility's meter if it has a readable interface, or from an extra meter installed with the solar system, which is common when there is a home battery. Its documentation calls the grid meter "the core of evcc". Without it, evcc can only charge based on solar production minus an estimated house consumption (the residualPower setting), which is not true surplus charging.

A controllable charger. evcc must be able to set the charging current. Most current wallboxes have an interface for this, over Ethernet, Wi-Fi, LTE or RS-485 (Modbus RTU), and OCPP has become the common open protocol. The supported models are listed in the evcc documentation. A smart plug with power metering, such as a TP-Link Tapo P110, works for a first test, but evcc warns it is not a long-term solution for a car: it can only switch on and off, not regulate, and it switches under full load because it cannot talk to the car first.

Somewhere to run it. Any 64-bit Intel-compatible machine from the last ten years should do for a trial, and there are installation guides for a ready-made Raspberry Pi image, Docker, Linux, Windows, macOS, Proxmox and Home Assistant. For a permanent setup, evcc recommends wiring both itself and the devices it controls with network cables where possible.

The solar inverter itself is optional. With a grid meter and a controllable charger, all the essential features work, including surplus charging. Without the inverter you lose some charts and the solar-share statistics.

One more thing to check before you start: many commercial chargers need a sponsor token. evcc is free software, but it is funded by its users, and the token unlocks charger types from manufacturers that do not support the project. Open-hardware chargers, manufacturers that actively support evcc, smart plugs and plugins work without one. At the time of writing, a token costs $4 a month or $150 once through GitHub Sponsors, or €50 a year or €150 once directly. A trial token lets you check all your devices first.

Installing and adding devices

On a NAS or other home server, evcc can run in Docker. The documentation recommends host networking, so that the setup screens can find devices on your network and protocols like mDNS and UDP-based chargers work without extra ports:

services:
  evcc:
    container_name: evcc
    image: evcc/evcc:latest
    network_mode: host
    volumes:
      - /home/user/.evcc:/root/.evcc
    restart: unless-stopped

Mount the whole /root/.evcc directory, never the single evcc.db file: the SQLite database keeps extra files next to it that must persist together. If you use RS-485 adapters rather than networked devices, evcc suggests a direct installation instead of Docker.

Then open http://<host>:7070, set an administrator password and add devices under Configuration: the grid meter first, then the charging point, then solar and battery if you have them. While you type an address, evcc suggests devices it found on the same network segment. It will not find devices in another VLAN or subnet, so if your chargers and inverter live on an IoT VLAN, enter their addresses by hand. Giving them fixed addresses in the router saves trouble later.

The older evcc.yaml configuration file still works, but the web interface is now the recommended way, and some newer features can only be set there.

Why charging does not start at 1 kW of surplus

This is the first thing most people notice. The charging standard IEC 61851 sets a minimum of 6 A, so every car has a minimum charging power, and it depends on how many phases are in use:

Phases Minimum (6 A) Maximum
1 1.4 kW 3.7 kW (16 A)
3 4.1 kW 11 kW (16 A) or 22 kW (32 A)

Most wallboxes are connected on three phases, so the car cannot charge at less than about 4.1 kW. On a winter afternoon, a typical rooftop system may never export that much, and in Smart mode evcc by default waits until the surplus covers the full minimum for a while before it starts.

You have three ways to deal with it.

Phase switching. Chargers with automatic 1-phase/3-phase switching let evcc drop to a single phase and start at 1.4 kW, then switch to three phases when the surplus grows. evcc recommends this feature if you are still choosing a charger, and the supported list marks which models have it. Without it, the documentation mentions two workarounds: a contactor that disconnects phases 2 and 3 ahead of the charger (only switch it with the car unplugged), or a single-phase cable in winter. Either way, set the charging point to single phase in evcc so it calculates the threshold correctly.

The Solar Share slider. In the charging point settings, under Solar Surplus, this slider sets how much of the minimum charging power has to come from solar. At 100%, charging waits for a full surplus. At 50%, it starts when solar covers half, and the rest comes from the grid or the home battery. At 0%, any surplus starts it.

Always charge. An option in the Smart mode menu that starts at minimum power immediately and only adjusts upwards when surplus appears, without pausing. It exists partly because some cars do not like being started and stopped repeatedly: according to evcc, a few refuse to resume until you unlock the car or replug the cable. If yours does that, Always charge or longer start and stop delays (in the charging point's behaviour settings) will help.

The three modes

Each charging point has three modes:

  • Off - the car does not charge.
  • Fast - full power immediately, as if evcc were not there.
  • Smart - all automatic decisions: solar surplus, cheap or low-CO₂ hours if you have a dynamic tariff or CO₂ forecast, and charging plans with a departure time and a target.

In Smart mode, if none of these applies (at night, with no plan and no cheap hour), the car does not charge. The exception is a minimum charge level you can set per vehicle: below it, the car charges at full power until it gets there. That is a good safety net for a car that has to be ready for an emergency trip.

A vehicle integration is optional. Without it, evcc still controls the charger, but it cannot see the car's state of charge, because a basic charger cannot read it. evcc gets that data through the manufacturer's online API. What the API offers varies by brand, and some manufacturers charge for access.

Sharing the surplus with a home battery

A home battery reacts much faster than any charger, so without rules it takes every watt of surplus first. That is evcc's default too: in Smart mode, the car only starts when the battery cannot absorb any more.

On the Battery page you can change the order:

  • Battery usage sets the charge level up to which the home battery has priority. Set it to 50%, and once the battery reaches 50%, the surplus goes to the car while evcc regulates charging so the battery holds its level.
  • Battery as charging buffer releases the top of the battery for the car. If you release everything above 75% and the battery is full in the evening, evcc keeps charging the car at minimum power from the battery until it drops to 75%.
  • Start solar charging automatically lets charging start from the battery alone, for example once it is above 90%, even with no surplus at that moment.
  • Battery Boost is a per-session button that adds the battery's full output to the solar surplus, down to a limit you set.

evcc also points out the cost: energy that goes through the home battery first loses 5-10% in conversion, depending on the system, so direct solar charging is better whenever the timing allows.

With batteries that support active control, evcc can also lock discharge during fast or planned charging, so a cheap night tariff charges the car rather than draining the battery. Whether your system follows these commands can be tested with evcc meter verifybatterymodes.

Where surplus charging does not work

  • Zero-export systems. evcc's control loop works from what the grid meter shows. If your inverter is set to regulate export to zero, there is no export to measure, and the documentation states plainly that surplus charging does not work.
  • Chargers that start on their own. Some wallboxes begin charging as soon as you plug in or show an RFID card. evcc notices and stops the session after a short time, but it cannot always prevent the start.
  • Unreliable links. Timeouts usually come from weak Wi-Fi, Powerline adapters or poor RS-485 cabling, or from devices that accept only one connection, so another system polling the same inverter can lock evcc out.

A sensible first setup

  1. Add the grid meter and check that import and export show the right sign.
  2. Add the charger, set the phases correctly, and test Fast and Off.
  3. Switch to Smart on a sunny day and watch it start, follow the surplus and pause.
  4. If it rarely starts, lower the Solar Share or look at phase switching before buying more panels.
  5. Only then add the battery rules and a vehicle integration.