Solar power vs power grid consumption

In Belgium, a huge ‘war’ started because our powerproviders starts with a ‘digital meter (DM)’ rollout. In short, we’ll not be able to have a powermeter that turns back. So power we don’t consume ourselves, is ‘lost’ (sold back for free). And a lot of discussions starts that the values from the DM aren’t correct. So I want to have a kind of control system, a kind of reporting.

I’m measuring 2 values:

energyIN: Power coming from the grid (measured by Flukso device)
energyOUT: Power generated by the PV installation (measured by Solaredge)

And with this, I calcuate the difference:

energyDifference = energyIN - energyOUT

This is nicely put into graphs and so. So I can see at any time the ‘correct’ consumption.
But I was wondering now how the best way is to calculate the total of used/gained power over a certain time period. So that I’ve got an accurate result/report.
Fe for timeframes:

  • Last day
  • Last week
  • Last month
  • Last year
  • Months: january, februari, march…

The best way to do such thing is by calculating difference between energy reading in beginning of the period (ie. 00:00) and the end (23:59). I do believe you can do that with persistence extensions through rules. Your meter most likely keep reporting kWh which is ever increasing. You take last reading and subtract very first one.

Is that accurate enough? I mean, these will not be ‘averages’ after a while?
If fe I want to see the consumption for the month january?

If you do rely on rrd storage then well… you will have aggregated values. I don’t know your exact setup hence I can’t say if this will be an average or not. As far I recall rrd had an option to calculate min, max and avg values. Not sure if that’s supported in OH persistence though.

You need a non volatile storage for readings cause any OH restart during an month would reset your counter. Memory based calculations are fine for an hour or day, but not for an week or more.

You need another meter to get any valuable information out of your system.

The Flukso device measures and reports what exactly? At a guess its probably kwhs you pay for.

Do you have a way to meter your consumption?

Its math you can make it either way

If you can get accurate consumption data then you can do automations to better utilise your assets.

Like run the washing machine/hvac/anything when you detect you are exporting free power.

Sort of, but this is an ever-increasing reading? Assuming you are using rrd4j persistence, and assuming you have set it up or allowed it default to “averaging”, what does that mean?
If you go far enough back in time you might get just one record, the “average” for one day. Compare that with the “average” of the day before or day after, you get an accurate daily consumption.
You might not know if that is midnight-to-midnight, or midday-to-midday, but that doesn’t usually matter. It depends what you are going to do with this information.

You have to go back years to run into these kind of issues with default rrd settings.

I’m using Flukso and also zwave power meters to measure the currents (watt). This is done by power clamps, and are taken every 10 seconds.

That would be one of the ideas, but this is easier said then done. Reality is that you don’t always need the devices to run when there’s sun. It’s a nice theory, but I still want to see the first real life examples … :wink:
Beside, we’ll been penalized in Belgium when we use more the 2,5kw over our average consumption? And you know, 2,5 is nothing when fe you start a ac, and iron, freezer starts … Not even talking about charing a car. :blush:
But guess that we can (should?) start a seperate topic on this. How automation helps you (and the planet) to safe energy. In real life, not in theory.

Not sure if I can see it like that. Not even sure how to describe… :blush:
It’s more a kind of exercise to have a report on how you’re doing.
That you can have detailled report with power you toke from the grid, and power you generated. And if there are discussions with hte provider, you have number to put beside.

So I would like to have something like:

month Grid PV result
January 5,5 kW 3,2 kW - 2,7 kW
Febrary 3,6 kW 3,2 kW - 0,4 kW
March 4,8 kW 5,2 kW + 0,4 kW
April 4,2 kW 6,3 kW + 2,1 kW

ps this is more brainstorming to get a nice (and usefull) output from my installation / openHAB. :wink:
This is fe a dashboard of my electrity measurement. But beside it, I would like to have some ‘reporting’ on it. Not look at the graphs in detail. The third should be week timing, but it’s just running since this morning. And the fourth one had a peak of craziness. Still finetuning it.

