-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[basicprofiles] Add support for functions (DELTA, MEDIAN, AVG, STDDEV, MIN, MAX) in State Filter #17362
[basicprofiles] Add support for functions (DELTA, MEDIAN, AVG, STDDEV, MIN, MAX) in State Filter #17362
Conversation
1e5bcd6
to
28f7722
Compare
28f7722
to
0c4b178
Compare
This pull request has been mentioned on openHAB Community. There might be relevant details there: |
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/state-filter-range-filter-profile/158025/20 |
a6a3815
to
ff3620c
Compare
…, MIN, MAX) in State Filter Support any type of operand on either side of the operator e.g.: `ItemName > 10` and `10 < ItemName` Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
ff3620c
to
9a03888
Compare
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Would be nice if @J-N-K can confirm.
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/how-to-get-the-last-5-values-from-the-rrd4j/158569/5 |
Would be nice if another @openhab/add-ons-maintainers joins this conversion as i don't feel comfortable enough to just merge this as transformations and profiles are not my expertise. |
Perhaps we can try to ping @J-N-K again since he is both binding maintainer and @openhab/add-ons-maintainers. 🙂 |
…, MIN, MAX) in State Filter (openhab#17362) * [basicprofiles] Add support for functions (DELTA, MEDIAN, AVG, STDDEV, MIN, MAX) in State Filter Support any type of operand on either side of the operator e.g.: `ItemName > 10` and `10 < ItemName` Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
…, MIN, MAX) in State Filter (openhab#17362) * [basicprofiles] Add support for functions (DELTA, MEDIAN, AVG, STDDEV, MIN, MAX) in State Filter Support any type of operand on either side of the operator e.g.: `ItemName > 10` and `10 < ItemName` Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
ItemName > 10
and10 < ItemName
$DELTA
to represent the absolute difference between the incoming value and the previously accepted value.$AVERAGE
, or$AVG
to represent the average of the previous incoming values, excluding the incoming value.$MEDIAN
to represent the median value of the previous incoming values.$STDDEV
to represent the population standard deviation of the previous unfiltered incoming values.$MIN
to represent the minimum value of the previous incoming values.$MAX
to represent the maximum value of the previous incoming values.By default, 5 samples of the previous values are kept.
This can be customized by specifying the "window size" or sample count applicable to the function, e.g.
$MEDIAN(10)
will return the median of the last 10 values.All the functions except
$DELTA
support a custom window size.Example:
Filter out incoming data with very small difference from the previous one: