ThingsBoard文档

ThingsBoard平台使用文档。

Installing ThingsBoard Trendz Analytics on Windows

Prerequisites

This guide describes how to install Trendz Analytics on a Windows machine. Instructions below are provided for Windows 10/8.1/8/7 32-bit/64-bit.

Hardware requirements depend on amount of analyzed data and amount of devices connected to the system. To run Trendz Analytics on a single machine you will need at least 1Gb of free RAM.

In small and medium installations Trendz can be installed on the same server with ThingsBoard.

Step 1. Install Java 8 (OpenJDK)

ThingsBoard服务运行在Java 8上。请按照以下说明安装OpenJDK 8。

  • 访问Open JDK下载页面以下载最新的OpenJDK 8(LTS) MSI软件包。
  • 运行下载的MSI软件包并按照说明进行操作。 确保已选择“添加到路径”和“设置JAVA_HOME变量”选项为“将在本地硬盘驱动器上安装”状态。

您可以使用以下命令(使用命令提示符)检查安装:

java -version

命令输出结果:

C:\Users\User>java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_212-b04)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.212-b04, mixed mode)

Step 2. ThingsBoard service installation

Download and extract the package.

https://dist.thingsboard.io/trendz-windows-1.5.0.zip

Note: We assume you have installed Trendz to default location: C:\Program Files (x86)\trendz

Step 3. Obtain and configure license key

We assume you have already have Trendz license key. If not, please get your Free Trial license before you proceed. See How-to get pay-as-you-go subscription for more details.

Once you get the license secret, you should put it to the trendz configuration file. Open the Notepad or other editor as administrator user (right click on the app icon and select “Run as administrator”).
Open the following file for editing (select “All Files” instead of “Text Documents” in file choosing dialog, the encoding is UTF-8):

C:\Program Files (x86)\trendz\conf\trendz.yml

Scroll to the bottom of the file and locate the following configuration block:

license:
    secret: "${TRENDZ_LICENSE_SECRET:YOUR_LICENSE_SECRET_HERE}" # license secret obtained from ThingsBoard License Portal (https://license.thingsboard.io)

Step 4. Configure connection with ThingsBoard Platform

You can connect Trendz Analytics to the ThingsBoard Community Edition or ThingsBoard Professional Edition.

Step 4.1 ThingsBoard Community Edition

Edit Trendz configuration file in the notepad

C:\Program Files (x86)\trendz\conf\trendz.yml

Add ThingsBoard REST API URL that would be used for communicating with ThingsBoard Platform

tb.api.url: "${TB_API_URL:http://localhost:9090}"
tb.api.pe: "${TB_API_PE_ENABLED:false}"

Step 4.2 ThingsBoard Professional Edition

Edit Trendz configuration file in the notepad

C:\Program Files (x86)\trendz\conf\trendz.yml

Add ThingsBoard REST API URL that would be used for communicating with ThingsBoard Platform

tb.api.url: "${TB_API_URL:http://localhost:9090}"
tb.api.pe: "${TB_API_PE_ENABLED:true}"

Step 5. Run installation script

Launch windows shell (Command Prompt) as Administrator. Change directory to your Trendz installation directory.

Execute install.bat script to install Trendz as a Windows service. This means it will be automatically started on system startup. Similar, uninstall.bat will remove Trendz from Windows services. The output should be similar to this one:

C:\Program Files (x86)\trendz>install.bat
Detecting Java version installed.
CurrentVersion 18
Java 1.8 found!
Installing Trendz Analytics...
...
Trendz Analytics installed successfully!

Step 6. Start Trendz service

Now let’s start the Trendz service! Open the command prompt as an Administrator and execute the following command:

net start trendz

Expected output:

The Trendz Analytics service is starting.
The Trendz Analytics service was started successfully.

In order to restart the Trendz service you can execute following commands:

net stop trendz
net start trendz

Once started, you will be able to open Web UI using the following link:

http://localhost:8888/
Authentication

For first authentication you need to use Tenant Administrator credentials from your ThingsBoard

Trendz uses ThingsBoard as an authentication service. During first sign in ThingsBoard service should be also available to validate credentials.

Troubleshooting

The log files are located in logs folder (“C:\Program Files (x86)\trendz\logs” in our case).

The trendz.log file should contain following line:

YYYY-MM-DD HH:mm:ss,sss [main] INFO  o.t.t.TrendzApplication - Started TrendzApplication in x.xxx seconds (JVM running for x.xxx)

In case of any unclear errors, use general troubleshooting guide or contact us.

Windows firewall settings

In order to have external access to Trendz Web UI you need to create a new inbound rule with Windows Firewall with Advanced Security.

  • Open “Windows Firewall” from “Control Panel”:

image

  • Click “Advanced settings” on the left panel:

image

  • Select “Inbound Rules” on the left panel, then click “New Rule…” on the right “Actions” panel:

image

  • Now new “New Inbound Rule Wizard” window will open. On the first step “Rule Type” select “Port” option:

image

  • On the “Protocol and Ports” step select “TCP” protocol and enter port 8888 in the “Specific local ports” field:

image

  • On the “Action” step leave “Allow the connection” option selected:

image

  • On the “Profile” step select Windows network profiles when to apply this rule:

image

  • Finally, give the name to this rule (for ex. “Trendz Service Networking”) and click “Finish”.

image