Is there a way to integrate Nordpool? As in hour-by-hour electricity price? This works in Nordic countries, but now I’m looking specially solution for/from Finland.
I don’t know much about coding, but I believe there is a free API (API | Nord Pool) and pricing can be found also from couple more websites.
It does not look like the most complicated API, but I am not sure how many people want to get involved with an API that could potentially cost users if there is a mistake (or bug). With this one's auction and intraday trading systems I would be very hesitant to work on it like many of the other API drivers I have written.
Do you have any other ideas for this pricing? I was thinking even if virtual switch would work, when price is under xxEUR switch is on and if over xxEUR it is off. Or something to start with, but I have no Idea how to continue.
Well... they have a notice right on that site that automatic extraction of data (ie: scraping the website to get the values) is against their terms and conditions.
So it should still be possible to do via the API... but their API exposes so much other stuff that you would not need. They really did not make it with residential customers in mind.
This system seems like it would be better to use, although they ALSO require an account for using their API. But the data seems relatively simple to use if you understand their regions and such. Here is the spot about authentication and requesting an account: Authentication and Authorization Section
From what I can read of it, something like this (with an authentication token as part of it, you would replace the <TOKEN> with what is provided) would work for Finland (the Domain value specified), and the periods are structured as YYYYMMDDhhmm:
That could actually be something you do as an HTTP Get request in Rule Machine. Of course it would likely need to be narrowed down further with the specific field you want the result from, and have that result go into a variable so that you could compare it with other Rules.
Kind of still looking for solutions, in Home Assistant they figured it out. I saw even a code that set for eg. boiler ON for cheapest 3 hours. Would this help with hubitat?
Here it is. If you improve or find bugs, please post it here or to Github. I think that the time based prizes could differ TimeZone to TimeZone.
I have Rule that refreshes this driver @14.30 Finnish time. And I poll the driver once an hour, one minute past. The polling sets a driver attribute CurrentPrice to prize on that hour.
Note!!! You have to register to the portal and ask for the api token from the service desk. For me they responded in a same day.
Hi @karipk ,
Thank you for the script. I have an issue with the date that I cannot understand. Seems like it cannot get the date correctly. Most likely I have not fully understood how to use it. Right now I have added it as a driver and created a device. When I try to refresh I get the following in the log.
2022-10-24 11:04:17.929[error]java.lang.NullPointerException: Cannot invoke method length() on null object on line 73 (method poll)
@karipk Thanks, I get the same result as you when clikcing initialize but when I try to get data I still get issues with the date:
error occured calling httpget java.text.ParseException: Unparseable date: ""
I guess the date somehow is blank/null
I can confirm the latest version from github works fine for me.
With RuleMachine it is easy to refresh and poll the device. Also I control my floor heating thermostats via RuleMachine based on Nordpool hour pricing.
Great Work Kari!