Get Started

Tip

Reprinted this article from Getting Started with ThingsBoard, slightly modified.

Introduction

The goal of this tutorial is to demonstrate the basic usage of the most popular Avantec HVAC device and ThingsBoard features. You will learn how to:

  • Connect devices to ThingsBoard;

  • Import real-time end-user dashboards.

We will connect and visualize data from a Avantec HVAC device to keep it simple.

Refer to Getting Started with ThingsBoard to get support for the following features:

  • Define thresholds and trigger alarms;

  • Push notifications about new alarms over email, SMS or other systems.

Prerequisites

You will need to have ThingsBoard server up and running.

  • The easiest way is to use Live Demo server.

  • Or ThingsBoard Cloud.

  • The alternative option is to install ThingsBoard using Installation options.
    • Windows users should follow this guide.

    • Linux users that have docker installed should execute the following commands:

    mkdir -p ~/.mytb-data && sudo chown -R 799:799 ~/.mytb-data
    mkdir -p ~/.mytb-logs && sudo chown -R 799:799 ~/.mytb-logs
    docker run -it -p 9090:9090 -p 7070:7070 -p 1883:1883 -p 5683-5688:5683-5688/udp -v ~/.mytb-data:/data \
    -v ~/.mytb-logs:/var/log/thingsboard --name mytb --restart always thingsboard/tb-postgres
    

    These commands install ThingsBoard and load demo data and accounts. ThingsBoard UI will be available using the URL: http://localhost:8080 . You may use username tenant@thingsboard.org and password tenant. More info about demo accounts is available.

Some important parameters

Please remember the following important parameters, which will be used frequently in the following work:

Some important parameters

ThingsBoard
server

Web URI

Default Tenant Account

MQTT URI / Cloud Host

Live Demo
server

https://demo.thingsboard.io

mqtt://demo.thingsboard.io

ThingsBoard
Cloud
(Subscription
plans)

https://thingsboard.cloud

mqtt://mqtt.thingsboard.cloud

Installation

local:
http://localhost:8080
remote:
http://your_server_ip:8080

username:
tenant@thingsboard.org
password: tenant
See demo accounts

mqtt://your_server_ip

Step 1. Tenant Login

../_images/tenant-login-12.png

Tenant default username and password, refer to Some important parameters.

Step 2. Import Avantec Widgets

Step 3. Import device profile

Step 4. Import Dashboards

Step 5. Provision device

Step 6. Connect device

Step 7. Assign Device and Dashboards to Customer

One of the most important ThingsBoard features is the ability to assign Dashboards to Customers. You may assign different devices to different customers. Then, you may create a Dashboard(s) and assign it to multiple customers. Each customer user will see his own devices and will not be able to see devices or any other data that belongs to a different customer.

Step 7.1 Create customers

Let’s create a customer with title “My New Customer”. Please see instruction below:

  • Navigate to the Customers page.

../_images/create-customers-1.png
  • Click the “+” sign to add a customer.

../_images/create-customers-2.png
  • Add customer title and click “Add”.

../_images/create-customers-3.png

Step 7.2 Assign dashboards to Customer

Let’s share our dashboard with the Customer. The Customer users will have read-only access to the Dashboard.

Step 7.3 Assign device to Customer

Let’s assign device to the Customer. The Customer users will have ability to read and write telemetry and send commands to devices.

Step 7.4 Create customer user

Finally, let’s create a user that will belong to the customer and will have read-only access to the dashboard and the device. You may optionally configure the dashboard to appear just after user login to the platform web UI.

  • Navigate back to the “Customers” page and click the “manage customer users” icon.

../_images/create-customer-user-1.png
  • Click the “Add user” icon.

../_images/create-customer-user-2.png
  • Specify email that you will use to login as a customer user and click “Add”.

../_images/create-customer-user-3.png
  • Copy the activation link and save it to a safe place. You will use it later to set the password.

../_images/create-customer-user-4.png
  • Open user details.

../_images/create-customer-user-5.png
  • (Option) Toggle edit mode.

../_images/create-customer-user-6.png
  • (Option) Select default dashboard and check “Always fullscreen”. Apply changes.

../_images/create-customer-user-7.png

Step 7.5 Activate customer user

  • Use the activation link to set the password. Click “Create Password”. You will automatically login as a customer user.

../_images/activate-customer-user-1.png
  • You have logged in as a Customer User. You may browse the data and acknowledge/clear alarms.

../_images/activate-customer-user-2.png

Step 8. Open Dashboards

Next Steps

See also

Your feedback

Don’t hesitate to star Avantec on github to help us spread the word.