Bayesian Group Suite - Control Widget

This rule is one part of a bundle designed to allow the creation, configuration, and utilization of Bayesian probability calculations for some item states using the MainUI. The three parts are:

Credit: This is an OH3-ready implementation of @cweitkamp’s awesome Bayesian aggregation design pattern. So, much of the credit goes to him and you will want to read through his post for a more detailed explanation of the underlying concepts and very clear description and example of probability selection.

This widget displays a list of and various information about all the Bayesian Sensor Groups defined in your OH system (see Activation rule for full descriptions of the Bayesian sensor groups). If you also have the Bayesian Group Modification Rule installed (see link above) then additional functionality related to the automatic creation and checking of the groups’ metadata is avaialble to you.


  • Bayesian Group Activation Rule - The items managed by this widget will have no functionality without this rule

  • Bayesian Group Modification Rule - This wiget will have enhanced capabilities if this rule is installed and configured as the linked rule for the widget


Install the widget from the marketplace. If you do not intend to use the modificaiton rule then you can just add the widet to a page.

If you have an instance of the modification rule created already then when you add the widget to a page you can configure the widget to be linked to that rule using the widget configuration UI or setting the modRule property to the UID of the rule. Then, the first time you use the widget there will be an Initialize button. Press this button to automatically create the item that will link the widget to the rule. You only have to do this once. After this you will have the full capabilities of the widget wherever it is used.


No Modificaiton Rule

Without the modification rule installed and linked to the widget you will have the following features:

  • Basic Details - The most important configuration options for each sensor group will be displayed along the bottom of the widget whenever a sensor is selected

  • Edit Metadata - Direct link to open the metadata page for the selected sensor group to allow editing of the metadata

  • Edit Group Item - Direct link to open the Group Item detail page of the selected sensor group to allow for easy edit of group membership

  • Show Chart - View a chart that shows the State of the proxy item over time (if a chartable state such as ON/OFF) and the assoicated probability value (if a posterior probability item is configured for the sensor group). This feature uses the default persistence service.

Modification Rule Not Linked

If an instance of the modification rule has been created, then that rule can be used to run a metadata audit directly (see description on the rule page linked above). In that case the widget will offer the follow feature:

  • Show Audit Results - Show list of audit results for the selected group sensor below the details section (and hide the results by clicking the button again).

Modification Rule Linked

Linking the modification rule to the widget adds the following features:

  • Audit - Run an audit that checks the metadata of each sensor group for completeness and errors

  • Audit Selected Only - Run the metadata audit for the sensor group that is currently selected in the widget

  • Create New - Create a new empty Bayesian sensor group with the proper tagging and default metadata already applied

  • Create New From Existing - Select a currently existing Group Item and add the Bayesian Sensor tag and default metadata to convert this item into a Bayesian Sensor Group


main view


Version 0.1

  • initial release