Logging import/export separately (from one input)

I'm sending my fusebox <-> grid reading to a house_power feed, which is negative when exporting and positive when importing. I'm also sending the same input to Power to kWh (house_kwh) and Power to kWh/d (house_kwh_daily) feeds.

I'd like to log my import and export in two new, separate feeds. I can't see a way to use both Allow positive and Allow negative for one input. Should I subtract my unfiltered value from my Allow positive to derive my Allow negative, or is there a 'neater' way?

pb66's picture

Re: Logging import/export separately (from one input)

There is more than one way to do it but the better way IMO is to use a "reset to zero" -> "+ input" effectively reseting your processlist back to it's starting point again for a 2nd chain of processes. You can to this multiple times and you don't necessarily need to use the + input, in fact using a +feed if at all possible is much more robust.

Paul

ChrisBirkett's picture

Re: Logging import/export separately (from one input)

Perfect, just what I needed, thanks Paul.

Out of curiosity, can I ask what makes +feed more robust than +input?

pb66's picture

Re: Logging import/export separately (from one input)

Inputs are very easy to delete without confirmation and then they get replaced automatically when the next packet arrives. Any processlists referencing the deleted input will stop at that point and not finish the processes so usually means data doesn't get logged untill you figure it out. where as feeds are A) not so freely deleted as they hold valuable data and when you do try to delete one emoncms gives a warning and asks you to confirm.

Also if you have inputs that are only used in other processing lists and do not have their own processes, when emoncms.org is "purged" of "rogue" inputs,it could be considered unused and therefore deleted.

Paul

 

ChrisBirkett's picture

Re: Logging import/export separately (from one input)

All good to know! I'm actually sending my inputs to my own emoncms installation (probably a good thing as I'm now logging 16 feeds and counting.. plus I wanted to stop all SD logging on my emonpi)

On the subject of feeds and inputs, I noticed this in my emonpi > Emonhub > emoncms.log. I had a quick look at the code but haven't as yet found what is trying to 'get' these feeds. Is there an easy way to find out where these phantom references are? Right now this log is hitting the SD way more than the feeds would do, so I'm tempted just to put them back!

2015-7-25 21:38:09 FEED WARN Feed model: Requested feed does not exist feedid=3
2015-7-25 21:38:09 FEED WARN Feed model: Requested feed does not exist feedid=2
2015-7-25 21:38:09 FEED WARN Feed model: Requested feed does not exist feedid=4
2015-7-25 21:38:09 FEED WARN Feed model: Requested feed does not exist feedid=5
2015-7-25 21:38:09 FEED WARN Feed model: Requested feed does not exist feedid=6
2015-7-25 21:38:14 MQTT INFO Reloading config
2015-7-25 21:38:14 MQTT INFO Received mqtt message: emonhub/rx/5/values
 353,1,354,249.04,0,0,0,0,0,0,0
2015-7-25 21:38:14 FEED WARN Feed model: Requested feed does not exist feedid=1
2015-7-25 21:38:14 FEED WARN Feed model: Requested feed does not exist feedid=3
2015-7-25 21:38:14 FEED WARN Feed model: Requested feed does not exist feedid=2
2015-7-25 21:38:14 FEED WARN Feed model: Requested feed does not exist feedid=4
2015-7-25 21:38:14 FEED WARN Feed model: Requested feed does not exist feedid=5
2015-7-25 21:38:14 FEED WARN Feed model: Requested feed does not exist feedid=6
2015-7-25 21:38:20 MQTT INFO Reloading config
2015-7-25 21:38:24 MQTT INFO Received mqtt message: emonhub/rx/5/values
 345,0,345,249.81,0,0,0,0,0,0,0

 

Edit - wrapped long lines - BT

pb66's picture

Re: Logging import/export separately (from one input)

Unfortunately that's not a fault I've seen and I'm not familiar with PHP or that version of emoncms.

It looks like the error is being written by line 435 of feed_model.php but thats not very enlightening. If you are using a pre-configure SDcard image ie read-only image then the log files are kept in ram and the SDcard should be spared the logfile writes but it is best to sort it regardless.

Paul 

ChrisBirkett's picture

Re: Logging import/export separately (from one input)

Just a quick follow up for anyone who else who sees this in future:

2015-7-25 21:38:09 FEED WARN Feed model: Requested feed does not exist feedid=3

I had deleted feeds from my emonpi but references to these feeds remained associated with my inputs - I needed to remove these on the Inputs page.

Comment viewing options

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