Skip to content

ThingsBoard

Purpose

ThingsBoard is an open source IoT platform that allows for data visualization and real-time control of IoT devices. The exact purpose of the installation on the remote server is unclear, contact Ramón Buehlmann (ramon.buehlmann@rbde.com) for specific questions.

Current Status

ThingsBoard is not currently running, since the exact purpose is unclear and no employee has announced the need for the application to be running.

Login

If ThingsBoard is running, you can access the login page via http://develop-ing.ch:9090 in your browser. Use the credentials for the system admin, which are stored in our SharePoint library (contact Mustafa Degirmenci, mustafa.degirmenci@rubi.group). If you installed a new instance of ThingsBoard the credentials will be set to the default values, which are as follows:

Installation

Preconditions

This installation guide assumes that the following preconditions are true:

  • You have been given a user account on the remote server.
  • You have been granted access to the remote server via SSH.
  • You have been assigned to the group sudo.

Login to SSH Server

Log into the server using your account by replacing username with your username.

sh
ssh username@develop-ing.ch

Install and Run Docker

ThingsBoard is very easy to install and deploy in a Docker container.

First check the already existing docker container using this command:

sh
docker ps -a

Depending on the database used there are three type of ThingsBoard single instance docker images. Since we are using Postgres we will install thingsboard/tb-postgres.

Before starting Docker container run following commands to create a directory for storing data and logs and then change its owner to docker container user, to be able to change user, chown command is used, which requires sudo permissions (command will request password for a sudo access):

sh
mkdir -p ~/.mytb-data && sudo chown -R 799:799 ~/.mytb-data
mkdir -p ~/.mytb-logs && sudo chown -R 799:799 ~/.mytb-logs
sudo chmod -R 775 ~/mytb-data
sudo chmod -R 775 ~/.mytb-logs

Execute the following command to run this docker directly:

sh
$ docker run -it -p 9090:9090 -p 1883:1883 -p 7070:7070 -p 5683-5688:5683-5688/udp -v ~/.mytb-data:/data -v ~/.mytb-logs:/var/log/thingsboard --name mytb --restart always thingsboard/tb-postgres

Where:

  • docker run - run this container
  • -it - attach a terminal session with current ThingsBoard process output
  • -p 9090:9090 - connect local port 9090 to exposed internal HTTP port 9090
  • -p 1883:1883 - connect local port 1883 to exposed internal MQTT port 1883
  • -p 7070:7070 - connect local port 7070 to exposed internal Edge RPC port 7070
  • -p 5683-5688:5683-5688/udp - connect local UDP ports 5683-5688 to exposed internal COAP and LwM2M ports
  • -v ~/.mytb-data:/data - mounts the host's dir ~/.mytb-data to ThingsBoard DataBase data directory
  • v ~/.mytb-logs:/var/log/thingsboard - mounts the host’s dir ~/.mytb-data to ThingsBoard logs directory
  • --name mytb - friendly local name of this machine
  • --restart always - automatically start ThingsBoard in case of system reboot and restart in case of failure.
  • thingsboard/tb-postgres - docker image

It could be that those Instructions above are not anymore up to date. In that case always check these websites to get the latest informations: