We use emoncms to log daily data sent from Elster A1140 meters, via ftp and the emoncms API.
It all works smoothly but I am stumped on an error that is happening using the +input function to sum a number of inputs.
When looking at the processes for the relevant node under the input tab, the sum of the ‘latest values’ for the three feeds is different to the value being recorded by the ‘log to feed’ process. e.g. 14.65 + 6 + 30.01= 50.66, but log to feed is showing 41.05.
Interesting, I think +input should work ok in this context. I think this is timing as @Robert.Wall suggests, the feed value may be the last value rather than the result of the sum of the current value, the feed itself should be ok though…
The code runs every 24 hours so I have set up a new Log to Feed feed using +feed, and also one with PHPTimeseries rather than PHPFina. All feeds are otherwise set up as realtime, PHPFina and 10s. I will check tomorrow and see if that makes any difference.
If timing is the issue, I am not sure how to stagger or ‘slow down’ processes. Would changing the Feed Interval make any difference?
@Trystan I have tried a few permutations of the previous values and can’t find a way of reproducing the 41.05 value if that is what you mean?
Thanks Dan. How should I go about logging it on Github?
As you can see in the chart, the results are close to the correct totals, but always slightly off. Node 8 kWh 2 uses +input and node 9 kWh 3 uses +feed, and they are pretty close to each other, but not identical. Ignore kWh4 as I set it up wrong.
I will ask our programmer to try that. Just so I understand- will we still be able to create individual feeds for the individual values? They are daily values for separate installations so need distinct feeds. Thanks!
Yes, the only difference is that the data all comes in at once and so we can ensure that the calculations are being made on the latest input values rather than what might be a combination of new and old giving confusing results…