Lawrence - on the emonPi you can create the imbalance feed in a similar way. Go to the Inputs Page, find power1 and click on the Spanner/Wrench.
Add the - input process with for power2 and a Log to feed. And save changes (in the bottom right).
You’ll find your new feed on the Feeds page.
PS - my process list includes an Allow positive and I cannot remember why I added this!
I see what you’ve done here, but aren’t you usurping the power1 data feed for another purpose? The power1 key (|feed, the terminology is murky here) is now storing the imbalance not the original power1 data. How would I plot power1, power2 and the imbalance, each with their own database file?
Or am I just hopelessly misunderstanding everything?
This is where I’ve gotten to
Here is my input page
and from the Feeds page, the virtual feeds I would like to use
No, no usurping! A few months ago someone did an excellent job of adding a summary to each process step (Thank you!). Read the Output: line and that will tell you if the Output get changed or modified by the process.
The output for Power to kWh states: Output: Does NOT modify value passed onto next process step.. So to add the imbalance feed, just add a couple of additional process to your existing processes.
To plot, go the the Setup > Graphs page. Open up emonpi and click the feeds you want to plot.
PS - I don’t save or Log to feed the power1 or power2 inputs so I could not add those to the graph. But for your setup they are saved and can be plotted.
Jon is right about the feeds and logging to feed. There’s always more than one way to skin a cat. But there are a few differences:
As depicted, you would have to wait for the new feed to accumulate some history. i.e., it’s only useful to analyze future data. There is probably another way to build a feed from historical data in other feeds, but if you had stored the sum of the two main feeds rather than the individual mains, as I have in my Emoncms.org account, it would be impossible because the data just isn’t there, as is the case in Jon’s as well.
The new feed would require additional storage, so there is a cost in both delay and storage.
It all depends on how casually you want to look at the historic data. Last week, in the aftermath of a large storm that had left a lot of the US Northeastwithout power for several days, I was thinking about downgrading my generator from my loud stinky 6kW diesel to a modern propane fueled inverter type. So I was able to look at my historic power usage graphically with various non-critical loads removed. As it turns out, I can easily get by with a 2kW inverter generator, as long as I’m willing to manually wash dishes, hang the laundry, and rely on what the solar hot-water can produce. That’s the utility of being able to run scripts against your historical data, and that’s what I was trying to convey in the post.
I’m missing something here, so fill me in. You do seem to have created a historical imbalance graph, so is that coincidentally something you already had or another way to get in the wayback machine?
I have something working as Jon described, but yes Bob, I was interested in being able to look at historical data.
I have to think about this some more. I still have questions, but no time at this moment. Thank you for the comments. I’ll be back.
It is a Feed I created when I received the emonPi. No other wayback data!
I understand what’s happening now. In the process list for the power1 input, you have undertaken an additional numerical process and logged the result into a “new” feed. Where did you get the insight to do that? I first thought you were logging into the same feed. I have seen no documentation or instruction that would have suggested that it is what I should have done. My approach was that I needed to create a virtual feed, which is what I did and could see that the current value of the feed was updating correctly. I was failing in being able to store the data and plot the result. I think I can do what I need using your approach, although it will be somewhat more complex than simply calculating an “imbalance” as you did or “Amperage” as I have in my test case.
But I am left wondering. What is the purpose of virtual feeds? When are they needed and how does one use them? Since one cannot simply log them, there is no process for that, they need to be published to MQTT and then logged, somehow. But my understanding does not go that deep yet. So, is there any instruction out there on these matters.
And how does one perform such calculations on historical data? I realize that I could simply export all of the data needed as CSV and perform the necessary computations in a spreadsheet, but that seems cumbersome and time-consuming. I want to use the native abilities of the emonPi system.
I saw this and its significance with regard to creating a new feed escaped me. [CAUTION: mini-rant ahead, no reflection on you, Jon] I dislike documentation that only tells you what it doesn’t do as opposed to what is does do. My understanding of this is, (Output: Passes an unmodified copy of the input value onto the next process step)
Enough for now.
Mostly from reading thru this forum! And trying other user’s examples!
I’ve been trying to use them in a way that may be similar to your virtual feeds. I want to look at energy use per each meteorological season (I think Virtual feed was for a tariff). But quite honestly I really haven’t go the hang of this and it doesn’t seem like the output is correct.
or others may be able to lend a hand with virtual feeds.
Did you want to post process something? i.e., you’ve got the data and now you have a new idea on how you want it calculated? There is a Post Process page (Setup > Post Process) that was rolled out a few months ago. I think it is a work in progress but Trystan @TrystanLea would know better than I would.
Being a user driven community, much of the documentation comes from us, the users. It is fairly easy to suggest changes. Your recommendation is the perfect example!
There’s quite a bit in the Archived forums about virtual feeds written by Nuno Chaveiro, I think it’s probably worth looking there if you haven’t done so.
Good memory! (I had forgotten)
Virtual Feed - Post-processing data on the fly (first four posts)
@Jon, @Robert.Wall, @overeasy
Thank you all for the help. I have gained a lot of insights from this discussion.
I had seen the archived posts before and they set me on the path of creating virtual feeds. The final output value for my feeds was correct but I could never get them to display. When I tried to plot them, the graph routines would throw a lot of errors, as I said before. But further searching through the forum revealed that you, Jon, had the same problem at one time.
And there is no Post Process page (Setup > Post Process) available. My system must be out of date, even though I had only received my emonPi in mid-August. I was running the same emoncms version as you were experiencing problems with. An update of the emoncms to v9.8.18 has resolved all issues. The virtual feeds are now displaying in a graph. I now have the Post Process page. I am interested to see how this concept develops.
Below is my current effort showing the energy consumption in different colours for different tariff rate periods in the day.
Now I hope to create a virtual feed that reflects the accumulated cost based on the tariff rates for each period and hopefully resets to zero each day