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
I just found this rule:
[:crayon: Add a primary screenshot or a logo here. The first image of the post will be promoted seen in the add-on list in the UI.]
This rule runs on every change of your energy meters counter value and updates items for today’s, this week’s/month’s/year’s/billing cycle’s energy consumption.
Language: JS Scripting
fixed persistence bug for billing cycle value
removed dependency from external blockly library
fixed more typos
fixing some ty…
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.
Widget Codeuid: EnergyCard
- context: Text
description: Title of the card
- context: item
description: Energy Meter Counter Value
label: Energy Meter Counter Value
- context: item
description: Actual Power Usage
label: Actual Power Us…
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.
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.
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…
But how do I create the
target items? From scratch? Or by editing the energymeter thing code?