How to get an average Value of an item (OH3)

I have programmed a blinds control. In it I retrieve e.g. temperature, wind and brightness data from a weather station on the roof. In addition, other parameters from OpenWeather for cloud cover, etc…
Now I would like to intercept not only the brightness in Lux in the respective moment, but would like to have the average value of the last 15 minutes e.g.
How can I get this average value in Openhab?

A simple site search would have answered that

How to ask a good question / Help Us Help You - Tutorials & Examples - openHAB Community

I have searched but do not think I have found what I was looking for, so here is my question. So this answer was so unfortunately unhelpful. But thank you.


rrd4j is included by default in OH3

Thanks for the tip, I’ll take a closer look!

Is there a Javascript way of doing this?

Yes, the same persistence extensions are available on the same Items.