ThingsBoard PE Feature Only ThingsBoard Professional Edition supports Analytics Rule Nodes feature. See ThingsBoard PE Installation Options to install ThingsBoard PE. |
This tutorial will show how to calculate total water consumption in the building based on incoming data from all water meter sensors in the building.
Let’s assume you have buildings with multiple water meter sensors inside each building. For example, one per each apartment or similar.
In this tutorial we will configure ThingsBoard Rule Engine to automatically calculate total water consumption in the building based on readings from multiple water meters and within certain time intervals.
We will use 1 building, 2 sensors and 10 seconds interval just for demo purposes.
You can use this tutorial as a basis for much more complex scenarios.
We assume you have completed the following guides and reviewed the articles listed below:
We will create one asset that has name “Building A” and type “building”. We will add this asset to an asset group called “Buildings”.
We will create two devices that has names “Water Meter A1” and “Water Meter A2” and type “water-meter”. We will add this devices to device group called “Water Meters”.
We must also create relations between the building asset and water meters. This relation will be used in the rule chain to associate water meters readings with the building itself. It is also convenient to use relations in the dashboards to provide drill-down capabilities. You may notice two outbound relations from the building asset to water meters on the screenshot below:
Note: Please review the following documentation page to learn how to create assets and relations.
In this section, we explain the purpose of each node in this tutorial. There will be three rule chains involved:
Nodes A and B: Generator nodes
Node C: Rule Chain node
Node D: Rule Chain node
Node E: Change originator
Node F: Aggregate stream node
Node G: Save telemetry node
Download and import attached emulators rule chain file as a new “Emulators” rule chain and attached water consumption rule chain file as a new “Water Consumption” rule chain. Please note that some nodes have debug enabled. This affects performance. Create Node C and Node D as shown on the image above in the root rule chain to forward telemetry to new rule chain.
Download and import attached dashboard file as a new “Building Water Meters” dashboard.
Note that you can drill down to the chart for particular warehouse by clicking on the corresponding row.
Getting started guides - These guides provide quick overview of main ThingsBoard features. Designed to be completed in 15-30 minutes.
Installation guides - Learn how to setup ThingsBoard on various available operating systems.
Connect your device - Learn how to connect devices based on your connectivity technology or solution.
Data visualization - These guides contain instructions how to configure complex ThingsBoard dashboards.
Data processing & actions - Learn how to use ThingsBoard Rule Engine.
Hardware samples - Learn how to connect various hardware platforms to ThingsBoard.
Advanced features - Learn about advanced ThingsBoard features.
Contribution and Development - Learn about contribution and development in ThingsBoard.