evcc icon indicating copy to clipboard operation
evcc copied to clipboard

co2 forecast: Implement new Green Grid Compass API

Open All-Ex-U opened this issue 11 months ago • 9 comments

Is your feature request related to a problem? Please describe. Apparently, Green Grid Compass is changing its API:

New API Portal now available! The Green Grid Compass API portal is now accessible via traxes.io. The previous portal api-portal.eco2grid.com will remain available until 15 January 2026. Please update your settings accordingly.

According to this post, co2 forecast data from Green Grid Compass will not be available shortly. Probably, this evcc feature will not work afterwards: https://docs.evcc.io/en/docs/tariffs#green-grid-compass

Describe the solution you'd like I suggest to implement the new API. The technical documentation is here: https://www.traxes.io/service/green-grid-compass/1.0.0/technicaldocumentation

After creating an account and registering a new application I was able to generate a bearer token. With the token I got a co2 forecast for Belgium (BE).

Request:

curl -X GET  "https://explore.traxes.io/greengrid-compass/v1/co2-intensity-forecast?start=2025-12-28T12%3A00%3A00Z&end=2025-12-29T12%3A00%3A00Z&zone=BE&time-resolution=Hourly&calculation-type=Consumption&emission-type=Operational&forecast-type=Actual" \
  --header "Authorization: Bearer xxx"

Response:

{
  "startUtc": "2025-12-28T12:00:00Z",
  "stopUtc": "2025-12-29T12:00:00Z",
  "measurements": [
    {
      "unit": "gCO2eqPerkWh",
      "zone": "BE",
      "timeResolution": "Hourly",
      "calculationType": "Consumption",
      "emissionType": "Operational",
      "forecastType": "Actual",
      "measurementValues": [
        {
          "timestamp": "2025-12-28T12:00:00Z",
          "value": 126.29
        },
        {
          "timestamp": "2025-12-28T13:00:00Z",
          "value": 125.55
        },
        {
          "timestamp": "2025-12-28T14:00:00Z",
          "value": 133.83
        },
        {
          "timestamp": "2025-12-28T15:00:00Z",
          "value": 140.02
        },
        {
          "timestamp": "2025-12-28T16:00:00Z",
          "value": 139.85
        },
        {
          "timestamp": "2025-12-28T17:00:00Z",
          "value": 142.32
        },
        {
          "timestamp": "2025-12-28T18:00:00Z",
          "value": 146.08
        },
        {
          "timestamp": "2025-12-28T19:00:00Z",
          "value": 158.13
        },
        {
          "timestamp": "2025-12-28T20:00:00Z",
          "value": 157.66
        },
        {
          "timestamp": "2025-12-28T21:00:00Z",
          "value": 160.96
        },
        {
          "timestamp": "2025-12-28T22:00:00Z",
          "value": 161.19
        },
        {
          "timestamp": "2025-12-28T23:00:00Z",
          "value": 166.61
        },
        {
          "timestamp": "2025-12-29T00:00:00Z",
          "value": 160.07
        },
        {
          "timestamp": "2025-12-29T01:00:00Z",
          "value": 155.9
        },
        {
          "timestamp": "2025-12-29T02:00:00Z",
          "value": 153.16
        },
        {
          "timestamp": "2025-12-29T03:00:00Z",
          "value": 152.76
        },
        {
          "timestamp": "2025-12-29T04:00:00Z",
          "value": 156.49
        }
      ]
    }
  ]
}

Sidenote Currently, the new API is not working for the DE_LU zone. It returns empty measurements:

{
  "startUtc": "2025-12-28T12:00:00Z",
  "stopUtc": "2025-12-29T12:00:00Z",
  "measurements": []
}

But, this is also the case for the old API:

https://eco2grid.com/green-grid-compass/v2/forecast/hourly?zone_code=DE_LU&start=2025-12-28T10:00:00&end=2025-12-30T10:00:00&apikey=xxx
{"zone_data":[]}

I guess this is a problem upstream and has nothing to do with the new API.

All-Ex-U avatar Dec 28 '25 09:12 All-Ex-U

It seems to me, that they have changed the API access. I have to register a new accout to https://traxes.io and, after login, a new application for the API. After that, I get an Client ID and a Client Secret.

Elchkopp avatar Jan 01 '26 15:01 Elchkopp

Seems they have converted a simple service into a complicated mess. Core team won't work on this, feel free to open PR.

andig avatar Jan 03 '26 12:01 andig

New CO2 data for GreenGridCompass has been available since yesterday. It is running with changed code of version 0.300.2.

Image

An-Wi avatar Jan 09 '26 17:01 An-Wi

New CO2 data for GreenGridCompass has been available since yesterday. It is running with changed code of version 0.300.2.

Are there any instructions as to what to do? I cannot find anything for GreenGridCompass in documentation - though I am pretty sure there was something a couple of days ago....

cdyna43 avatar Jan 09 '26 19:01 cdyna43

I cannot find anything for GreenGridCompass in documentation - though I am pretty sure there was something a couple of days ago....

Current implementation will only work until next week. We dont have a replacement yet (PR welcome). The implementation is still there but deprecated (see above https://github.com/evcc-io/evcc/pull/26494), that's why it was removed from docs with todays release.

naltatis avatar Jan 09 '26 19:01 naltatis

New CO2 data for GreenGridCompass has been available since yesterday. It is running with changed code of version 0.300.2.

Are there any instructions as to what to do? I cannot find anything for GreenGridCompass in documentation - though I am pretty sure there was something a couple of days ago....

Soeben erreichte mich eine Mail von [email protected]:

Liebe Nutzerinnen und Nutzer, vielen Dank, dass Sie die Daten des Green Grid Compass nutzen und so dazu beitragen, die Energiewende voranzubringen!

Ein neues API-Portal für den Green Grid Compass ist verfügbar – erreichbar unter https://www.traxes.io/service/green-grid-compass/1.0.0/overview. Das bisherige Portal https://api-portal.eco2grid.com/ steht noch bis zum 31. Januar 2026 weiterhin zur Verfügung. Bitte aktualisieren Sie Ihre Einstellungen entsprechend, z. B. wenn Sie die API in eine Anwendung integriert haben. Informationen zur Registrierung für den Green Grid Compass auf traXes finden Sie hier.

Um den Green Grid Compass kontinuierlich weiterzuentwickeln, würden wir uns außerdem freuen, wenn Sie sich 3 Minuten Zeit nehmen könnten, um eine kurze Umfrage auszufüllen. Vielen Dank!

Wenn Sie weitere Fragen haben, kontaktieren Sie uns bitte per E-Mail: [email protected]

Mit freundlichen Grüßen

Ihr Green Grid Compass Team

An-Wi avatar Jan 12 '26 12:01 An-Wi

Bei mir die gleiche Email

freakezoid1604 avatar Jan 12 '26 18:01 freakezoid1604

I'm not sure how to change this in my configuration. I did manage to get a bearer code, but what needs to be updated in the config UI?

I'm in BE region.

tomstruyf6 avatar Jan 15 '26 09:01 tomstruyf6

@tomstruyf6 See comment above

Current implementation will only work until next week. We dont have a replacement yet (PR welcome).

naltatis avatar Jan 15 '26 09:01 naltatis