Integrations

Forecasts are divided into three categories:

  • 2 full days in advance (free)
  • 6 full days in advance: Pricing
  • 12 full days in advance (Business plan) Pricing

For both options, data is delivered from midnight of the current day. Forecasts are updated twice daily.

Home Assistant Integration

In Home Assistant you can integrate the forecasts via the EPEX Spot plugin. Depending on whether you use the Free or Pro plan, you get 2 or 6 full days of forecast.

Here's how:

  1. Install Home Assistant (see Home Assistant documentation)
  2. Install HACS (see HACS documentation)
  3. Install the EPEX Spot plugin via HACS (see EPEX Spot documentation)
  4. When configuring the plugin, select "Energyforecast.de" as the data source and add your API key, which you can create under API Keys.

EVCC Integration

The forecasts can be integrated into EVCC to control when your car is charged.

Here's how:

  1. Install evcc (see EVCC documentation)
  2. Create an API key under API Keys
  3. Set your fixed costs and VAT in your profile:
    • Go to Edit profile
    • Enter your fixed costs (in cents per kWh)
    • Enter your VAT rate (in %)

    The price is then calculated using the formula <code class="bg-gray-50 px-2 py-1 rounded text-sm font-mono">(Preis + fixed_cost_cent) * (1 + vat / 100.0)</code>.

  4. Add the following code to your EVCC configuration file: (see also EVCC.io documentation)
    tariffs:
      grid:
        type: template
        template: energyforecast
        token: # Your API token
        charges: # Additional fixed surcharge per kWh (e.g. 0.05 for 5 cents) (optional)
        tax: # Tax, additional percentage surcharge (e.g. 0.2 for 20%) (optional)
  5. Replace <span class="font-semibold"># Your API token</span> with your API key, which you created under API Keys.
  6. Restart EVCC and you should be able to see the forecasts in the app.

Before integration, only EPEX Spot day-ahead prices are available.

After integration

ioBroker Integration

ioBroker is an open-source IoT platform that is especially popular in Germany. You can retrieve energy price forecasts via a JavaScript script using httpGet().

Here's how:

  1. Install ioBroker (see ioBroker documentation)
  2. Create an API key under API Keys
  3. Set your fixed costs and VAT in your profile:
    • Go to Edit profile
    • Enter your fixed costs (in cents per kWh)
    • Enter your VAT rate (in %)
  4. Install the JavaScript Adapter in ioBroker
  5. Create a new script with the following content:
    schedule("0 * * * *", async () => {
      const res = await httpGet("https://www.energyforecast.de/api/v2/forecast?token=YOUR_API_TOKEN");
      const data = JSON.parse(res.result);
      setState("javascript.0.energyforecast.data", JSON.stringify(data), true);
    });

    Replace YOUR_API_TOKEN with your API key.

  6. The forecast data is now available as a data point at javascript.0.energyforecast.data, updated hourly. It can be used in Blockly or JavaScript automations (e.g. switch on devices at cheap times).

Tip: The API delivers data in JSON format. Use the `total_ct_kwh` field for the total price incl. fixed costs and VAT. Blockly or JavaScript scripts can determine the cheapest hours and control your devices accordingly.

Integration into your own project

If you know your way around, you can easily retrieve data via the API and use it in your project. The API documentation can be found at Swagger / Open API Documentation

If you build an integration that could be useful to others, let us know. We appreciate every integration and are happy to help spread the word.

Contact