[Testers wanted] Electricity price and CO₂ forecast for Advanced Flow via HomeyScript

Hi everyone,

I’m looking for a few Homey users who would like to test an electricity price and CO₂ forecast in a real Advanced Flow setup.

This is not a Homey app and it does not replace or modify the dynamic prices in the native Homey Energy screen. It is a lightweight HomeyScript solution intended for automations such as EV charging, heat pumps, boilers, batteries or notifications.

The price data follows a “day-ahead first” approach: official day-ahead prices are used whenever available. Forecast values are only used for the remaining future period that is not yet covered by official market data.

For a simple automation, the summary API provides:

  • the current electricity price;
  • the current CO₂ intensity;
  • whether the cheapest time window is active now;
  • the next complete cheap time window;
  • information about the available horizon and data sources.

For example, this HomeyScript returns true when the cheapest four-hour window is currently active:

const url =
  'https://api.energypriceforecast.eu/api/v1/homey/summary?country=nl&hours=48&window_hours=4';

const response = await fetch(url);

if (!response.ok) {
  throw new Error(`API request failed: HTTP ${response.status}`);
}

const data = await response.json();

return data.flat?.is_cheapest_window_now === true;

You can run the script every 15 minutes from an Advanced Flow and use its Yes/No result to enable or block the next action.

There is also a separate continuous 15-minute price series for users who prefer to calculate their own thresholds, rankings or time windows. Real quarter-hour day-ahead prices remain quarter-hourly. Hourly forecast values are returned as four equal quarter-hour slots, rather than inventing artificial price movements.

The public access currently supports up to 48 hours without an API key. I’m mainly interested in whether the setup works reliably in real Homey installations before taking the next step.

The full setup instructions and additional HomeyScript examples are available here:

Feedback that would be particularly useful:

  • Does the script run correctly on your Homey?
  • Is the Advanced Flow setup clear?
  • Are the returned values and time windows plausible?
  • Would you use the ready-made summary signals or the complete price series?
  • Which country and use case are you testing?

Thank you for your Interest and Support!

Quick update: the Homey integration is now complete and has passed the live tests.

Both the ready-to-use summary signals and the continuous 15-minute price series are available for HomeyScript and Advanced Flow.
Feedback from real Homey setups is very welcome.

@Hendrik_Soppa ,
Could you maybe tell a little bit more about what this app is meant to do? What data is collected and stored? How is it stored? Who has access to it? Is it encrypted? is it anonymized? How is it anonymized. Why is it stored? What happens with the data?
What is the supposed relevance between CO2 intensity (I assume outdoor CO2 intensity), current electricity price, and ev charging?

Of course many people would like to help the community out. But simply sending private data to an external api without knowing anything about it, is not something I would advise people to do.

As it’s you first post, we’re very cautious when it comes to commercial links being “promoted” like this.
It’s unclear to me in what way you are / you are not connected to “https://energypriceforecast.eu/”?

After reading this article “https://energypriceforecast.eu/en/homey-electricity-price-co2-forecast/”:
I can’t determine if we are ought to pay for that api in general or in the near future.

.

Homey is mainly about apps, why should we use flows and scripts instead?
Imho a small amount of all users are into using scripts.

Same as @Peter_Kawa
Therefore moved to #Developer and added the Homey Script Tag.
Not yet sure it is on-topic here, but let’s see.

I am the developer of the electricity price and CO₂ forecasting service. I developed it entirely on my own because I was frustrated that day-ahead prices alone do not provide enough information to decide whether it is better to charge an EV today or tomorrow.

The 48-hour electricity price forecast is free to use, and the CO₂ forecast is completely free as well. For the 120-hour electricity price forecast, I charge a small fee of approximately €2 per month. This is intended to help cover my development and server costs through power users and supporters.

Therefore, I would not really describe the project as commercial. It is more like my little baby that has recently learned to walk.

@dsdevries:

Could you maybe tell a little bit more about what this app is meant to do?

The API can be used to optimize electricity costs if you have a dynamic or flexible electricity tariff.

In addition, the CO₂ API can help users reduce their carbon footprint by shifting electricity consumption to hours when a larger share of the electricity mix comes from renewable sources.

Further details are available on my website.

What data is collected and stored?

I do not collect or store any personal user data.

When the API is accessed, the server naturally receives the requesting IP address. However, IP addresses are not stored. I only use them temporarily to count approximately how many users are accessing the data.

With a typical residential internet connection, the public IP address may also change regularly.

If someone purchases a Pro subscription, they naturally enter into a purchase agreement and receive an API key. The free versions can be used without an API key and therefore remain anonymous.

API keys are generated and issued automatically.

How is it stored?

I only count the number of API users or accesses in order to estimate how many people are using the data. The IP addresses themselves are not stored.

Who has access to it?

Only I have access to the technical systems.

If someone purchases a Pro subscription, the payment is processed by Paddle.com.

Is it encrypted?

All data transfers are encrypted using HTTPS.

No personal user data or IP addresses are stored.

Is it anonymized?

The API key is used once to generate a secure hash. Apart from that, the service is completely anonymous.

How is it anonymized? Why is it stored? What happens with the data?

As mentioned above, no personal user data is stored or used.

What is the supposed relevance between CO₂ intensity, current electricity price, and EV charging?

The CO₂ intensity refers to the carbon intensity of the electricity grid mix, not to the outdoor concentration of CO₂.

Every form of electricity generation has a carbon footprint. Wind and hydropower generally have a particularly low carbon footprint, while coal-fired generation has a particularly high one.

Regardless of which electricity supplier or tariff we choose, the electricity physically delivered through the grid comes from the same overall electricity mix. One of the most effective ways for an individual household to reduce the carbon footprint of its electricity consumption is therefore to shift flexible consumption to hours with a lower carbon intensity.

EV charging is a particularly suitable example because charging can often be postponed by several hours without causing any inconvenience.

Climate protection is especially important to me, which is why the CO₂ API is completely free, including the full 120-hour forecast horizon.

Of course many people would like to help the community out. But simply sending private data to an external API without knowing anything about it is not something I would advise people to do.

Users are not sending private data to the API. They are only retrieving forecast data from it.

If there is genuine interest among Homey users, I would be very happy to continue developing this idea together with the community.

I hope I have answered all of your questions satisfactorily. If anything is still unclear, please feel free to ask.