Split total energy hour by hour


I’m using the Teleinfo binding, and one of the usefull point is the total energy delivered over the time.

I would like to monitor the energy consumption hour by hour. What I have in mind is to create a pseudo-thing which compute the energy of the last hour, so the default analyser can show graphs.

How can I do that? Does it already exist?


Create a new rule, use persistence service and calculate the delta, average, sum, min, max (whatever you like) from the last hour, day, week etc and store it to a new item

Ok, I see. Thanks!

I just found this rule:

but I don’t really understand how I integrate it in my config. Should I juste cut/paste it in a fresh rule code section? What Am I supposed to see, once I configured the monitoring item?

This is a rule template to be installed through the addon store. You cannot copy and paste it.
Once installed, you will find a new template section when you add a rule. You can then configure the Items to be updated by the rule.
I have also posted a simple list item widget to show the information provided by the rule.

I couldn’t find it, but I just realized it requires OH 4.x, and I’m still in 3.4.5… Ok, time to upgrade.


1 Like

I see you made 2 templates: which one should I use? What are the differences?

Like the name is telling, one is for actual values like today, this week, this month, this year and one for historical values like yesterday, last week, last month and last year.

Got it.
BTW, what should items used in the rule look like (type and semantic)? I can’t get any value in them… I used type = number, semantic class = measurement, semantic property = power…

They are all the same

But how do I create the target items? From scratch? Or by editing the energymeter thing code?