That’s your problem really.
You do get to choose what records to keep, but first you must decide what records you want.
Cumulative meter readings? Instant power consumption? Both have uses, either might be used to calculate the other.

A fairly common approach is to calculate a “daily report” of values you are interested in and persist them at 23.59 each day.
It’s then pretty trivial to build weekly, monthly reports using that data.

1 Like

And you store these in a number item?
Can I do then in 2023 a kind of rule to show the data of jan 2021?

I don’t really understand the question. If you stored the data, of course you can. If you didn’t store it, you can’t. So in Jan 2021 you need to have decided what data you will need later and store it. That could be live readings, calculated data, or a mix, as you require.

Example:
Just persist meter readings as they come.
Have a rule that -
Gets the reading from midnight on the last day of last month.
Gets the reading from midnight on the last day of two months ago.
Calculates the difference.
Announces “Last month’s consumption was xxx”.

So what is it measuring?

Incoming power from the grid in both directions
Only incoming power from the grid
Excess power from the solar going to the grid

You calculation for energyDifference is the solar shortfall

You really want to know 4 thing.

  • Your Consumption
  • Solar input
  • Grid input
  • Power you exported to the grid without being paid.

To measure your consumption can be hard if you are exporting power to the grid from your solar without a way of measuring it.

Dose your Flukso device report negative values?

If you measure that you are exporting power you can calculate if it will be economical to install batteries.

Here I pay 24c per KWH consumed and 14c per KWH credit when exported to the grid. I save money if I use electricity when making it. Naturally when the sun is shining the aircon is on.

I manually delay the dishwasher start so it starts when the sun is shining.
Same for washing machine.
I don’t log any of the data or measure anything.
My lights are nearly all automatically turn off when no one is in the room.
My aircons automatily turn off and turn on when its too hot in the room for pets.

1 Like

At this moment, I’m measuring 2 important things in this story.

  • Power from the grid, right after the power meter
  • Power from the solar, right after the inverter

And a rule to calculate the difference. Just A-B=C. Where C will/should be the baseline for reporting, acting… ?

With this rule, I’m getting negative values, this is of course the power I pay expensive, and want to avoid.

Untitled


So in first place, I’m looking for:

  1. A good reporting on it. The graph can help, but maybe you guys have a nicer output for it? I’m thinking about bar graphs or so?
    I just want to inform me very well before I’m getting to the conclusion in fe a year that I could do it better. :wink:

  2. Have rules based on it.
    Washing machines and so are easy to schedule, a start, but what else…

So if A is the grid at 0 because you are not consuming any power from the grid and your meter doesn’t go negative you cant tell what you are exporting to the grid.

Also if A = 0 and B = 5
0-5 = -5

You can’t tell what your consumption is if you value A only shows positive values.

I see your point.
And your right, guess I need to rethink/recable my setup. Maybe move my flukso clamp behind the PV injection point…

Or maybe I should check the ZWAVE energy meter if he can do negative values (these clamps have a direction, so), and buy an extra one for this purpose…

Just validated, and guess my setup/measurement is correct. So in my original post, my assumption/statement was wrong. I measure behind the solar installation, see below.

  • Value A is the household
  • Value B is the PV invertor
  • Value C = A - B

So my C calcuation is correct? A - B = C. This is fe the calculation with openHAB for the last 12 hours. Sadly, solaredge aren’t so detailled (15min?). So maybe I should in the future also use clamps here.

Now I want to calculate the day difference. And then do this for every day, week, month…
And put these fe in a kind of bar chart? Or something else usefull?

1 Like

Yes they will be correct as per the diagram. They will both be positive readings.

Cool we all make mistakes. Better to make sure than take the wrong data.

The resolution of 15min of your solaredge should not effect your data much unless you have lots of little clouds in the sky.

With the main topic here being energy monitoring, I thought a plug for https://openenergymonitor.org/ would be helpful for some. There are some guides around integrating OpenCMS and openhab (they bundled the two together for a while), One of many projects I have on my backlog list :slight_smile: