TWCManager icon indicating copy to clipboard operation
TWCManager copied to clipboard

some EMS may report consumption as positive, and generation as negative

Open ccutrer opened this issue 2 years ago • 2 comments

so automatically negate a negative generation value

ccutrer avatar Mar 30 '22 14:03 ccutrer

Thanks for this. Which EMS module were you seeing the negative values from? Just trying to evaluate whether or not this should be adjusted at the edge or here in the core, as it's possible some EMS modules may need to influence consumption by returning negative generation values (I'm not sure that's the case but vaguely remember something like this somewhere in the code), if this is done by any of the EMS modules then the change in this PR would require those modules to detect negative values and report them as consumption instead.

In fact, I think we had the code you've written in the past and then removed it for this reason but I'm not 100% sure, I'll need to do some research.

ngardiner avatar Jul 25 '22 01:07 ngardiner

My root EMS is IoTaWatt. TWCManager sees it via OpenHAB (because I have multiple sub panels, and no single CT measuring complete house consumption, so OpenHAB dynamically sums the total of each sub panel to get its total usage number).

ccutrer avatar Jul 25 '22 15:07 ccutrer