Entso-E Dayahead Preise in UI anzeigen

Hallo zusammen,

ich würde mir gerne die DayAhead-Preise der Entso-E in der UI anzeigen lassen und hänge leider gerade ein bisschen.
Ich habe schon meinen eigenen API Token für Entso-E generiert und die Verbindung sollte auch passen. Die Preise sind auf der Edge-Seite vorhanden. Hier lasse ich mir die Preise in “TouEntsoeImpl.java” ausgeben:

Wie werden die Preise nun zur UI übertragen?
Wurde die UI Implementierung davon schon umgesetzt?

Ich freue mich über jegliche Tipps, wie man am besten herangeht! (Das Tutorial “Implementing a UI-Widget” reicht mir dafür leider nicht aus)

Vielen Dank im Voraus und viele Grüße,
Simon

Hallo Simon & willkommen im Forum,

Hast Du schon einen entsprechenden Controller für ToU eingerichtet? m.W. erscheinen die Werte nur, wenn ein Controller eingerichtet und aktiviert wurde.

Letzteres finde ich nicht sehr praktisch. Ich (persönlich) fände es auch besser wenn die Werte immer im UI angezeigt würden. Allein um mal ein Gespür für die Preisentwicklung zu bekommen.
Ich habe für mich mal einen Vergleich zwischen meinem Anbieter und Tibber in Abhängigkeit vom Verbrauch in Grafana gemacht und bin zu dem Schluss gekommen, dass sich ein variabler Tarif für mich nicht lohnt.
Als Vorlage/Idee diente mir diese Seite.

Gruß,
Klinki

Hallo Klinki,

