Skip to content

Latest commit

 

History

History
109 lines (70 loc) · 3.29 KB

Readme-ENG.md

File metadata and controls

109 lines (70 loc) · 3.29 KB

Thingsboard tools 2.0


Description

  1. This repository is the thingsboard-tools v2, if you're looking for the thingsboard-tools v1 Click here

  2. This project is under development. If you are looking for a stable version of this project, please use the v1 version.

  3. No CLI (command line) support yet, if you don't want to execute this project as a web service or you need the CLI tools for this project, please use the v1 version.

  4. For more system architecture of this project, a Notion public page is provided Click here

Features

This project provides API service, you can do the following features:

  • Get the tenant token of the thingsboard.

    • By default, this project uses the following user account to login into the thingsboard.

       # User name
       [email protected]
       
       # Password
       sysadmin
      
    • After this tool login successfully, will check the tenant list under this account and find the specified tenant user, and try to get the JWT token of the specified tenant user, this tenant user information can be modified in .env file.

  • Add / Remove virtual device onto the thingsboard.

    • Add virtual device(s) onto the thingsboard by APIs, and you can get device information.
  • Control the virtual device behavior, like the RPC command, and send data onto the thingsboard.

    • Control virtual device(s) behavior, now support:
      • Send data to the thingsboard
      • Subscribe RPC topic of the thingsboard
  • And more... (under developing)

Use case

Improving your development efficiency on re-development of the thingsboard platform.

  1. Get the tenant token of thingsboard easier.
  2. Need some virtual device onto the thingsboard, and you can control virtual device(s) behavior.
  3. Dynamic setting the virtual device action.

Requirements

  • Node.js
  • Thingsboard

Variables

.env file sample are located at src/config folder

# Application setup
PORT=3000
DEBUT=true

# Thingsboard server IP or container name
TB_SERVER_HOST=127.0.0.1:1618
TB_MQTT_HOST=127.0.0.1:1883

# Thingsboard server
[email protected]
TB_ADMIN_PASSWORD=sysadmin

TENANT_ADMIN_NAME=thingsboard-tools-tenant-admin
TENANT_NAME=thingsboard-tools-tenant
[email protected]

Running this application

  • Install dependencies

     npm i
  • Modify the variable

  • Execute this tool

     # Production
     npm run start
     
     # Dev
     npm run start:dev

Testing

We provide the POSTMAN collection file for testing, the swagger document will provide in the future version.

TODO

  • Customize the data format for virtual device upload data. (High priority)
  • And more...

For more information

This project also was recorded by Awesome Thingsboard -- Tools.

If you want to find other powerful developing tools, you can visit Awesome Thingsboard.