# Power Planner: n8n finds the cheapest and greenest hours

> An n8n workflow pulls the day-ahead price, CO₂ and power mix and shows the cheapest hours as a power clock, curve and heatmap, with a device calculator.

Author: Daniele Michelin · Published: 2026-11-12 · Updated: 2026-11-12 · Language: en
Canonical: https://daniele-michelin.com/en/blog/n8n-power-planner/

When is the cheapest and greenest time to run the washing machine, the EV or the heat pump? An n8n workflow turns wholesale price, CO₂ and power mix into a daily plan every hour.

**Try it first:** [open the Power Planner live](https://daniele-michelin.com/en/power-planner/). No login, no input: the page shows today's plan straight away.

Power clock: wholesale price for the 24 hours of todayThe power clock: each hour of today is a segment coloured by the day-ahead wholesale price (net), 00:00 at the top, clockwise. The frame marks the cheapest three consecutive hours, the needle the current time.
- today · ct/kWh net06121819.9ct/kWh · avgAs of 12 Nov 2026Best 3 hours21:00–24:00avg 15.5 ct/kWh▼ 23:00 · 14.0 ct▲ 08:00 · 24.5 ctnow 18:22cheap 14.024.5 priceyaWATTar · Energy-Charts.info (CC BY 4.0)The power clock: each hour of today is a segment coloured by the day-ahead wholesale price (net), 00:00 at the top, clockwise. The frame marks the cheapest three consecutive hours, the needle the current time. As of 12 Nov 2026.
The wholesale electricity price changes from hour to hour. As of 12 Nov 2026: the cheapest three consecutive hours today were 21:00–24:00 (on average 15.5 ct/kWh net), the highest hour was 24.5 ct/kWh at 08:00 and the lowest 14.0 ct/kWh at 23:00. The workflow makes those patterns visible and recomputes them every hour.

## What the page shows

**Power clock:** 24 hours as a ring, green to red by price, with a needle for now and an arc for the best hours.

- **Price curve:** the day-ahead price for today and tomorrow (once published), negative hours and the cheapest windows.

- **CO₂ and power mix:** carbon intensity in g/kWh, the renewable share and generation by source.

- **Weekly heatmap:** seven days by 24 hours, so patterns like the midday dip or the evening peak stand out.

- **Appliance calculator:** washing machine, dryer, dishwasher, EV and heat pump as examples, each with its cheapest and its most expensive window.

Wholesale price today and tomorrowPrice curve for today and tomorrow (day-ahead, net) with the cheapest three hours of each day, the current hour and today's average.Wholesale price today and tomorrowct/kWh net, hourly · As of 12 Nov 2026
- 0102030best 3 hbest 3 havg today 19.9now 18:220006121800061218todaytomorrowPrice curve for today and tomorrow (day-ahead, net) with the cheapest three hours of each day, the current hour and today's average. As of 12 Nov 2026.
Negative prices happen when a lot of wind and sun meet low demand. In this week (minimum 14.0 ct/kWh) there was no negative hour; the curve only shades the area below zero when there is one.

Weekly heatmap: price per hourSeven days by 24 hours: green = cheap, red = expensive (colour by rank). Recurring patterns such as the midday dip and the evening peak show up.Weekly heatmap: price per hourct/kWh net · As of 12 Nov 2026Fri 6.11.Sat 7.11.Sun 8.11.Mon 9.11.Tue 10.11.Wed 11.11.Thu 12.11.0003060912151821hour (Berlin time)14.0 … 64.4 ct/kWhcheappriceySeven days by 24 hours: green = cheap, red = expensive (colour by rank). Recurring patterns such as the midday dip and the evening peak show up. As of 12 Nov 2026.

## How the workflow works

How data flows through the n8n workflowThe workflow at a glance: two triggers, four parallel requests, one merge, one code node, one POST. JSON and poster for the page come out the other end.Schedulehourly, minute 10WebhookGET, manual startaWATTarprice €/MWhSignalrenewables %CO₂g/kWhMixpublic_powerMergewaits for all fourparallel · timeout 20 s · continueOnFailCode: compute planBerlin time · 15 min → hour · 1–4 h windowsHTTP: POST strom-ingest.phpheader X-Strom-Tokenlatest.jsonlive dataPoster (GD)1200×630 · preview→ Page /en/power-planner/ · reads the JSON, every 5 minThe workflow at a glance: two triggers, four parallel requests, one merge, one code node, one POST. JSON and poster for the page come out the other end.

**Start:** a Schedule trigger runs every hour (minute 10). A webhook lets you start a run by hand.

- **Requests:** four HTTP nodes run in parallel, with a 20-second timeout and “continue on fail”: aWATTar returns hourly prices, Energy-Charts returns `signal` (renewable share), `co2eq` and `public_power` (generation by source). If a source is down its fields stay empty and the page still works; only aWATTar is mandatory.

- **Merge:** waits for all four answers.

- **Code node “compute plan”:** converts everything to the Europe/Berlin time zone (including daylight saving), averages the 15-minute values into hours, finds the cheapest and lowest-CO₂ windows of 1 to 4 hours, and builds the 7×24 heatmap and the appliance plan.

- **POST:** an HTTP node sends the result to a small PHP script on my server. It checks a secret token and the values, writes `latest.json` and draws a preview poster with GD.

- **Page:** the page only loads that JSON ([latest.json](https://daniele-michelin.com/assets/live/strom/latest.json)) and refreshes every five minutes. There is no input and no personal data.

Build it yourself: download [strom.json](https://daniele-michelin.com/assets/n8n/strom.json), import it into n8n and replace the target URL and token in the POST node. More experiments are in the [n8n collection](https://daniele-michelin.com/en/n8n/).

Power mix today (generation in GW)Electricity generation in Germany today, hourly averages from 15-minute data. The dashed line is load; the hours still to come have no values yet.Power mix today (generation in GW)As of 12 Nov 2026 · Energy-Charts.info
- 02040600003060912151821no values yetLoadSolarWindHydroBiomassOtherGasHard coalLigniteElectricity generation in Germany today, hourly averages from 15-minute data. The dashed line is load; the hours still to come have no values yet. As of 12 Nov 2026.

## Why the wholesale price is not your electricity bill

The page shows the **day-ahead wholesale price, net**: without taxes, grid fees, levies and VAT, and without your supplier's margin. A real bill adds a surcharge. The page adds an adjustable **estimate (default 17 ct/kWh)** through a slider; it is only an example. Many households are on a fixed tariff anyway, in which case the wholesale price does not change the bill directly. The plan shows when power is cheap or low-carbon on the wholesale market, not what your tariff costs.

If you see figures like “up to 34 % or €650 a year”, those are, according to the providers themselves, claims by providers of dynamic tariffs, for their example households, not yours. I guarantee no savings and I do not recommend switching supplier.

## Limits and disclaimer

Wholesale price (day-ahead), net, excluding taxes, grid fees and levies. Your tariff may differ.

- The CO₂ value is a grid figure (g/kWh, Energy-Charts), not a claim of “100 % green” or “carbon neutral”.

- For information only, not energy advice, no warranty. Not affiliated with aWATTar, Fraunhofer ISE or the Bundesnetzagentur.

- Do not leave household appliances running unattended overnight just because power is cheap then.

**Sources:** prices: aWATTar. Signal, CO₂ and generation: Energy-Charts.info (Fraunhofer ISE); price data: Bundesnetzagentur | SMARD.de. Licence CC BY 4.0. All figures above use real data, as of 12 Nov 2026.

**When does your washing machine run – and when should it run?** Tell me in the comments.
