Post processing to generate self consumption

Hi all.The better half is failing to see the benefits of the solar panel install from a few years ago.
I’ve finally setup a feed to show self consumption and processing it in the time of use app to show the $ savings depending on tariff cost.
But I would like to generate this data (self consumption)from my historical feeds also.
Any ideas if it’s possible to do?


Hello @melv_doson can you share the input processing that you have setup?, I might then be able to help with the suitable post processing.

Thanks Trystan

“grid” input processing is as follows
1 Log to feed log [ EmonTx1: grid in out]
2 Power to kWh kwh [ EmonTx1: grid in out KWH]
3 Allow positive > 0
4 Log to feed log [ EmonTx1: Grid import]
5 Power to kWh kwh [ EmonTx1: Grid import KWH]

Solar input processing as follows
1 Log to feed log [ EmonTx1: Solar]
2 Power to kWh kwh [ EmonTx1: Solar KWH]
3 + input + inp Node EmonTx1:ct2 Grid
4 Log to feed log [ EmonTx1: Total Use]
5 Power to kWh kwh [ EmonTx1: Total Use KWH]
6 Reset to ZERO 0
7 + feed + feed [ EmonTx1: grid in out]
8 Allow negative < 0
9 + feed + feed [ EmonTx1: Solar]
10 Log to feed log [ EmonTx1: self consumption]
11 Power to kWh kwh [ EmonTx1: self consumption KWh]

the historical data is all process fine to show direct self consumption in the my solar app. just wanting to do similar to show real $$$ of savings from the panels

Thanks @melv_doson are you recording your data locally or is this on

In your first post you said that you want to process the historical data but in the second you say it’s all fine, can you convert the self consumption to a $ value with a simple multiplication? what kind of tariff are you on?

hi TrystanLea,
i have Emoncms on my own Debian server.
the Historical data of self consumption that i can see is generated in the background somewhere for the “my solar app”, not a feed that i can use for any calculations.

currently i’m using the time of use app with the “self consumption” feed that i have just created to give me $ figure of how much that power we self use would cost to buy, and hence show the better half the avings the solar panels give us. just want to expand this , if possible.

Hey @TrystanLea. Any further thoughts on if this is possible?

Sorry @melv_doson, Ah ok, I understand. Yes this should be possible with the post processing module:
Emoncms Post Processor - Guide | OpenEnergyMonitor

Lets say that you start with a historical feed for solar generation and historical feed for grid import/export.

Assuming export is negative, this should be possible using the basic_formula post processor using an expression of the form:

self consumption = solar - max(-1*grid,0)

The expression needs to reference the solar and grid import/export feedid’s, lets say solar = feed 1 and grid = feed 2. The expression should then be:


Hopefully that will generate the self consumption power feed.

You can then use the power_to_kwh post process to generate the cumulative kwh value

hi @TrystanLea , i tried the formula as you suggested, but the error I get says

{“formula”:“f3-max(-1*f2,0)”,“output”:41,“process”:“basic formula”}
STOPPING could not understand your formula sorry…

any ideas?

f3 is my solar feed
f2 is my grid import/export

Sorry yes on closer inspection it didn’t work for me either, I will look into it


Hello @melv_doson sorry for the delay,

it looks like splitting the above up into

export = max(-1*grid,0)

and then doing a second post process

self consumption = solar - export

should work ok

worked a treat once i setup the processing on the webpage, but to get it to work i had to run from the command line.

all good though, the better half can now see the benefits / savings the solar panels have given us over the last 13 months, nearly $2000. not including the money from selling power back to grid.
meaning out return on investment will be about 4 → 5 years.
already 3 years into this now :slight_smile:

thanks again Trystan