danke für deine Antwort.
Genau, mit dem timeofusetariff controller klappt`s schon und mir werden die Preise in der UI angezeigt. Aber genau wie du möchte ich die Preise alleine (ohne Controller) sehen.
Und hierfür versuche ich gerade zu verstehen, wie die Daten zur UI übertragen werden, um mir dann evtl. ein eigenes Widget für die Preisen zu erstellen.

Das Widget von Tibber hier habe ich bei Stefan auf Youtube gesehen:

image
(https://www.youtube.com/watch?v=RQ9Xt474d-c&t=1007s&ab_channel=MoneyforFuture)

Hierzu wird wohl auch ein Controller verwendet. Geht die Preisübertragung von Edge zu UI auch schon ohne Controller?

Viele Grüße,
Simon

Hi Simon,

Dann habe ich Dich wohl nicht recht verstanden.
Die Anzeige der Preise im UI gab es. Mit dem entsprechenden Controller. Es reichte, wenn der Controller auf Standby war. Ist…puh…2 Monate her. Dann gab´s ein Update und die Werte werden nur angezeigt wenn der Controller aktiv ist.

Mehr kann ich Dir leider auch nicht sagen. Vielleicht meldet sich ja noch ein Contributor zu Wort.

Gruß,
Klinki

Hello @klinki,

Prices become visible only when the controller is enabled; unfortunately, this functionality is not possible without the controller.

To dispel any confusion, it’s important to note that the retrieval of prices from the API is a service independent of the controller. The controller itself is a standalone component. The widget you see in the UI belongs to the controller, not the price provider. The controller retrieves the prices and stores it in a channel within the controller, and this data is communicated through the UI. Regrettably, the price from the API is not stored elsewhere, necessitating the activation of the controller.

The term ‘standby’ referred to the controller’s state, indicating that the controller was still active but not prompting the storage system to take action. However, with a recent significant update to the controller implementation, we’ve overhauled the entire architecture, and the ‘standby’ state no longer exists. It’s crucial to note that while this change has occurred, it does not impact anything related to the problem you mentioned. The controller still needs to be active for prices to be visible on the UI widget.

In summary, you can still view prices on the UI widget, but the controller must be active.

Thank you,
Sagar

Hello venu-sagar,

thank you for your reply! I understand that I need to activate the controller.

I have two more questions:

  • Is it possible to display two different prices at the same time as well? (E.g. use one controller to transfer both prices or use two controllers and put these in one module on the UI side)

  • Is it also possible to also transfer all 96 quarterly prices to create a module that shows all these prices in the modular unit for example?

Thank you in advance and best regards,
Simon

Hello @SimonMa,

Is it possible to display two different prices at the same time as well? (E.g. use one controller to transfer both prices or use two controllers and put these in one module on the UI side)

we are currently limited to activating a single time-of-use tariff provider. This implies that two different prices at the same time is not feasible.

Is it also possible to also transfer all 96 quarterly prices to create a module that shows all these prices in the modular unit for example?

Absolutely, this functionality is already in place. along with transferring the quarterly prices, the system also seamlessly transmits anticipated states derived from the controller to the user interface. Current implementation is such a way that, it sends the last three hour data (prices, states) and next future 21 hour data (prices, states). This information visible in the modal component is only visible for the admin users.

It is implemented in the jsonrpc request handler:

function is triggered when we click the flat widget during opening of modal component

Thanks,
Sagar

Hi @venu-sagar ,

thank you once again!
After pulling the recent changes (from main branch), setting up the InfluxDB and logging in as admin I tried out the modal component of the TOU controller. It looks like this for me:

Now, I wonder how I can access and see the 96 prices (last three hour data and next future 21 hour data). Inspecting the traffic in my browser I can see that when clicking on the flat component to trigger the modal component there is only one price as it is for the flat component (currentData):

  • Did I understand correctly that I should be able to somehow see all 96 prices at this very moment?
  • Is there already a way to see these price developments in a chart (e.g. in the history)?

Thank you for your effort and best regards,
Simon

Hi @SimonMa,

Yes, this is correct.

The modal typically presents a 24-hour dataset (96 values), encompassing the past 3 hours (12 values) and the subsequent 21 hours (84 values). However, it appears that the historical values for the past hours are absent in the screenshot, possibly due to a lack of data stored in the database for those specific channels.

Regarding the future 21-hour data, you have to wait for sometime because the controller employs jenetics for simulation and schedule generation, which can take some time. In my experience, I usually wait for approximately 3-5 minutes for this process to complete.

Thanks,
Sagar

1 Like

Thanks @venu-sagar for supporting here.

We (mainly me and Sagar) are continuously working on features areound time-of-use, so there have been a lot of improvements recently. The screenshot here shows a (nearly up-to-date) UI for the planned schedule, including the future prices: Mehr Freiheit in der Nutzung dynamischer Stromtarife – OpenEMS

If you just want to record the historic prices, it is sufficient to activate the Controller but set the Mode to OFF (-> https://github.com/OpenEMS/openems/blob/develop/io.openems.edge.controller.ess.timeofusetariff/src/io/openems/edge/controller/ess/timeofusetariff/Config.java#L23-L24). It will still keep recording the hourly price and show it in the History chart. It’s true that there was a bug before, that caused the Controller to not record the data when in OFF-Mode, but that is fixed.

Regards,
Stefan

2 Likes

Thank you @stefan.feilmeier this looks nice!
I pulled the new code and using my Entsoe api key works fine for me. Let’s say I want to simulate different components over one month.

  • Is it possible to use CSV files for the prices instead of letting the simulation run for so long?

  • Is it possible to accumulate the total costs in the history? I would imagine it like this:
    image
    Or do you think it is better to include this in the history component of the TOU controller?

Thank you in advance and best regards,
Simon

To simulate a Time-of-Use price provider you would need a Simulated.Timeofusetariff component - that’s something we did not implement yet, but should be doable, taking the existing Simulators and Datasources as example.

Of course it’s possible to accumulate the costs. A proper place might be in the ToU-Controller or in “_sum”. Be aware that it will be difficult to calculate the cost of the Consumption, because then you need to find a price-tag also for consumed energy from PV and ESS discharge. I’d rather show the sumed-up price for the “Buy-from-Grid” energy in the “Grid” widget.

Just as a note: we are not yet showing actual price information in our serial products, because the energy and price we measure will always slightly deviate from the actually invoiced price. If we implemented this feature it would surely require a clear disclaimer written by a lawyer.

Regards,
Stefan

1 Like

Hi Stefan,
once again thank you for your answer and taking your time for me!

How did you do the simulation as in the following sreenshot which is from the live view I guess?

Best regards,
Simon

Hi Simon,

no, this is not simulated. It’s a screenshot taken from a real, productive system. (In fact my private FENECON Home 10 system - see this video: Video: Speicher im Winter günstig aus dem Netz laden)

If you are interested in the actual data of the optimization, you can see (and adjust) the JUnit tests in the Code → https://github.com/OpenEMS/openems/blob/develop/io.openems.edge.controller.ess.timeofusetariff/test/io/openems/edge/controller/ess/timeofusetariff/optimizer/SimulatorTest.java#L179

Regards,
Stefan

1 Like

Hi Stefan,

alright, thank you!
I have a hard time debugging why the controller cannot calculate the schedule even though it is running more than 15 minutes. Apparently, the periods in the Optimizer are constantly null. Currently my logs look like this:

ctrlEssTimeOfUseTariff0[BALANCING|No Schedule available]

Why are the periods in the Optimizer always null, do you have any ideas?

Best,
Simon

Hi Simon,

the periods can never be null, but the list can be empty - see https://github.com/OpenEMS/openems/blob/develop/io.openems.edge.controller.ess.timeofusetariff/src/io/openems/edge/controller/ess/timeofusetariff/optimizer/Optimizer.java#L35.

Calculation of a new Schedule should always be finished just before every full 15 minutes, so running 15 minutes should be sufficient to get one. And when calculation finishes, you should see a long log (created here → https://github.com/OpenEMS/openems/blob/develop/io.openems.edge.controller.ess.timeofusetariff/src/io/openems/edge/controller/ess/timeofusetariff/optimizer/Optimizer.java#L85-L86), that looks like:

OPTIMIZER Params [numberOfPeriods=96, time=2024-01-19T20:30+01:00[Europe/Warsaw], essTotalEnergy=22000, essMinSocEnergy=0, essMaxSocEnergy=19800, essInitialEnergy=0, essMaxEnergyPerPeriod=2500, maxBuyFromGrid=5750, states=[BALANCING, DELAY_DISCHARGE, CHARGE], maxPrice=287.7]
OPTIMIZER Time  Production Consumption EssInitial EssMaxCharge EssMaxDischarge State           EssChargeDischarge  Grid Price  Cost
OPTIMIZER 20:30          0         515          0        -2500               0 BALANCING                        0   515 256.90 0.1323
OPTIMIZER 21:00          0         943          0        -2500               0 BALANCING                        0   943 253.50 0.2391
OPTIMIZER 21:15          0         653          0        -2500               0 BALANCING                        0   653 253.50 0.1655
OPTIMIZER 21:30          0        1634          0        -2500               0 BALANCING                        0  1634 253.50 0.4142

Could it be, that you receive an Exception anywhere else in the log. E.g. a common problem is, that there is no prediction available, or the ESS has no Capacity set, etc.

Regards,
Stefan

1 Like

Hi Stefan,

I pulled the current code on main (to make sure my changes do not affect anything) and run the Edge and UI with following components:

  • Scheduler All Alphabetic
  • Simulator Datasource CSV Predefined (standard load)
  • Simulator GridMeter Acting (meter0)
  • Simulator EssSymmetric reacting (ess0)
  • TOU Tarif EntsoE (with my API Key)
  • Controller Ess TOU
  • Timedata InfluxDB

These are the logs that appear when running the OSGi:

Right after that, this follows:

The TOU prices are shown correctly but there is no schedule calculated and there is for some reason no period available.

Did I do smth wrong here already or am I missing smth?
Thank you in advance!
Simon

As I said, I did not test simulation till now, so cannot guide you completely to a working solution.

The screenshot shows numberOfPeriods=0. The log is generated here and the value is calculated here:

var numberOfPeriods = min(this.productions.length, min(this.consumptions.length, this.prices.length));

Prices seem to be fine, but I believe you do not have a prediction for Production and Consumption available, so those arrays are empty. There is no Simulator component for a Predictor available, but you could setup a Persistence-Model-Predictor and a RRD4j Timedata Provider and let the system run for a few hours. Then you should receive a prediction. Alternatively you could mock the data statically here for now.

Regards,
Stefan

1 Like