ThingsBoard provides the user interface and REST APIs to provision and manage multiple entity types and their relations in your IoT application. Supported entities are:
Each entity supports:
Moreover, devices and assets also have their own types. This allows distinguishing them and process data from them differently.
This guide provides an overview of the features listed above, some useful links to get more details, and real-life examples of their usage.
The easiest way to understand the concepts of ThingsBoard is to implement your first ThingsBoard application. Let’s assume we want to build an application that collects data from soil moisture and temperature sensors, visualize this data on the dashboard, detect issues, raise alarms and control the irrigation.
Let’s also assume we want to support multiple fields with hundreds of sensors. Fields may be also grouped into the Geo regions.
We believe there should be the following logical steps to build such an application:
We are going to setup following hierarchy of assets and devices:
Please review the following soundless screencast to learn how to provision region and fields assets and their relations using ThingsBoard Web UI:
Please review the following soundless screencast to learn how to provision devices and their relations with assets using ThingsBoard Web UI:
You can automate these actions using ThingsBoard REST API. You can provision a new asset using a POST request to the following URL
Note: in order to execute this request, you will need to substitute $JWT_TOKEN with a valid JWT token. This token should belong to a user with TENANT_ADMIN role. You can use following guide to get the token.
Also, you can provision new relation using a POST request to the following URL
Note: Don’t forget to replace $FROM_ASSET_ID and $TO_ASSET_ID with valid asset ids.
Note: One can relate to any entities. For example, assets to devices or assets to users. You can receive them as a result of a previous REST API call or use Web UI.
ThingsBoard provides the ability to assign attributes to entities and manage them. You are welcome to learn how to do it here:
ThingsBoard provides the ability to work with telemetry data for devices and other entities. You are welcome to learn how to do it here:
ThingsBoard provides the ability to raise alarms using rule engine for devices and other entities. You are welcome to learn how to do it here: