Entities Overview

Tenants - you can treat tenant as a separate business-entity: individual or organization who owns or produce devices and assets;
Tenant may have multiple tenant administrator users and millions of customers;

Customers - customer is also a separate business-entity: individual or organization who purchase or uses tenant devices and/or assets;
Customer may have multiple users and millions of devices and/or assets;

Additionally, devices and assets also have a type. This allows distinguising them and process data from them in a different way.

This guide provides the overview of the features listed above, some useful links to get more details and real-life examples of their usage.

Real-life application

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 to the Geo regions.

We believe there should be following logical steps to build such an application:

Step 1: Provision entities and relations

We are going to setup following hierarchy of assets and devices:

Please review the following screen cast to learn how to provision region and fields assets and their relations using ThingsBoard Web UI

Please review the following screen cast to learn how to provision devices and their relations with assets using ThingsBoard Web UI

You can automate this actions using ThingsBoard REST API. You can provision new asset using 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 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 any entities. For example, assets to devices or assets to users.
You can receive them as a result of previous REST API call or use Web UI.

Step 2: Assign attributes to the assets

ThingsBoard provides the ability to assign attributes to entities and manage them.
This topic is covered in separate guide.