Community
OpenEnergyMonitor

OpenEnergyMonitor Community

Input configuration for battery_discharge to show total household consumption

Tags: #<Tag:0x00007f680f0e9a88> #<Tag:0x00007f680f0e9830> #<Tag:0x00007f680f0e9718>

I’ve 3 sensors: grid, solar, battery.

I’ve configured the battery charge/discharge feeds from a single sensor and I’ve managed to configure the input so both feeds are positive values, based on another post in here. They compare favourably with the inverter’s reported values, so all good so far.

In the My Solar app, the ‘Use Now’ value is configured for the ‘use’ feed. This is currently just the grid sensor, so it would seem reasonable to aggregate it with the battery_discharge feed to get a true value for household consumption.

When I try to add this logging to the battery sensor input, the value is wildly different from just adding the values of the ‘use’ feed and the ‘battery_discharge’ feed. I must be making a serious error in my configuration, but it seems logical enough to me.

Can anyone help resolve this newbie error please?

I think there’s only half the information there.

I can’t see where you’re adding the grid power. If you’re writing two numbers that are arriving at different times drom different sources into the same feed, whichever is the last one to be written into its time slot (because this is how feeds work) is recorded, and if the other value got there first, it’s overwritten. No addition - no processing of any sort - takes place in a Feed, it’s a file on the SD card. You need to have a “+ input” from the grid before the final “log to feed - emontx3cm15 use”, or ideally have a separate feed for the grid input, and then do a “+ feed” instead. (It’s safer to do a “+ feed” because of timing issues.)

Alternatively, you can add a “+ input” using the battery discharge feed (not the _kWh one) in the input processing that leads to the “emontx3cm15 use” feed (not shown - so I can’t help further).

I have a separate input config for a feed called ‘use’, which is the grid sensor data.

So I am using the wrong operator? Fantastic.
I will give it a go.

I guess the ideal solution is to keep the grid data and battery discharge data in separate feeds, and create a 3rd feed to contain the aggregate of the grid use and battery discharge feeds?
That seems to be what you’re suggesting and a very sensible idea too.

But is that possible? Do I use the post-processor module for that, or add more config to the inputs?

I don’t understand the question. In the context of emonCMS, a “Feed” is the data that has been conditioned and manipulated by the processing on the “Inputs” page, and it’s where and how the data is stored. So all your history is in the Feed.

Your data comes from the emonTx instantly - there’s no storage on the emonTx at all - and it’s labelled at the emonTx with a NodeID. When the data arrives in the emonPi, it’s received by emonHub, checked and passed into emonCMS and appears as an Input, now labelled with the name it picked up in emonHub.

Hi Robert,

You seem to have added 2 separate but related questions together.

As I started with just an emonpi, the node name in the feed was emonpi.
Now I have an emontx as well and switched the sensors to the emontx, when I configured those inputs I was not careful to change the node name to emonpi.

What difference does this make? The apps’ config seem to have picked up the feed name automatically.

Should I modify the inputs node to emonpi? Am I going to make life difficult later on if I do not change the node name?

Perhaps a screenshot will help explain:

You kept that quiet. Remember I, and anyone else here who is trying to help you, only knows what you tell us about what you have and how you have connected it and set it up. None of us like to guess.

I think not ideal, but the only solution, given the way emonCMS works.

Do you think I would have suggested it if I didn’t think it were possible? What is stopping you? It’s not emoncms.org where you are paying per feed.

The post-processor is just that - it processes the stored data. You want - or I presume you want - to process the data as it is received, and yes, as I wrote earlier, you must add the two inputs, or an input and a Feed, on one of the Inputs pages.

N.B. As the two threads were related anyway, and seem to have got closer, I’ve merged them.

wow, did someone get out of bed on the wrong side or what?

Can you please put my questions back as they were so I can get the information I require?