Open Teme-V opened 3 weeks ago
Looks like there is a dependency to package "nordpool" (v. 3.0.0). But this package is scraping old URLs, and not planning to to use new endpoints. I think it is necessary to fetch above API URLs directly from this node in the future.
Any solution? What to do?
Any solution? What to do?
I just made a simple http request in my flow, instead. It took 10 minutes. The data is a bit different, but easy enough to map.
Thanks for shareing @qabi - nice fix!
The issue is found in the dependent module also https://github.com/samuelmr/nordpool-node/issues/27 but if the fix is this easy I might just roll @qabi's fix inside this node. I'll look at this later
Here are easy one line consts for these:
const urlToday = "https://dataportal-api.nordpoolgroup.com/api/DayAheadPrices?market=DayAhead&deliveryArea=FI¤cy=EUR&date=" + new Date().toISOString().split('T')[0];
const urlTomorrow = "https://dataportal-api.nordpoolgroup.com/api/DayAheadPrices?market=DayAhead&deliveryArea=FI¤cy=EUR&date=" + new Date(new Date().setDate(new Date().getDate() + 1)).toISOString().split('T')[0];
Then just put a http node infront that returns a parsed JSON object.
it works for me when I just changed old url from /node_modules/nordpool/config.js file: var baseUrl = 'http://www.nordpoolgroup.com/api' then old api works in new address.
Naturally you have to restart node-red after this.
Tnx, That works for me too.
Should be fixed as of version 4.5.3 - using @qabi's approach
Something strange here. Updated to version 4.5.3. Current date 2024.10.10. Response from Nordpool node "No data found for 2024-10-12" Setting is "Price for yesterday, today and tomorrow".
If I check only price for tomorrow, then the response is "2024-10-11 OK"
Something is wrong with latest version. If setting is "Price for yesterday, today and tomorrow" then there is no data for tomorrow.
commented out the second and third date = new Date()
and everything seemed to work
https://pastebin.com/1xHvuqXk
commented out the second and third
date = new Date()
and everything seemed to work https://pastebin.com/1xHvuqXk
Works for me. Otherwise it thinks "tomorrow" means "the day after tomorrow" and of course that fails.
Looks a like Nordpool have shutdown their old API and node can't pull prices anymore Here is an example of new API : https://dataportal-api.nordpoolgroup.com/api/DayAheadPrices?date=2024-10-08&market=DayAhead&deliveryArea=AT,BE,FR,GER,NL,PL,NO1,FI,SYS¤cy=EUR
https://data.nordpoolgroup.com/auction/day-ahead/prices?deliveryDate=latest¤cy=EUR&aggregation=Hourly&deliveryAreas=AT,BE,FR,GER,NL,PL,NO1,FI,SYS