### Example from parameter: from Source: https://docs.evcc.io/en/integrations/rest-api/operations/deleteenergymetrics Example value for the 'from' query parameter, a start time in RFC3339 format. ```plaintext 2026-07-01T00:00:00Z ``` -------------------------------- ### Start evcc with configuration file Source: https://docs.evcc.io/en/installation/windows Use this command to start evcc with an evcc.yaml configuration file instead of the web interface. The configuration file is an alternative setup method; see the Configuration documentation for details. ```bash ./evcc -c evcc.yaml ``` -------------------------------- ### Minimal evcc.yaml configuration example Source: https://docs.evcc.io/en/installation/configuration A template file containing demo devices to serve as a starting point for your configuration. Replace the demo templates with your actual hardware settings. ```yaml ## minimal configuration example site: title: Home # display name for UI meters: grid: my_grid pv: - my_pv battery: - my_battery # see https://docs.evcc.io/en/docs/reference/configuration/loadpoints loadpoints: - title: Garage # display name for UI charger: my_charger # charger vehicle: my_car # default vehicle # meter definitions # name can be freely chosen and is used as reference when assigning meters to site and loadpoints # for documentation see https://docs.evcc.io/docs/meters meters: # replace with your real grid meter - name: my_grid type: template template: demo-meter usage: grid power: -1000 # 1 kW feed-in # replace with your real solar system - name: my_pv type: template template: demo-meter usage: pv power: 4000 # 4 kW production # replace with your real battery - name: my_battery type: template template: demo-battery usage: battery power: -1000 # 1 kW battery charging soc: 50 # 50 % state of charge # replace with your real charger # see https://docs.evcc.io/docs/chargers chargers: - name: my_charger type: template template: demo-charger status: C # charging power: 2000 # 2 kW charging power enabled: true # optional # replace with your real vehicle (optional) # see https://docs.evcc.io/docs/vehicles vehicles: - name: my_car type: template template: offline title: blue e-Golf capacity: 50 # in kWh # enter your real grid tariff and feed-in price # see https://docs.evcc.io/docs/tariffs tariffs: currency: EUR grid: type: fixed price: 0.29 # EUR/kWh feedin: type: fixed price: 0.10 # EUR/kWh ``` -------------------------------- ### Install completions for every new session on Linux Source: https://docs.evcc.io/en/reference/cli/evcc_completion_bash Execute this command once to install bash completions for every new session on Linux. You will need to start a new shell for the setup to take effect. ```bash evcc completion bash > /etc/bash_completion.d/evcc ``` -------------------------------- ### Start Claude Code and query solar charging Source: https://docs.evcc.io/en/integrations/mcp Starts Claude Code and shows an example query about solar charging. The query requires a configured PV forecast to work. ```bash claude ╭──────────────────────────────────────────────────────────────────────────────────────────╮ │ > Will I be able to fill my car with solar energy today? │ ╰──────────────────────────────────────────────────────────────────────────────────────────╯ ``` -------------------------------- ### Event definition example for start event Source: https://docs.evcc.io/en/reference/configuration/messaging Example of defining a start event with title and message using simple placeholder syntax. ```yaml start: # charge start event title: Charge started msg: Started charging in "${mode}" mode ``` -------------------------------- ### Add a Server Example Source: https://docs.evcc.io/en/reference/app Example of a fully populated evcc://server URL with encoded parameters. ```text evcc://server?url=https://demo.evcc.io&title=Demo%20Server&username=admin&password=secret ``` -------------------------------- ### Example curtailers and site configuration Source: https://docs.evcc.io/en/reference/configuration/curtailers Shows a curtailer device configuration using the solaredge template and its reference in site.curtailers. The limit is passed as a percentage of the installed generator power (productionnominalmax). ```yaml curtailers: - name: my_curtailer type: template template: solaredge modbus: tcpip host: 192.168.0.10 port: 1502 id: 1 productionnominalmax: 15000 # installed generator power of the whole installation (Wp) site: curtailers: - my_curtailer ``` -------------------------------- ### Set battery buffer start SoC using cURL Source: https://docs.evcc.io/en/integrations/rest-api/operations/setbufferstartsoc Example request using cURL to set the buffer start SoC to 60%. ```bash curl --request POST \ --url https://demo.evcc.io/api/bufferstartsoc/60 ``` -------------------------------- ### Docker CLI Installation for SMA Devices and EEBus Source: https://docs.evcc.io/en/installation/docker Command for setups requiring host networking and machine-id access for SMA Sunny Home Manager or EEBus. ```bash sudo docker run -d --name evcc \ -v /home/user/evcc.yaml:/etc/evcc.yaml \ -v /home/user/.evcc:/root/.evcc \ -p 7070:7070 \ -p 8887:8887 \ -p 9522:9522/udp \ -p 5353:5353/udp \ -p 4712:4712 \ --network host \ -v /etc/machine-id:/etc/machine-id \ # highlight-end evcc/evcc:latest ``` -------------------------------- ### Fetch JavaScript example Source: https://docs.evcc.io/integrations/rest-api/operations/getenergyhistory JavaScript example using fetch to retrieve energy history data from the demo endpoint. Uses GET method and logs the response or error. ```javascript const url = 'https://demo.evcc.io/api/history/energy?from=2026-07-01T00%3A00%3A00Z&to=2026-07-02T00%3A00%3A00Z&aggregate=15m&grouped=false&group=forecast&name=db%3A8&title=Battery&format=json&lang=de'; const options = {method: 'GET'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` -------------------------------- ### Set battery buffer start SoC using Fetch Source: https://docs.evcc.io/en/integrations/rest-api/operations/setbufferstartsoc Example request using the JavaScript Fetch API to set the buffer start SoC to 60%. ```javascript const url = 'https://demo.evcc.io/api/bufferstartsoc/60'; const options = {method: 'POST'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` -------------------------------- ### Messaging events with Go template syntax Source: https://docs.evcc.io/en/reference/configuration/messaging Complete example of messaging events using Go template syntax with calculations and conditions for start, stop, connect, and disconnect events. ```yaml messaging: events: start: title: "{{.vehicleTitle}}: Charging started" msg: | {{.title}} charging {{.vehicleTitle}} in {{ toString .mode | upper }} mode. Solar: {{round (divf .pvPower 1000) 1 }} kW Grid: {{round (divf .grid.Power 1000) 1 }} kW {{if .battery}}Battery: {{round (divf .battery.Power 1000) 1 }} kW ({{.battery.Soc }} %){{end}} stop: title: "{{.vehicleTitle}}: Charging finished" msg: | {{.title}}: {{round (divf .chargedEnergy 1000) 1 }} kWh in {{.chargeDuration}}. Solar share: {{round .sessionSolarPercentage 0 }}% {{- if .sessionPrice}} Cost: {{round .sessionPrice 2 }} {{.currency}} ({{round .sessionPricePerKWh 2 }} {{.currency}}/kWh) {{- end}} connect: title: "{{.vehicleTitle}} connected" msg: | {{.vehicleTitle}} connected to {{.title}}. SoC: {{.vehicleSoc }}% ({{.vehicleRange }} km) Solar: {{round (divf .pvPower 1000) 1 }} kW disconnect: title: "{{.vehicleTitle}} disconnected" msg: | {{.vehicleTitle}} disconnected from {{.title}} after {{.connectedDuration}}. ``` -------------------------------- ### name parameter example Source: https://docs.evcc.io/en/reference/configuration/chargers Example of setting the charger's name parameter. ```yaml name: charger1 ``` -------------------------------- ### Messaging events with simple placeholder syntax Source: https://docs.evcc.io/en/reference/configuration/messaging Complete example of messaging events using simple ${variableName} placeholders for start, stop, connect, and disconnect events. ```yaml messaging: events: start: title: Charging started msg: >- ${title} charging ${vehicleTitle} in ${mode} mode stop: title: Charging finished msg: >- ${title}: ${vehicleTitle} charged ${chargedEnergy:%.1fk}kWh in ${chargeDuration}. Solar share: ${sessionSolarPercentage:%.0f}% connect: title: Vehicle connected msg: >- ${vehicleTitle} connected to ${title} at ${pvPower:%.1fk}kW solar disconnect: title: Vehicle disconnected msg: >- ${vehicleTitle} disconnected from ${title} after ${connectedDuration} ``` -------------------------------- ### Response example Source: https://docs.evcc.io/en/integrations/rest-api/operations/regenerateapikey Example response body containing the new API key in cleartext, shown only once. ```json { "key": "evcc_aB3xYz7k0Pq2sN5mWtR4" } ``` -------------------------------- ### Start evcc on Windows Source: https://docs.evcc.io/en/installation/windows Run this command from the extracted folder to start evcc. After starting, open http://localhost:7070 in your browser to set an administrator password and configure devices. ```bash ./evcc ``` -------------------------------- ### Start evcc service Source: https://docs.evcc.io/en/installation/linux Start the evcc systemd service. ```bash sudo systemctl start evcc ``` -------------------------------- ### Install required dependencies Source: https://docs.evcc.io/en/installation/linux Install the necessary packages for adding the evcc repository. ```bash sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl ``` -------------------------------- ### Enable threshold-delay request examples Source: https://docs.evcc.io/en/integrations/rest-api/operations/setloadpointenabledelay Example requests for the POST /loadpoints/{id}/enable/delay/{delay} endpoint. The JavaScript example uses fetch with a POST method and logs the response or error. The cURL example sends a POST request to the same URL. ```javascript const url = 'https://demo.evcc.io/api/loadpoints/1/enable/delay/60'; const options = {method: 'POST'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```bash curl --request POST \ --url https://demo.evcc.io/api/loadpoints/1/enable/delay/60 ``` -------------------------------- ### Time parameter example Source: https://docs.evcc.io/en/integrations/rest-api/operations/previewloadpointrepeatingplan Example value for the hourMinuteTime parameter. ```text 12:30 ``` -------------------------------- ### SOC parameter example Source: https://docs.evcc.io/en/integrations/rest-api/operations/previewloadpointrepeatingplan Example value for the SOC parameter. ```text 60 ``` -------------------------------- ### Example from parameter: to Source: https://docs.evcc.io/en/integrations/rest-api/operations/deleteenergymetrics Example value for the 'to' query parameter, an end time in RFC3339 format. ```plaintext 2026-07-02T00:00:00Z ``` -------------------------------- ### Install evcc with pkg Source: https://docs.evcc.io/en/installation/freebsd Installs the evcc package from the FreeBSD Ports tree. Run as root. ```shell pkg install evcc ``` -------------------------------- ### Response example for mode Source: https://docs.evcc.io/en/integrations/rest-api/operations/setvehiclemode Example JSON response showing the mode set to 'off'. ```json { "mode": "off" } ``` -------------------------------- ### Enable and start evcc service Source: https://docs.evcc.io/en/installation/freebsd Enables the evcc service at boot and starts it immediately. ```shell sysrc evcc_enable="YES" service evcc start ``` -------------------------------- ### Install completions for every new session on macOS Source: https://docs.evcc.io/en/reference/cli/evcc_completion_bash Execute this command once to install bash completions for every new session on macOS. You will need to start a new shell for the setup to take effect. ```bash evcc completion bash > $(brew --prefix)/etc/bash_completion.d/evcc ``` -------------------------------- ### Complete site configuration example Source: https://docs.evcc.io/en/reference/configuration/site A comprehensive example showing the structure of the site configuration, including meters, curtailers, and residual power settings. ```yaml site: title: Home # display name for UI meters: grid: mygridmeter # grid meter reference pv: - mypv1 # first pv meter reference - mypv9 # second pv meter reference battery: - mybat5 # battery meter reference aux: - myaux1 # self-regulating consumer consumer: - myconsumer1 # regular consumer, recorded for consumption statistics ext: - myext1 # for data logging, load management, etc. curtailers: - my_curtailer # curtailment device reference residualPower: 100 ``` -------------------------------- ### Example cost parameter value Source: https://docs.evcc.io/en/integrations/rest-api/operations/setbatterygridchargelimit Shows an example value for the 'cost' path parameter: 0.25. ```text 0.25 ``` -------------------------------- ### Fetch and cURL requests for GET /history/energy Source: https://docs.evcc.io/en/integrations/rest-api/operations/getenergyhistory Example requests for the GET /history/energy endpoint. The fetch example uses JavaScript with async/await and logs the JSON response. The curl example sends a GET request with the same query parameters. ```javascript const url = 'https://demo.evcc.io/api/history/energy?from=2026-07-01T00%3A00%3A00Z&to=2026-07-02T00%3A00%3A00Z&aggregate=15m&grouped=false&group=forecast&name=db%3A8&title=Battery&format=json&lang=de'; const options = {method: 'GET'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```bash curl --request GET \ --url 'https://demo.evcc.io/api/history/energy?from=2026-07-01T00%3A00%3A00Z&to=2026-07-02T00%3A00%3A00Z&aggregate=15m&grouped=false&group=forecast&name=db%3A8&title=Battery&format=json&lang=de' ``` -------------------------------- ### Fetch JavaScript example Source: https://docs.evcc.io/en/integrations/rest-api/operations/startloadpointvehicledetection JavaScript example using fetch to call the PATCH endpoint. ```javascript const url = 'https://demo.evcc.io/api/loadpoints/1/vehicle'; const options = {method: 'PATCH'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` -------------------------------- ### Fetch example for POST /batterygriddischarge/true Source: https://docs.evcc.io/en/integrations/rest-api/operations/setbatterygriddischarge JavaScript example using fetch to call the endpoint with enable=true. Logs the response or error. ```javascript const url = 'https://demo.evcc.io/api/batterygriddischarge/true'; const options = {method: 'POST'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` -------------------------------- ### Start evcc Source: https://docs.evcc.io/en/installation/linux Launch the evcc application to begin the web-based configuration process. ```bash ./evcc ``` -------------------------------- ### cURL example for GET /sessions Source: https://docs.evcc.io/en/integrations/rest-api/operations/getsessions Uses cURL to send a GET request to the same endpoint with the same query parameters. The response is not processed further in the example. ```bash curl --request GET \ --url 'https://demo.evcc.io/api/sessions?format=csv&lang=de&month=2&year=2025' ``` -------------------------------- ### Get State Response Example Source: https://docs.evcc.io/en/integrations/rest-api/operations/getstate Example JSON response from the Get State API. Shows the structure of the state object including loadpoints, battery, tariffs, and other configuration sections. ```json { "loadpoints": [ { "chargerStatusReason": "unknown", "mode": "off", "phaseAction": "inactive", "pvAction": "inactive", "suggestion": { "action": "charge" } } ], "currency": "AUD", "system": "linux/amd64", "timezone": "CEST +02:00", "battery": { "devices": [ { "suggestion": { "action": "normal" } } ] }, "batteryMode": "unknown", "tariffs": { "yamlSource": "file" }, "hems": { "yamlSource": "file" }, "sponsor": { "yamlSource": "file" }, "eebus": { "yamlSource": "file" }, "remote": { "yamlSource": "file" }, "modbusproxy": [ { "readonly": "false", "settings": { "baudrate": 1200, "comset": "8N1" } } ], "messaging": { "yamlSource": "file" }, "smartCostType": "co2", "vehicles": { "additionalProperty": { "mode": "off" } }, "ocpp": { "status": { "stations": [ { "status": "unknown" } ] } }, "ocppforwarder": { "yamlSource": "file" } } ``` -------------------------------- ### integrateddevice feature example Source: https://docs.evcc.io/en/reference/configuration/chargers Shows how to use the integrateddevice feature and assign an icon. ```yaml features: - integrateddevice icon: bike ``` -------------------------------- ### Create labwc autostart file for kiosk mode Source: https://docs.evcc.io/en/chargers/openwb-embedded-software-replacement Contents for /home/pi/.config/labwc/autostart to start Firefox in kiosk mode and configure screen idle behavior. ```bash /usr/bin/firefox-esr --kiosk http://localhost:7070/ & /usr/bin/swayidle -w timeout 600 'wlopm --off \*' resume 'wlopm --on \*' & ``` -------------------------------- ### Path parameter example: id=1 Source: https://docs.evcc.io/en/integrations/rest-api/operations/deleteloadpointenergyplan Example value for the required 'id' path parameter, which is the loadpoint index starting at 1. ```text 1 ``` -------------------------------- ### Example power parameter value Source: https://docs.evcc.io/en/integrations/rest-api/operations/setgridexportlimit Shows the example value for the 'power' path parameter: 2500. ```text 2500 ``` -------------------------------- ### Example value for 'format' parameter Source: https://docs.evcc.io/en/integrations/rest-api/operations/getenergyhistory Example value for the 'format' query parameter, specifying JSON response format. ```text json ``` -------------------------------- ### Configuration example for evcc.yaml Source: https://docs.evcc.io/en/meters/tq-energy-manager-em420 Use this YAML block to configure the TQ Energy Manager EM420 manually in your evcc.yaml file instead of using the UI. ```yaml meters: - name: my_grid type: template template: tq-em420 usage: grid host: 192.0.2.2 # IP address or hostname token: ey... # Access token, Access token for EM420 (Create in Profile -> Access tokens) port: 80 # Port, optional device: local # API Device Path, JSON-API -> Data Endpoint (optional) ``` -------------------------------- ### HTTP Writing Example Source: https://docs.evcc.io/en/reference/plugins Example of writing data using HTTP PUT or POST requests with dynamic templates. ```yaml body: %v # only applicable for PUT or POST requests ``` ```yaml enable: source: http uri: "http://charger/relay/0?turn={{if .enable}}on{{else}}off{{end}}" ``` -------------------------------- ### Basic meters configuration example Source: https://docs.evcc.io/en/reference/configuration/meters Shows the structure of the `meters` list with entries for grid, pv, battery, charge, and aux. Each entry requires a name and a type. ```yaml meters: - name: grid type: ... - name: pv type: ... - name: battery type: ... - name: charge type: ... - name: aux type: ... ``` -------------------------------- ### Configuration example for evcc.yaml Source: https://docs.evcc.io/en/chargers/compleo-solo Use this YAML block to configure the Compleo Solo charger manually in your evcc.yaml file instead of using the UI. ```yaml chargers: - name: my_charger type: template template: compleo-solo # Modbus TCP modbus: tcpip id: 1 host: # Hostname port: 502 # Port ``` -------------------------------- ### Path parameter temp example Source: https://docs.evcc.io/en/integrations/rest-api/operations/setloadpointmintemp Example value for the required 'temp' path parameter: temperature in °C. ```plaintext 50 ``` -------------------------------- ### cURL command example Source: https://docs.evcc.io/en/integrations/rest-api/operations/setresidualpower Command-line example using cURL to send a POST request with the power value. ```bash curl --request POST \ --url https://demo.evcc.io/api/residualpower/2500 ``` -------------------------------- ### Example response for GET /sessions Source: https://docs.evcc.io/en/integrations/rest-api/operations/getsessions Shows an example JSON response array with fields id, loadpoint, and vehicle. The response is an array of objects representing charging sessions. ```json [ { "id": 1, "loadpoint": "Garage", "vehicle": "vehicle_1" } ] ``` -------------------------------- ### Configuration example for evcc.yaml Source: https://docs.evcc.io/en/chargers/chargeline-business-wallbox Use this YAML block to configure the ChargeLine Business Wallbox manually in evcc.yaml if not using the UI. ```yaml chargers: - name: my_charger type: template template: peblar # Modbus TCP modbus: tcpip id: 1 host: # Hostname port: 502 # Port ``` -------------------------------- ### Install evcc service with NSSM Source: https://docs.evcc.io/en/installation/windows Execute the nssm command to initiate the service installation process for evcc. ```cmd nssm install evcc ``` -------------------------------- ### JavaScript fetch example for POST /loadpoints/{id}/mintemp/{temp} Source: https://docs.evcc.io/en/integrations/rest-api/operations/setloadpointmintemp Sends a POST request to set the minimum temperature for a loadpoint. Uses the demo URL with id=1 and temp=50. Logs the response JSON or any error. ```JavaScript const url = 'https://demo.evcc.io/api/loadpoints/1/mintemp/50'; const options = {method: 'POST'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` -------------------------------- ### Configuration example for evcc.yaml Source: https://docs.evcc.io/en/meters/fronius-argeno Use this YAML block to configure the Fronius Argeno meter manually in evcc.yaml instead of using the UI. ```yaml meters: - name: my_pv type: template template: fronius-argeno usage: pv host: 192.0.2.2 # IP address or hostname port: 502 # Port, optional ``` -------------------------------- ### Example tariff response Source: https://docs.evcc.io/en/integrations/rest-api/operations/gettariffinfo Shows a sample JSON response with a rates array containing start, end, and value fields. ```json { "rates": [ { "start": "2026-04-15T12:00:00Z", "end": "2026-04-15T12:00:00Z", "value": 1 } ] } ``` -------------------------------- ### cURL command example Source: https://docs.evcc.io/integrations/rest-api/operations/getenergyhistory cURL command to send a GET request to the energy history endpoint with the specified query parameters. ```shell curl --request GET \ --url 'https://demo.evcc.io/api/history/energy?from=2026-07-01T00%3A00%3A00Z&to=2026-07-02T00%3A00%3A00Z&aggregate=15m&grouped=false&group=forecast&name=db%3A8&title=Battery&format=json&lang=de' ``` -------------------------------- ### Configure loadpoint phases via MQTT Source: https://docs.evcc.io/en/integrations/mqtt-api Example of setting the configured phases for loadpoint 1 to 3 using the mosquitto_pub command. ```bash mosquitto_pub -t "evcc/loadpoints/1/phasesConfigured/set" -m "3" ``` -------------------------------- ### Valid plugin reading example Source: https://docs.evcc.io/en/reference/plugins Example configuration for the valid plugin, which uses a separate topic to determine if the value is available. ```yaml source: valid valid: source: mqtt topic: iobroker/wallbox/power/valid value: source: mqtt topic: iobroker/wallbox/power/value ``` -------------------------------- ### GET /loadpoints/{id}/plan Source: https://docs.evcc.io/en/integrations/rest-api/operations/getloadpointplan Returns the current charging plan for the specified loadpoint. The loadpoint is identified by its index, starting at 1. ```APIDOC ## GET /loadpoints/{id}/plan ### Description Returns the current charging plan for this loadpoint. ### Method GET ### Endpoint /loadpoints/{id}/plan ### Parameters #### Path Parameters - **id** (integer) - Required - Loadpoint index starting at 1. Must be >= 1. ### Request Example ``` https://demo.evcc.io/api/loadpoints/1/plan ``` ### Response #### Success Response (200) Media type: application/json Response body is an object with the following fields: - **planId** (integer) - Loadpoint index starting at 1. Must be >= 1. - **duration** (integer) - Duration in seconds. - **plan** (Array) - A time slot with an associated price or emission value. Each object has: - **start** (string, date-time) - Required - Start of the time slot. - **end** (string, date-time) - Required - End of the time slot. - **value** (number) - Required - Price per kWh in the configured currency or emissions in g/kWh. - **planTime** (string, date-time) - Timestamp in RFC3339 format. - **power** (number) - Power in watts. #### Response Example ``` { "planId": 1, "power": 2500 } ``` ``` -------------------------------- ### Enable systemd service at boot Source: https://docs.evcc.io/en/installation/linux Configure the evcc service to start automatically when the system boots. ```bash sudo systemctl enable evcc.service ``` -------------------------------- ### Configuration example for evcc.yaml Source: https://docs.evcc.io/en/meters/esphome-dsmr Use this YAML block to configure the ESPHome DSMR meter manually in evcc.yaml instead of using the UI. ```yaml meters: - name: my_grid type: template template: slimmelezer usage: grid host: 192.0.2.2 # IP address or hostname scale: 1000 # Scale factor, Use scale of 1000 for Zuidwijk Slimmelezer. Use scale 1 for ESPHome DSMR and P1 Dongle ``` -------------------------------- ### Configure Custom device Source: https://docs.evcc.io/en/user-defined-devices Example configuration for a custom control system using HTTP and MQTT plugins to manage power limits. ```yaml type: custom maxConsumptionPower: source: http uri: http://steuerbox.local/api/limit jq: .maxPower # Power limit in watts, 0 = no limit curtailedPercent: source: mqtt topic: hems/curtail/percent # Allowed feed-in in percent, 100 = no curtailment productionNominalMax: 10000 # Installed generator power (Wp) ``` -------------------------------- ### Configure DZG DVH4013 for Charger Meter in evcc.yaml Source: https://docs.evcc.io/en/meters/dzg-dvh4013 Example configuration for using the DZG DVH4013 as a charger meter, showing both serial and TCP/IP Modbus setups. ```yaml meters: - name: my_charger type: template template: dzg usage: charge # RS485 via adapter (Modbus RTU) modbus: rs485serial id: 1 device: /dev/ttyUSB0 # USB-RS485 Adapter Adresse baudrate: 9600 # Prüfe die Geräteeinstellungen, typische Werte sind 9600, 19200, 38400, 57600, 115200 comset: "8N1" # Kommunikationsparameter für den Adapter # RS485 via TCP/IP (Modbus RTU) modbus: rs485tcpip id: 1 host: # Hostname port: 502 # Port ``` -------------------------------- ### Configuration example for evcc.yaml Source: https://docs.evcc.io/en/meters/homewizard-wi-fi-p1-meter Use this YAML block to configure the HomeWizard Wi-Fi P1 Meter manually if you prefer not to use the UI. ```yaml meters: - name: my_grid type: template template: homewizard usage: grid host: 192.0.2.2 # IP address or hostname ``` -------------------------------- ### Path parameter phases example Source: https://docs.evcc.io/en/integrations/rest-api/operations/setloadpointphases Example value for the phases path parameter: 3 (3-phase). Allowed values are 0 (auto), 1 (1-phase), 3 (3-phase). ```text 3 ``` -------------------------------- ### Configure enable/disable thresholds for loadpoints Source: https://docs.evcc.io/en/faq Adjust enable and disable logic under the loadpoints flag to control when charging starts and stops based on feed-in and grid supply. The example sets a 1-minute delay with a -200W threshold to start charging, and a 30-minute delay with a 1200W threshold to stop charging. ```yaml loadpoints: enable: delay: 1m threshold: -200 # Charging starts when 200w of feed-in occurs for 1 minute. disable: delay: 30m threshold: 1200 # Charging stops when the grid supplies 1.2kW of energy for more than 30 minutes. ``` -------------------------------- ### Add GPIO configuration to /boot/firmware/config.txt Source: https://docs.evcc.io/en/chargers/openwb-embedded-software-replacement Append these lines to the end of /boot/firmware/config.txt to configure GPIO pins for OpenWB hardware access. ```ini [all] gpio=4,5,7,11,17,22,23,24,25,26,27=op,dl gpio=6,8,9,10,12,13,16,21=ip,pu ``` -------------------------------- ### cURL example Source: https://docs.evcc.io/en/integrations/rest-api/operations/downloadbackup Uses cURL to send a GET request to the /db/backup endpoint. Requires a valid session cookie (auth=) via the --cookie option. ```bash curl --request GET \ --url https://demo.evcc.io/api/db/backup \ --cookie auth= ``` -------------------------------- ### Configuration example for evcc.yaml Source: https://docs.evcc.io/en/meters/hoymiles-hm-and-hms-series-via-ahoydtu A YAML configuration block for setting up a Hoymiles inverter via AhoyDTU when not using the UI. ```yaml meters: - name: my_pv type: template template: hoymiles-ahoydtu usage: pv host: 192.0.2.2 # IP address or hostname id: 0 # Inverter ID, If multiple exist. The numbering starts at 0. See AhoyDTU webinterface -> Inverter #[ID] (optional) cache: 1s # Cache, Time interval for data refresh (optional) ``` -------------------------------- ### Configure DZG DVH4013 for Solar Production in evcc.yaml Source: https://docs.evcc.io/en/meters/dzg-dvh4013 Example configuration for using the DZG DVH4013 as a solar production meter, showing both serial and TCP/IP Modbus setups. ```yaml meters: - name: my_pv type: template template: dzg usage: pv # RS485 via adapter (Modbus RTU) modbus: rs485serial id: 1 device: /dev/ttyUSB0 # USB-RS485 Adapter Adresse baudrate: 9600 # Prüfe die Geräteeinstellungen, typische Werte sind 9600, 19200, 38400, 57600, 115200 comset: "8N1" # Kommunikationsparameter für den Adapter # RS485 via TCP/IP (Modbus RTU) modbus: rs485tcpip id: 1 host: # Hostname port: 502 # Port ``` -------------------------------- ### Configure Smartfox Box as Smart Consumer Source: https://docs.evcc.io/en/meters/smartfox-box Example YAML configuration for using the Smartfox Box as a smart consumer (aux). ```yaml meters: - name: my_aux type: template template: smartfox usage: aux host: 192.0.2.2 # IP address or hostname cache: 1s # Cache, Time interval for data refresh (optional) ``` -------------------------------- ### uri parameter example Source: https://docs.evcc.io/en/reference/configuration/modbusproxy Shows the optional `uri` parameter with a port that can be the same as the target device port. ```yaml - port: 502 uri: 192.0.2.2:502 ``` -------------------------------- ### GET /tariff/{type} Source: https://docs.evcc.io/en/integrations/rest-api/operations/gettariffinfo Retrieves tariff information (prices or emission values) for a specified tariff type. The endpoint accepts a path parameter 'type' and returns a list of rates with start, end, and value. ```APIDOC ## GET /tariff/{type} ### Description Returns the prices or emission values for the upcoming hours for a specified tariff type. ### Method GET ### Endpoint /tariff/{type} ### Parameters #### Path Parameters - **type** (string) - Required - Tariff type. Allowed values: grid, feedin, co2, planner, solar. ### Response #### Success Response (200) - **rates** (Array) - A time slot with an associated price or emission value. - **start** (string, date-time) - Required - Start of the time slot. - **end** (string, date-time) - Required - End of the time slot. - **value** (number) - Required - Price per kWh in the configured currency or emissions in g/kWh. #### Response Example { "rates": [ { "start": "2026-04-15T12:00:00Z", "end": "2026-04-15T12:00:00Z", "value": 1 } ] } #### Error Response (404) Tariff not defined. ``` -------------------------------- ### Configuration example for evcc.yaml Source: https://docs.evcc.io/en/heating/kermi-x-center-pro Use this YAML block to configure the Kermi x-center pro charger template manually in your evcc.yaml file. ```yaml chargers: - name: my_heating type: template template: kermi host: 192.0.2.2 # IP address or hostname tempsource: # Temperature source, [warmwater, buffer] (optional) watchdog: 60s # Watchdog, optional ``` -------------------------------- ### Fetch JavaScript example Source: https://docs.evcc.io/en/integrations/rest-api/operations/downloadbackup Uses the Fetch API to send a GET request to the /db/backup endpoint. Requires a valid session cookie (auth=) in the headers. The response is parsed as JSON and logged to the console. ```javascript const url = 'https://demo.evcc.io/api/db/backup'; const options = {method: 'GET', headers: {cookie: 'auth='}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` -------------------------------- ### Configure Pracht Alpha XT in evcc.yaml Source: https://docs.evcc.io/en/chargers/pracht-alpha-xt Example configuration for the Pracht Alpha XT charger using template-based setup in evcc.yaml. Includes configurations for RS485 serial, RS485 TCP/IP, and Modbus TCP. ```yaml chargers: - name: my_charger type: template template: pracht-alpha # RS485 via adapter (Modbus RTU) modbus: rs485serial id: 1 device: /dev/ttyUSB0 # USB-RS485 Adapter Adresse baudrate: 9600 # Prüfe die Geräteeinstellungen, typische Werte sind 9600, 19200, 38400, 57600, 115200 comset: "8N1" # Kommunikationsparameter für den Adapter # RS485 via TCP/IP (Modbus RTU) modbus: rs485tcpip id: 1 host: # Hostname port: 502 # Port # Modbus TCP modbus: tcpip id: 1 host: # Hostname port: 502 # Port connector: 1 # Connector number, For multi-connector stations. Numbering starts at 1. (optional) ``` -------------------------------- ### Fetch log areas with JavaScript Source: https://docs.evcc.io/en/integrations/rest-api/operations/getlogareas JavaScript example using the Fetch API to call the GET /system/log/areas endpoint. Requires a valid authentication cookie (auth=). Logs the response data or error to the console. ```javascript const url = 'https://demo.evcc.io/api/system/log/areas'; const options = {method: 'GET', headers: {cookie: 'auth='}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` -------------------------------- ### VARTA element backup evcc.yaml configuration examples Source: https://docs.evcc.io/en/meters/varta-element-backup YAML configuration examples for the VARTA element backup template in evcc.yaml, covering grid meter, solar production, and battery usage. Each block shows the required host and optional port settings; the battery block also includes capacity, minsoc, maxsoc, maxchargepower, maxdischargepower, and watchdog parameters. ```yaml meters: - name: my_grid type: template template: varta usage: grid host: 192.0.2.2 # IP address or hostname port: 502 # Port, optional ``` ```yaml meters: - name: my_pv type: template template: varta usage: pv host: 192.0.2.2 # IP address or hostname port: 502 # Port, optional ``` ```yaml meters: - name: my_battery type: template template: varta usage: battery host: 192.0.2.2 # IP address or hostname port: 502 # Port, optional capacity: 50 # Battery capacity (kWh), optional minsoc: 25 # Minimum charge (%), Lower limit when discharging the battery in normal operation (optional) maxsoc: 95 # Maximum charge (%), Upper limit when charging the battery from the grid (optional) maxchargepower: # Maximum charge power (W), For forced charging of the battery. (optional) maxdischargepower: 4000 # Maximum discharge power (W), Maximum discharge power of the storage. (optional) watchdog: 120s # Watchdog, optional ``` -------------------------------- ### Systemd service override configuration Source: https://docs.evcc.io/en/installation/linux Example content for the systemd drop-in file. The empty ExecStart= line is required to clear the default command before specifying the new one. ```ini [Service] Environment="EVCC_LOG=debug,tariff:trace" Environment="EVCC_DATABASE_DSN=/usb/evcc/evcc.db" Environment="EVCC_NETWORK_HOST=my-evcc.local" Environment="EVCC_NETWORK_PORT=80" ExecStart= ExecStart=/usr/bin/evcc --custom-css /path/to/my.css ``` -------------------------------- ### Fetch API example for GET /sessions Source: https://docs.evcc.io/en/integrations/rest-api/operations/getsessions Uses the Fetch API to request charging sessions from the demo endpoint. The URL includes query parameters for CSV format, German language, month 2, and year 2025. The response is parsed as JSON and logged, with errors caught and logged. ```javascript const url = 'https://demo.evcc.io/api/sessions?format=csv&lang=de&month=2&year=2025'; const options = {method: 'GET'}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` -------------------------------- ### Install zsh completions for every new session on Linux Source: https://docs.evcc.io/en/reference/cli/evcc_completion_zsh On Linux, run this command once to install the completion script so it is loaded for every new shell session. ```bash evcc completion zsh > "${fpath[1]}/_evcc" ``` -------------------------------- ### evcc.yaml configuration for Viridian EV EVSE EPC 2.0 Plus Source: https://docs.evcc.io/en/chargers/viridian-ev-evse-epc-2-0-plus YAML block for configuring the charger in evcc.yaml. Includes commented examples for RS485 serial (Modbus RTU), RS485 via TCP/IP, and Modbus TCP. Adjust the device, baudrate, comset, host, and port according to your setup. ```yaml chargers: - name: my_charger type: template template: obo # RS485 via adapter (Modbus RTU) modbus: rs485serial id: 101 device: /dev/ttyUSB0 # USB-RS485 Adapter Adresse baudrate: 19200 # Prüfe die Geräteeinstellungen, typische Werte sind 9600, 19200, 38400, 57600, 115200 comset: "8E1" # Kommunikationsparameter für den Adapter # RS485 via TCP/IP (Modbus RTU) modbus: rs485tcpip id: 101 host: # Hostname port: 502 # Port # Modbus TCP modbus: tcpip id: 101 host: # Hostname port: 502 # Port ``` -------------------------------- ### cURL request for energy plan preview Source: https://docs.evcc.io/en/integrations/rest-api/operations/previewloadpointenergyplan Example using cURL to retrieve the energy plan preview. ```bash curl --request GET \ --url https://demo.evcc.io/api/loadpoints/1/plan/static/preview/energy/25.5/2026-04-15T12%3A00%3A00Z ``` -------------------------------- ### Timezone parameter example Source: https://docs.evcc.io/en/integrations/rest-api/operations/previewloadpointrepeatingplan Example value for the timezone parameter. ```text Europe/Berlin ``` -------------------------------- ### Configuration example for evcc.yaml Source: https://docs.evcc.io/en/chargers/cubos-c11e Use this YAML block to configure the CUBOS C11E charger manually if not using the UI. ```yaml chargers: - name: my_charger type: template template: bender-cc # Modbus TCP modbus: tcpip id: 255 host: # Hostname port: 502 # Port ``` -------------------------------- ### Weekdays parameter example Source: https://docs.evcc.io/en/integrations/rest-api/operations/previewloadpointrepeatingplan Example value for the weekdays parameter. ```json [ 1, 3, 4 ] ``` -------------------------------- ### Configuration example for evcc.yaml Source: https://docs.evcc.io/en/chargers/lektrico-1p7k-3p22k-charging-station Use this YAML block to configure the Lektrico charger manually if you prefer not to use the UI. ```yaml chargers: - name: my_charger type: template template: lektrico host: 192.0.2.2 # IP address or hostname cache: 5m # Cache, Time interval for data refresh (optional) ``` -------------------------------- ### Configuration example for evcc.yaml Source: https://docs.evcc.io/en/tariffs/dwd-bright-sky-temperature Use this YAML block to configure the DWD temperature tariff manually in your evcc.yaml file instead of using the UI. ```yaml tariffs: temperature: type: template template: dwd-temperature lat: 55.7351 # Latitude lon: 9.1275 # Longitude interval: 1h # Interval, optional ``` -------------------------------- ### Modbus Reading Example Source: https://docs.evcc.io/en/reference/plugins Example of reading data from a Modbus device. ```yaml source: modbus id: 1 uri: 192.168.1.10:502 register: address: 300 type: holding decode: uint16 ``` -------------------------------- ### Configuration example for evcc.yaml Source: https://docs.evcc.io/en/chargers/victron-ev-charging-station-via-gx Use this YAML block to configure the Victron charger manually if you prefer not to use the UI. ```yaml chargers: - name: my_charger type: template template: victron # Modbus TCP modbus: tcpip id: 100 host: # Hostname port: 502 # Port ```