OpenEnergyMonitor Community

Post Processor module - how do I delete a process? (and other questions)

I’ve done a bit of a search on the forums and checked the github page for the Post Processor module, but I can’t find any instructions for removing a post processor “process” once it is created.
They seem to be automatically deleted if I delete the feeds involved, but that isn’t something I wish to do. Is there any guide anywhere for removing specific processes?
I found this post Post process items disappear which indicates the process list is stored in mysql now, and that post also ends with an unanswered “how do I delete a post processor process?”.
@TrystanLea or @glyn.hudson?

Can I also request a small clarifying update to the description of two of the post processes? I got these descriptions from

importcalc: calculate grid import from house consumption and solar generation
exportcalc: calculate grid export from house consumption and solar generation

Does that mean importcalc ignores all exports, or are exports simply included in the calculation as “negative” imports? Is the same true (but in reverse) for exportcalc?
Or is importcalc just going to produce the “negative” value of running exportcalc over the same feeds?

Ok, answering my own question for the deletes, just in case it helps others, this is how you remove all post processor processes using ssh into your emoncms system. Based on an emonbase built using the build script:

mysql --user=emoncms --password=emonpiemoncmsmysql2016 emoncms
MariaDB [emoncms]> select * from postprocess;

Find the userid that has the processes you want to delete, in my case it was “1”, then use:

MariaDB [emoncms]> delete from postprocess where userid = 1;
Query OK, 1 row affected (0.002 sec)
MariaDB [emoncms]> exit;

Is it possible to update the web UI to allow these processes to be deleted from the Post Process page itself?

1 Like

And now answering the rest of my question (hopefully for the benefit of others…) this is the code in the importcalc process:

        $importval = NAN;
        if (!is_nan($useval)) $importval = $useval;
        if (!is_nan($genval) && !is_nan($genval)) $importval = $useval - $genval;
        if ($importval<0) $importval = 0;

Which is ignoring any export values (the last line there)

Here’s the exportcalc process code:

        $exportval = NAN;
        if (!is_nan($genval)) $exportval = $genval;
        if (!is_nan($genval) && !is_nan($useval)) $exportval = $genval - $useval;
        if ($exportval<0) $exportval = 0;

Which clearly ignores any imports (again, on that last line).

Can I request the guide at is updated with that extra detail please?

I think @gwil is likely to be the best person to ask.

1 Like

Another question about the Post Processor module, is it possible to back-fill an existing feed using a process? It doesn’t appear to allow me to create the process if I choose the name of an existing feed.
Is there a specific reason for that check/restriction, or does it depend on the feed type I’m using?