EntsoE Binding [4.0.0.0;4.3.0.0)

Busy times caused a larger delay and me not being able to provide the binding in time for release of 4.2, sorry about that, but I’m happy to say that I have a release candidate now. Would be nice to get some feedback on it.

This is my repo, I will make a pull request to openHAB repo as soon as it is tested some more and I’ve finished up on the readme and translations.

Pull request: EntsoE Binding [4.0.0.0;4.3.0.0) - #50 by jmelhus

The latest build from pull request: https://github.com/user-attachments/files/17179809/org.openhab.binding.entsoe-4.3.0-SNAPSHOT.jar.zip

Readme from pull request: openhab-addons/bundles/org.openhab.binding.entsoe/README.md at 4a4d64e4878e5da6a9d11cff57f6a330050af831 · openhab/openhab-addons (github.com)

2 Likes

Thank you, good news!

I tried adding the jar and I’ve got both freecurrency:info and entsoe:dayAhead Things showing green ONLINE status, but the Spot Price item shows UNDEF. What might I have missed? (I also only have a single prices channel which don’t seem to match above.)

Did you add a exchange-rate channel to freecurrency from EUR to your base currency? And also did you specify freecurrency as the default currency provider in system settings of openhab? Which area are you trying to read data from?

Thanks, nope sorry, missed a few of those.
Only set Base Currency in the first place I saw it, in Freecurrency binding. (SEK)
Now I’ve also set Settings > Unit Settings > Currency Provider to Freecurrency API
and Settings > Unit Settings > Fixed Base Currency to SEK
and created Exchange Rate channel item(s) (SEK->EUR and EUR->SEK).
But item still shows UNDEF.
Do I need to trigger a re-read/re-calc somehow?
I’m using area 10Y1001A1001A46L.

After changing/adding those I believe you will need to make the binding try to read data from entsoe again. It doesnt monitor for those changes. So either disable the entsoe-thing and enable it again so it initializes over again, or restart openhab. Did that help?

I restarted OpenHAB and Spot Price showed as NULL.
Checking Things, entsoe said “Could not get exchange rate. Have you configured a currency binding to fetch currency rates and set your base currency?”
Settings > Unit Settings are still ok.
The exchange rate channels show correct values.
Did disable and enable on entsoe Thing and it now shows ONLINE.
Spot price still NULL though.

Ok, I will look into it, binding probably have some room for improvement, I will also add some more logging to it… I’ll let you know.

Changed the logging level on my side and it looks promising.
There are exchange rates and converted values but first value is “Datetime: 2024-08-19T22:00:00Z, base value: 0.00422 EUR/kWh, converted value: 0.0485494237 SEK/kWh” which would be midnight tonight. So things will work from midnight, possibly?

log.txt (17.7 KB)

Ok, so probably an issue with which data that is downloaded, I will adjust that… Yeah, will probably work from midnight… Thanks for looking into it and providing logs!

Pull request for the binding: https://github.com/openhab/openhab-addons/pull/17416

2 Likes

Thank you for all your effort in updating this binding and making it an official addon :slight_smile:
Really, really appreciate your work.

I am using the binding now for ~1 week and i noticed that it is not auto-updating the prices. They remain old and i need to restart the binding. Is this somehow known? Sadly the logs remain silent at around 14:00 when the update is expected to happen. Nothing is happening.
When i do manually stop and start the binding all values are updated and processed and no errors are logged.

Any idea where i can start looking?

Hi Michael,

I’m sorry for the late reply, I have missed your message, did not see it until today.

I have not experienced the issue you are mentioning. We are working on the binding and there has been some suggestions on this pull request: https://github.com/openhab/openhab-addons/pull/17416

The latest build from pull request: https://github.com/user-attachments/files/17179809/org.openhab.binding.entsoe-4.3.0-SNAPSHOT.jar.zip

Does that one have the same issue?

The update is expected to happen every day around 13:00 CET.

Regards,

Jørgen

All fine. Thx for the update! What i immediately noticed, is that the reported prices for the current hour are not correct. Do i now need to set somewhere my current timezone? Seems that now UTC is used?

Are you sure it’s the binding ?
Does your java run in the correct timezone ? (check with openhab.log times)

Ah damn i now realize what is happening. The binding had before some settings to apply VAT and to apply the base price that i need to pay in addition to the hourly price. Those settings now seem to be gone.
@jmelhus: Can you confirm that? Is that intentionally? That was actually a great feature.
Is there some docu how this should now be done?

That is by intention. Sorry for not mentioning, there has been some changes to the binding since the first publish here. There has been good suggestions in the pull request which I have implemented. For VAT and total price you can use the VAT transformation service and SUM aggregate, you can read more about it here: openhab-addons/bundles/org.openhab.binding.entsoe/README.md at 8617a0484188c4fa010f84f19d580c63981a9c05 · openhab/openhab-addons · GitHub

Hope the newer version you got is auto-updating prices for you without you having the need to restart the binding?

It will by default update the prices at 13:00 CET/CEST time (central european time, day light saving taken into account). If you set another time within the binding, you should specify this value in CET/CEST time. Also check what Markus Storm is mentioning, if your java is running the correct timezone…

I added a review comment. IMHO the code is wrong and delivers the wrong prices for the current time. This is also what i am noticing.

For VAT and SUM i still need to figure out how this is supposed to work since i directly store the value in Influx so that i can visualize it in Grafana. Sadly way more complicated than before.

I see, i will need to look into that. I did not think about visualizing in Grafana…

You are right about SUM, but not about VAT, in terms of being “way more complicated” than before.

For VAT you just need to install the VAT profile and select it for your item, and your item will be persisted with VAT exactly as before.

For SUM, you need to create a group with your items as child items, which in itself is more complicated than just adding a fixed amount in the configuration. However, it is also more flexible and allows you to add dynamic tariffs and other price components (even from other bindings) as well. You can still persist your group item and it will work as before, but unfortunately time series are not supported, so you cannot visualize future total prices out-of-the-box:

https://github.com/openhab/openhab-core/issues/3869

A work-around for that is admittedly way more complicated: