ThingsBoard
About 2 min
ThingsBoard
Product Overview
- Introduction to ThingsBoard
ThingsBoard is an open-source IoT platform that enables rapid development, management, and expansion of IoT projects. For more detailed information, please refer to ThingsBoard Official Website.
- Introduction to ThingsBoard-IoTDB
ThingsBoard IoTDB provides the ability to store data from ThingsBoard to IoTDB, and also supports reading data information from the root.thingsboard
database in ThingsBoard. The detailed architecture diagram is shown in yellow in the following figure.
Relationship Diagram
Installation Requirements
Preparation Content | Version Requirements |
---|---|
JDK | JDK17 or above. Please refer to the downloads on Oracle Official Website |
IoTDB | IoTDB v1.3.0 or above. Please refer to the Deployment guidance |
ThingsBoard (IoTDB adapted version) | Please contact Timecho staff to obtain the installation package. Detailed installation steps are provided below. |
Installation Steps
Please refer to the installation steps on ThingsBoard Official Website,wherein:
- ThingsBoard Official Website【 Step 2: ThingsBoard Service Installation 】 Use the installation package provided by your Timecho contact to install the software. Please note that the official ThingsBoard installation package does not support IoTDB.
- ThingsBoard Official Website 【Step 3: Configure ThingsBoard Database - ThingsBoard Configuration】 In this step, you need to add environment variables according to the following content
# ThingsBoard original configuration
export SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/thingsboard
export SPRING_DATASOURCE_USERNAME=postgres
export SPRING_DATASOURCE_PASSWORD=PUT_YOUR_POSTGRESQL_PASSWORD_HERE ##Change password to pg
# To use IoTDB, the following variables need to be modified
export DATABASE_TS_TYPE=iotdb ## Originally configured as SQL, change the variable value to iotdb
# To use IoTDB, the following variables need to be added
export DATABASE_TS_LATEST_TYPE=iotdb
export IoTDB_HOST=127.0.0.1 ## The IP address where iotdb is located
export IoTDB_PORT:6667 ## The port number for iotdb is 6667 by default
export IoTDB_USER:root ## The username for iotdb,defaults as root
export IoTDB_PASSWORD:root ## The password for iotdb,default as root
export IoTDB_CONNECTION_TIMEOUT:5000 ## IoTDB timeout setting
export IoTDB_FETCH_SIZE:1024 ## The number of data pulled in a single request is recommended to be set to 1024
export IoTDB_MAX_SIZE:200 ## The maximum number of sessions in the session pool is recommended to be set to>=concurrent requests
export IoTDB_DATABASE:root.thingsboard ## Thingsboard data is written to the database stored in IoTDB, supporting customization
Instructions
- Set up devices and connect datasource: Add a new device under "Entities" - "Devices" in Thingsboard and send data to the specified devices through gateway.
- Set rule chain: Set alarm rules for "SD-032F pump" in the rule chain library and set the rule chain as the root chain.
- View alarm records: The generated alarm records can be found under "Devices" - "Alarms.
- Data Visualization: Configure datasource and parameters for data visualization.