-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Group math operations are not reliable over restarts #34
Comments
This sounds useful. At first I thought this may only be an issue when the user does not use persistence and restoreAtStartup. However, I can see this being an issue when Things go offline or are disabled. Another proposal to consider is to implement a System configuration option, where the aggregation functions check the value before calculations. This seems incomplete to me though. Aggregated group functions are not the only things affected by offline/disabled Things. On a larger scale, perhaps the system could completely ignore offline/disabled Things, their Channels, and even any linked Items. Group aggregation would ignore the Item and its missing value, but the Item could also disappear from UIs. Rules would need to assume Items do not always exist and check for their existence. Just thinking out loud here... |
Hey Scott, You are also right about things getting offline. I believe a long time ago Chris did suggest that items should get into |
I'm not 100% sure, but I think I did change that in OSH. My gripe is that it's not handled consistently by bindings in OH, which gives a horrible UX and everyone asks the binding maintainer to fix it in some binding specific way which just propagates the mess... |
I've found that math function calls
SUM
,MIN
,MAX
,AVG
might generate false results due to initialization order or missing state for one or more of grouped items.Especially for energy or power demand calculation this is an unintended behavior which leads to false results. For example when states of item A, B, C are set the result is correct, but when one of item states is missing (its null) then result, depending on its use, might be invalid.
Proposal to consider - all of math functions to have an extra parameter to decide if groups which use them are fine with a partial calculation. If user decides to not accept partial results then function should return an
UNDEF
state until all child item states are known.The text was updated successfully, but these errors were encountered: