A feed to capture other feeds

Is there a feed type that can add other feeds together?

I have the situation that I have some devices logging to emonhub over the network. Each one is reporting an average power for roughly the last 5 minutes.
What I would like is to be able to
1) Log the feeds with an average for the last 5 minutes (doable!)
2) Split the devices into two sets, and have a sum of the average powers over the last 5 minutes for the two sets, and graph these values.

How should I configure the last item (if possible?)

coldpenguin's picture

Re: A feed to capture other feeds

To be clear, the emonhub is sending the data on to a local emoncms installation, and it is within that I want to add the feeds together, not within emonhub.

pb66's picture

Re: A feed to capture other feeds

The " + feed " processor should do what you want. if you have say 6 inputs (1 to 6) and you log those as feeds 1 to 6. You can then for example in input 1, after log to feed 1, add feed 2 and add feed 3, this can then be logged to feed "123" as a sum of the 3 feeds. in input 4 you can do the same for feeds 4, 5 and 6 as feed 456. These can then be summed together by using add feed 123, after the log to feed 456 and log to feed 123456 etc

If you use PHPtimeseries or match the fixed interval of the new feeds to the inputs update interval the "5min average per datapoint" will be retained but I'm not sure if that is important.

Paul

coldpenguin's picture

Re: A feed to capture other feeds

Tried that already, but it doesn't seem to be recording anything at all, the feed in fact seems possibly corrupt.
When viewing it in the feed list now, it doesn't show any data type

Bruno's picture

Re: A feed to capture other feeds

Tryied to use /feed and it does nothing too. My guess is process with feeds are not working anymore.

pb66's picture

Re: A feed to capture other feeds

The /+-x feeds do all work, coldpenguin did express there maybe a corruption somewhere in his setup and he hasn't posted any further on the issue so it maybe the implementation that's not working perhaps? how are you using it? needless to say if the "divide by" feed value is 1 or if either is zero there would be no noticeable/successful value change.

Paul

Bruno's picture

Re: A feed to capture other feeds

I've made so many posts yesterday I forgot I done this one. After some digging and experimentation I was sucessful on using the /feed yesterday in the afternoon :) 

coldpenguin's picture

Re: A feed to capture other feeds

I didn't get anywhere with it.
To give an idea of what I am trying to do, the attached graph shows the feeds I want to sum. I want to sum the feeds on the first hump to bank A, the feeds on the second hump to bank B, and then all to a total.

The closest I have gotten working with the + feed, is that it acts the same as an accumulator, I get an increasing amount for every day. What I want is a graph which shows two humps, and the two humps added together.

A description of the steps would be good, as what I am currently doing is selecting panel a input, selecting log to feed panel a, +feed bank 1, log to feed bank 1

coldpenguin's picture

Re: A feed to capture other feeds

Although my Pi does appear to have issues (the apache service needs restarting regularly as it doesn't appear to be closing connections properly), I don't think this is affecting the math in any way.

pb66's picture

Re: A feed to capture other feeds

You may have to show us what processing you have as I see no reason why it shouldn't be straight forward, assuming you have 14 panels and they are each "log to feed" on arrival, pick an input from each group eg 1 and 2, in input 1, after the initial log to feed of input 1 you would add feeds 3,5 and 7 to give you

log to feed "Panel_1"
+ feed "Panel_3"
+ feed "Panel_5"
+ feed "Panel_7"
log to feed "Sum_of_odd_numbered_panels"

do the same in input 2 and then also add in the first group for a grand total

log to feed "Panel_2"
+ feed "Panel_4"
+ feed "Panel_6"
+ feed "Panel_8"
log to feed "Sum_of_even_numbered_panels"
+ feed "Sum_of_odd_numbered_panels"
log to feed "Sum_of_all_panels"

Paul

 

 

coldpenguin's picture

Re: A feed to capture other feeds

Thanks Paul.
I think I have bottomed out a couple of the problems.

I did have (due to the fact that I can't guarantee all inverters will log in their 5 minute period), and I think the "bank a" was set to averaged over 5 minutes.
node 23:8
log to feed "panel 13"
+feed "bank a"
log to feed "bank a"

node 24:8
log to feed "panel 14"
+feed "bank a"
log to feed "bank a"

node 22:8
log to feed "panel 12"
+feed "bank b"
log to feed "bank b"

When I tried it as you had it above, it didn't work first time.
I am on branch v8.5 of emoncms
When I did the add, for the last log to feed, create new, it didn't have the options for the type of feed.
And when I went into feeds, it showed type as empty, when I tried to change it, it appeared as if I updated it, but then it reverted when the page updated.
Deleting the feed, then going back to inputs, clicking the settings for panel 13 and immediately the log to feed shows the type of feed which was previously missing.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.