# Calculating with kwhd feeds

Is it possible to do calculations with kwhd feeds? I have 3 different kwhd feeds (solar, import, export) that make up together the usage of electricity. I want to add import to solar, and subtract export, so that the daily energy use in kwhd can be logged. Import and Export are created from an accumulating kwh input, and solor is being generated from an power input.

As example;

feed 1 : imported 4kwh
feed 2 : solar 12kwh
feed 3 : exported 8kwh

daily use : 8kwh

Can I get the sum of the daily usage from other kwhd feeds? I’ve found that kwhd feeds from a power input differ from the accumulation digits from my smartmeter too much

Yes you can do exactly that, using +feed and -feed processes.

However…[quote=“jon.rescca, post:1, topic:2409”]
Import and Export are created from an accumulating kwh input,
[/quote]

So that sounds like you have separated import and export from a “nett grid” and you effectively want to use both elements to calculate use, I have to ask why can’t you use the “nett grid” feed?

The kwhd feeds are apparently being phased out slowly, predominantly because they are not timezone friendly and also as they take up space with almost duplicate data, the accumulating feeds for “total kwh” can be used for historical daily data but there is currently no means to track today’s daily total although there has been some proposed development in that area.

What is your source data like?
I never sum daily totals as I use power values to arrive at the “power used” and create kwh and kwhd feeds from that.

That could be a calibration issue or due to the days start/ends not aligning exactly. Or if you have a solar PV diverter of some type then this “difference” is most likely your “free energy” as the core principle of these devices is to allow consumption of surplas PV without it registering on the meter by rapidly switching between import and export, so in an ideal situation your meter will not accumulate where as your power monitor will see lots of import and export.

If you do have a diverter then the only way to accurately track your metered usage is with a pulse counter (or api to your smartmeter?).

That seems not to work when one of the inputs (accumulated watt hours) goes counting down when generating surplus solar energy. So I gave up on trying for that.

My kwh feeds are generated from 4 ever increasing watthour import and export feeds from my smart meter, those get read via a shellscript, and updated every 10 seconds.

My solar panels have both an daily reset watthour value, and current power value to work with:

The current dashboard that is created from thr emontx clamp data looks like the following:

And the kWh/d feed is used as a sport to keep it as low as posible;

Forgive me if I mis-understand but aren’t these points contradicting each other?

The dials you show seem to add up and there is very little processing present on the input pages, so I’m a little confused how you have these kwh/d feeds set up and therefore how/why they are not working for you.