E-mobility · Tariff
Charging a car on spot prices
Tariff, price limit and the order between battery, heat pump and car in evcc.
Read article →Technical article · Home Assistant · E-mobility
evcc controls the wallbox by sun, price and departure time; Home Assistant sees the rest of the house. Together the two are stronger than either alone, as long as the tasks are clearly divided. This page shows where evcc runs, how it takes values from Home Assistant, how its data gets back into Home Assistant and which wallboxes need a sponsor token.
From this article on Amazon (Germany):
go-e Charger Gemini flex 2.0 (11 kW)* ·
Shelly Pro 3EM (120 A)*
Marked *: affiliate links. As an Amazon Associate I earn from qualifying purchases.
The evcc documentation describes the relationship briefly: evcc specialises in smart charging and heating, Home Assistant collects and visualises data and offers extensive automation; the two complement each other. As examples of the interplay it names dashboards, charging plans from calendar entries and switching the charging mode based on presence.
This leads to a division of labour that saves trouble: the wallbox belongs to evcc. Home Assistant changes the mode or a charging plan via the integration but does not write its own charging current to the wallbox in parallel. Two controllers on one actuator work against each other; why is explained using the battery as an example in Controlling a home battery with Home Assistant.
evcc runs as a Home Assistant app, as a Docker container, under Linux for example on a Raspberry Pi, and on other systems. For trying it out, the documentation even mentions a retired PC or laptop with a 64-bit CPU from the last ten years; in the long run power consumption and space speak against it. For stability it recommends connecting evcc and the devices by network cable wherever possible and giving the devices fixed addresses in the router.
Which route is right depends on the existing installation. If Home Assistant OS is running anyway, the app is the shortest route. How to set up that foundation properly is covered in Home Assistant as an energy manager.
evcc's documentation puts a note in front of the guide that belongs with it: the app is “a community
integration and is ‘not yet’ officially supported by the evcc maintainers”, because in case of an error the
evcc cli tool, used to provide data for troubleshooting, is missing. The installation itself
needs no command line:
https://github.com/evcc-io/hassio-addon.sqlite_file: /data/evcc.db, and start the app.evcc recommends configuring via the web interface; the settings are then stored in the database. Anyone who
prefers an evcc.yaml places it in /addon_configs/49686a9f_evcc. evcc is updated via
Home Assistant's normal update process.
For surplus charging, evcc needs one thing above all: the grid meter, because it tells how much power is currently left over. If the value is already in Home Assistant, for example from the Shelly Pro 3EM in Energy dashboard with the Shelly Pro 3EM, evcc can take it over directly. Supported are meters for grid, PV and battery, wallboxes, smart plugs, vehicles and notifications.
This is set up in evcc like any other device: add a device, choose “Home Assistant” as the manufacturer,
select the instance and assign entities to the fields. If evcc runs as an app, the instance
http://supervisor/core is available and already authorised; otherwise you log into
Home Assistant once and confirm access. Three rules from the documentation prevent the most common
mistakes:
1234 W cannot be read; the unit belongs in the
unit_of_measurement attribute. evcc converts W and kW, Wh, kWh and MWh itself.-sensor.inverter_power.On Amazon (Germany): Shelly Pro 3EM (120 A)*
The software is open source. Even so, evcc requires a sponsor token for many wallboxes, and the documentation says openly for which: “A sponsor token is required for using many commercial wallboxes.” Exceptions are open-hardware wallboxes, products with good community karma and manufacturers that actively support development. Smart plugs and plugins can be used without a token.
| Route | Recurring | One-off, unlimited |
|---|---|---|
| Directly via Creem.io | 50 € a year | 150 € |
| GitHub Sponsors | $4 a month | $150 |
A token is valid for up to three instances in the same household. It is entered in the web interface under Configuration › Sponsoring, after which evcc must restart. Before paying, the trial token from the sponsorship page lets you check that all devices work; it has limited validity and is renewed regularly.
The go-e Charger in evcc is a frequent search, so here it is in concrete terms. evcc's device templates list sponsorship as a requirement for all go-e Chargers. For Gemini, Gemini flex 2.0, CORE and V3 they also state:
For several models there are also templates for connection via OCPP. How the go-e Charger is controlled under section 14a is covered in go-e Charger and section 14a EnWG.
On Amazon (Germany): go-e Charger Gemini flex 2.0 (11 kW)*
In the other direction, the evcc documentation recommends the ha-evcc integration by marq24. It works regardless of whether evcc runs as an app and provides measurements, settings, charging points and vehicles as entities. It is installed via HACS, where the entry is called “evcc☀️🚘- Solar Charging”; then add the integration under Settings › Devices & services and enter the address of the evcc instance.
Without HACS it works via evcc's REST API or MQTT; MQTT needs a broker such as Mosquitto, which also runs as a Home Assistant app. Via the entities you can then switch the charging mode by presence or set charging plans from the calendar without Home Assistant touching the wallbox itself.
To see evcc on a Home Assistant dashboard you need a card in addition to ha-evcc. The evcc documentation points to the Lovelace card hass-evcc-card by mkshb (MIT licence). It builds on ha-evcc and reads its values from its entities, with no manual entity mapping: it discovers charging points and site values itself.
mode), for example charging point
(default), site, energy flow as a Sankey diagram, grid, statistics, battery or charge plan. Each charging
point gets its own card.If Home Assistant runs in YAML mode, the card cannot register its resource itself; the README then
names the path /local/community/hass-evcc-card/evcc-card.js as a resource of type
module. The card does more than display: through switches and sliders it changes the charging
mode, target charge level and charging current in evcc, among other things. That fits the division of
labour above, because evcc keeps doing the controlling, not a second controller in Home Assistant.
Each charging point in evcc has three modes: Off, Smart and Fast. In Fast mode the wallbox behaves “like a wallbox without evcc”; all automatic decisions are made in Smart mode: surplus charging, charging in cheap or green hours, priorities and charging plans.
For surplus charging, one limit matters that comes from the charging standard. The minimum current under IEC 61851 is 6 A, and that determines the smallest charging power:
| Phases | Minimum (6 A) | Maximum |
|---|---|---|
| single-phase | 1.4 kW | 3.7 kW (16 A) |
| three-phase | 4.1 kW | 11 kW (16 A) or 22 kW (32 A) |
A three-phase wallbox therefore only starts at 4.1 kW of surplus. If the wallbox can switch between single- and three-phase, evcc starts as early as 1.4 kW. For small systems and winter there is the solar share slider: at 50 %, charging starts as soon as the PV system supplies half the minimum power, the rest comes from the grid or the home battery.
What counts is the value at the grid meter. The evcc documentation states explicitly: “On systems with curtailed grid feed-in (‘zero export’), surplus charging does not work.” Why there is no surplus to measure there is explained in Zero export with Home Assistant.
How evcc charges on spot prices and who goes first between battery, heat pump and car is covered in Charging a car on spot prices. How evcc implements a grid operator's setpoint under section 14a is covered in Wallbox “section 14a compliant”.
Yes, as a Home Assistant app, as add-ons are now called. You add the repository github.com/evcc-io/hassio-addon and install the evcc app. The evcc documentation points out that the app is a community integration that is not yet officially supported by the evcc maintainers.
That depends on the wallbox. A sponsor token is required for many commercial wallboxes; exceptions are open-hardware wallboxes, devices with good community karma and manufacturers that support evcc. Smart plugs and plugins work without a token. A trial token lets you check beforehand that everything works.
The software is open source and free. According to evcc, a sponsor token costs 50 euros a year or 150 euros once directly, or 4 dollars a month or 150 dollars once via GitHub Sponsors. It is valid for up to three instances in the same household.
Yes. evcc's device templates list sponsorship as a requirement for the go-e Chargers. For Gemini, Gemini flex 2.0, CORE and V3 they also state at least firmware 052.1, HTTP API v1 and, for phase switching, HTTP API v2.
The evcc documentation recommends the ha-evcc integration by marq24, installed via HACS. It provides measurements, settings, charging points and vehicles as entities. Alternatively the data can be integrated via the REST API or MQTT.
Yes. The evcc documentation points to the Lovelace card hass-evcc-card by mkshb. It requires the ha-evcc integration, is installed via HACS or the Marketplace, and discovers charging points and site values itself. Views exist for charging point, site, energy flow, statistics and charge plan, among others.
No. evcc detects the surplus at the grid meter. On a system whose feed-in is curtailed to zero there is no surplus there, and the evcc documentation states explicitly that surplus charging then does not work.
All statements come from the evcc documentation and its device templates, each with the date it was checked. Prices and terms of the sponsor token are set by the evcc project and can change. Quotations from the German documentation are my translation.
evcc and the ha-evcc integration evolve quickly. The current project documentation is what counts. Haag Automation has no business relationship with the evcc project.
Links marked with an asterisk are affiliate links. As an Amazon Associate I earn from qualifying purchases; the price is unchanged for you. What I recommend does not depend on it.
You want to set up evcc and Home Assistant together and charge your car by sun, price and departure time? I can set it up with you – the first conversation is free.