This subflow uses the energy zero API for retrieving the hourly energy prices from the API of https://www.energyzero.nl/ for either today or the next day. These are the prices as they are used by the Dutch energy providers ANWB energie, Energie van Ons and others.
In order not to load the API too heavy a rate limiter of 1 query per 15 minutes has been added to the subflow.
Do note that tomorrows prices can be queried after 15:00, so there is a delay built in the node that handles that.
Price information can be retrieved for either today or tomorrow (default). It is also possible set if the prices should be retrieved including (default) or excluding tax.
It triggers when injecting a message into the node.
The output is an object with the result and a status message stored into the msg.payload
.
Most important is the msg.payload.result
, which contains the estimated production of the panels. E.g.:
payload: object
Prices: array[24]
[0 … 9]
[10 … 19]
[20 … 23]
20: object
price: 0.15
readingDate: "2023-01-04T19:00:00Z"
21: object
22: object
23: object
intervalType: 4
average: 0.12
fromDate: "2023-01-03T23:00:00Z"
tillDate: "2023-01-04T22:59:59.999Z"
The msg.payload.average
gives the average price.
In order not to load the api too much a rate limit has been added to maximize queries once per 15 minutes. The status message turns green when a query is allowed and red if it is not allowed.
If the delay is active (tomorrows prices can be queried after 15:00), the node will show that and wait until 15:00 before passing the message.