exeldro / com.insights.aggregate

Aggregated Insights for Homey
3 stars 1 forks source link

Difference aggregation produces flat (zero) insights #4

Closed rnldnkp closed 6 years ago

rnldnkp commented 6 years ago

I tried like all combinations I could think of, but all I get is a flat line of zero values for my power meters. I did however get 'Average' and 'Sum' working for two there types of values (beter logic and temp sensor).

Example, Youless powermeter.

schermafbeelding 2018-01-19 om 19 18 08

Then add these two to be sure (since peak does not have values at night)

schermafbeelding 2018-01-19 om 19 29 25

While waiting I get some "Missing logs for x", and "x log value:NaN Fri Jan 19 2018 04:00:00 GMT+0100(CET)", although it continues.

And, when it's done, it looks like this

schermafbeelding 2018-01-19 om 19 38 47 schermafbeelding 2018-01-19 om 19 39 31

Could you help me out how to do it the right way? I understand the second start/middle/end, but what about the first start/end (next to 'log')?

Using 0.0.5 now

Update: Changed title to something more useful for the issue (since I didn't know it was a issue)

exeldro commented 6 years ago

I found the bugs in the difference aggregation fixing them atm

exeldro commented 6 years ago

The start/end next to log is for aggregation method average. It calculates the average weighing in the time the value has been active. The active time of a value can be before or after the log moment.

exeldro commented 6 years ago

version 0.0.6 fixes the difference aggregation

rnldnkp commented 6 years ago

Thanks for the info and the fix

exeldro commented 6 years ago

version 0.1.0 is now published.

rnldnkp commented 6 years ago

works like a charm!

schermafbeelding 2018-01-22 om 23 47 20

Manual better logic calculation (flow 0:00 every day) vs your app (in like 10 seconds) :)