EMONCMS V8.0 bug in power_stats()?

In line 19 in function power_stats() in proc.js, Math.abs is performed on stat['kwh'].

This leads to a strange output in raw_data graph like e.g. 'Average: -294W | 2.92kWh', which does not make sense (this is a phase where I have negative power readings because of PV mains backfeed) .

I think this is an old bug which is either never removed or which 'creeps' into new versions again and again. Or am I not getting the idea behind it?

I have just removed line 19 in proc.js and then the reading makes more sense (to me).

 

BR, Jörg.

 

TrystanLea's picture

Re: EMONCMS V8.0 bug in power_stats()?

Not sure how its creeping back, if it did get removed? Il remove now though and update the repo, thanks for pointing it out.

Edit, I can confirm that I see the same error if I zoom in on a graph with negative power so its not just you.

Comment viewing options

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