A Node-Red Node for collecting "day ahead" prices from Nord Pool Group.
Go to your Node-RED user folder (e.g. ~/.node-red) and run:
npm install node-red-contrib-nordpool-api
This node uses the unofficial nordpool API found here.
The area and currency can be changed by selecting from the drop down menu in the properties, or by inputting the setting via a msg
:
Use a inject node to trigger a request to nordpool, to get prices for today.
Its also possible to inject a msg.date
to get price from a specific date, or pricing for tomorrow. If you request tomorrows data before 14:42 there's a risk that data is not available yet and you will get the data from the current date. See API issue#1
An 24 object long array is returned on success. The objects contains this properties: timestamp
, price
, currency
and area
.
In Node-RED editor, click menu at top right corner -> Import -> Examples -> node-red-contrib-nordpool-api -> basic-dashboard.
Use a function node to convert msg
to values readable for dashboard chart node like this:
The function node in this example contains:
var msg1 = {}
for (var i = 0; i<msg.payload.length;i++){
msg1 = {
topic:msg.payload[i].currency,
payload:msg.payload[i].price,
timestamp:msg.payload[i].timestamp,
}
node.send(msg1)
}
This could be the displayed result in: