EntsoE Binding [4.0.0;5.0.0)

Prices are fixed one day ahead and don’t change any more. So it’s irrelevant how often they’re pulled and when which minute that started.

I wasn’t talking about “being pulled”. The first channel (PriceNow)is the price of the Current hour, the next channel of now.plusHours(1), the third channel of now.plusHours(2), …

I dont’ know if the binding “pulls” every hour or once a day. It might, but is - like you said - not relevant to this remark. I only know, just as @furieux, that the binding does not update the items on the hour, but every x minutes after the hour.

Edit 1 : this is what the bindings logs when succesfull (for every item) 2024-04-23 14:15:24.952 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'EnergieEntsoEPrijzen03Prijs' changed from 86.67 to 97.91
But the binding should do this ON the hour.

Edit 2 : I think the binding pulls every hour the data from Entsoe, as this error sometimes occures : 2024-04-23 14:15:24.978 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'entsoe:dayAheadPrices:belgium' changed from OFFLINE (COMMUNICATION_ERROR): java.io.IOException: java.util.concurrent.TimeoutException: Total timeout 5000 ms elapsed to ONLINE

I took a litte dive into the binding (this is out of my league) :

        if (!success) {
            refreshJob = scheduler.schedule(this::queryPricesAndUpdateChannels, 60, TimeUnit.SECONDS);
        } else {
            ZonedDateTime now = currentTime();
            ZonedDateTime nextRun = now.truncatedTo(ChronoUnit.HOURS).plusHours(1);
            Duration duration = Duration.between(now, nextRun);
            refreshJob = scheduler.schedule(this::queryPricesAndUpdateChannels, duration.getSeconds(),
                    TimeUnit.SECONDS);
        }

nextRun is “on the hour”. So why does it fire one hour after start ?

Yeah, @GeertClaes , this is exactly what I noticed and @mstormi ignored that (or didn’t understand the issue?). Perhaps he is not using Price Now?

Anyway, I also checked binding code but it is out of my knowledge. That’s why I simply scheduled binding restart every your @ 0 minutes (actually also @ 10 and 15 minutes) until someone finds a better solution. And yeah, periodically timeouts also happens but that could be because of EntsoE API instability maybe?

As far as I can tell, the code does update on the hour, but for some reason de binding does it every hour. Just like you, it’s a bit out of my league to fidle with it. At the same time, there is absence of decent logging.

I already have a PS script that fetches Entsoe, but only daily (for OH 2.5). It does not update hourly to “PriceNow”. If a solution cannot be found (for this otherwise excellent binding), i shall adapt that…

Maybe @gitMiguel can enlighten us ?

Increase loglevel.
log:set debug org.openhab.binding.entsoe
trace level even, eventually

Like I said : absence of decent logging.
In the log only every hour getting the data from Entsoe. Nothing on the hour. If I read the code correctly, the bindig should fire ON the hour, but there is nohting in the logging at those moments.
entsoe.log (69.9 KB)

So, the binding does not fire ON the hour. Why not ? (there is nothing else in other logfiles)

I am working on a solution with PS that feeds OH via the API. But your solution would be even better if we could restart the binding only once on the first hour after the startup (of the binding or the system)

Will this addon get included with openHAB?

Found the binding in the marketplace. However, adding Norway yields an error, I believe this is related to Norway being separated in different regions where different regions has their own prices…?

Error: Request failed with API response: Code 999, Text No matching data found for Data item Day-ahead Prices [12.1.D] (10YNO-0--------C, 10YNO-0--------C) and interval 2024-05-02T22:00:00.000Z/2024-05-05T07:00:00.000Z.

In my network tab when loading this data on https://transparency.entsoe.eu/ for Finland and Norway this shows (see biddingZone.values):

Finland


biddingZone.values: CTY|10YFI-1--------U!BZN|10YFI-1--------U

Norway


biddingZone.values: CTY|10YNO-0--------C!BZN|10YNO-4--------9

Do you happen to know @gitMiguel ?

Forked the binding and changed the zones, then it worked… Will it be ok if I change some minor stuff in the forked version and makes a pull request for openHAB addons?

1 Like

@gitMiguel has not been active for months, and back when he was he mentioned he hasn’t the time to make a PR to turn this into an official binding

I believe you would do all of us a favor if you jump in and put this up as a PR - thanks.

1 Like

Ok, will look into it. I see we can take advantage of currency and timeseries for this binding, where can i find documentation for how to implement this in the binding?

Check out the release notes and proceed from there, e.g. check the openweathermap addon code.

You might also have a look at the Energi Data Service binding as being a similar binding with the same objective. Especially along these lines you might find something:

Feel free to ask me if you have any questions, either PM or perhaps creating a new topic under Development and pinging me there.