Equipment Aggregation Function

Hi everyone,

I have Equipment setup in my model from my solar controller using the http binding.

Net Power (Null) would like to see (150w)

Solar Generation (850w)

Solar Leg 1 (350w)
Solar Leg 2 (500w)
Consumption (1000w)
Consumption Leg 1 (200w)
Consumption Leg 2 (800w)

The legs work fine and update, and the parent aggregated the sums of the 2 to a total value just fine, however is there a way to use a DIFF function to get the net value to take the difference of Consumption and Solar Generation? I dont see Diff as an option in the aggregate function.

However in the documentation i see that the last 2 values are not an option for me. Is there an easy way to subtract Solar from Consumption without making a rule or script?

#### Aggregation FunctionTEXT

How to reduce the data points in a same aggregation cluster to a single value. If not specified, the average function will be used.

##### Options:

average
Average

sum
Sum

min
Minimum

max
Maximum

first
First (earliest)

last
Last (latest)

diff_first
Difference of firsts

diff_last
Difference of lasts

I believe that first, last, diff_first, and diff_last are only for DateTime type aggregations which is why you don’t see them in the list when you are aggregating a Number types.

In this case a rule is the easy way, but there may be some other options. You could apply a profile or transform to the Consumption item to change it’s sign to be the opposite of the others. Then when you sum them that one reduces the magnitude of the result.

Fronius returns the data in this manner already. I have never quite understood why, until now!

Transform the sign… outstanding!