Stop the war

Stand with Ukraine flag

Support Ukraine

Try it now Pricing
IoT Gateway
Community Edition Professional Edition Cloud Edge PE Edge IoT Gateway License Server Trendz Analytics Mobile Application PE Mobile Application MQTT Broker
Documentation > IoT Gateway features > Remote configuration
Getting Started
Installation
On this page

IoT Gateway Remote Configuration

This guide overviews all sub-dashboards of Gateway Dashboard for remote configuration.

For purpose of this guide, we will use following things:

  1. Locally installed instance of ThingsBoard platform (How to install you can read here).
  2. ThingsBoard IoT Gateway (How to install you can read here).

Resources (OPTIONAL):

  1. Gateway Dashboard
  2. Gateway Widget Bundle
doc warn icon

WARNING: If you've previously configured the gateway, create a backup, as the new remote configuration will overwrite existing settings files.
For those who used a gateway version earlier than 3.4, the gateway will automatically generate a new configuration file in JSON format.

Dashboard overview

Gateway List

This dashboard displays all your gateways and all the necessary details about them, namely:

  • Date and time of creation;
  • Name of the gateway;
  • Status (Active/Inactive);
  • Number of active connectors;
  • Gateway version.

And also navigation elements:

  • Docker command - when clicked, a modal window opens with a command to launch the gateway;
  • Gateway configuration - when clicked, a modal window with general gateway settings opens;
  • Connectors - when clicked, a page for managing and configuring connectors opens.

Also, on this page, you can create a new gateway, as well as sort them according to the parameters described above.

Gateway Dashboard

If you select a gateway and click on it, you will be transferred to the dashboard of the selected gateway.

The dashboard consists of 4 main widgets:

  • General gateway information, which consists of the following cards:
    • Status (Active/Inactive);
    • Name of the gateway;
    • Type of the gateway;
    • Devices (Active/Inactive);
    • Connectors (Active/Inactive) with link to Connectors dashboard;
    • Errors count with link to Logs dashboard.

  • Devices is a table that contains basic information about connected devices through the gateway:
    • Device Name;
    • Device Type;
    • Status (Active/Inactive);
    • Connector Name;
    • Connector Type;
    • As well as elements of filtering and searching for the necessary devices.

  • Alarms is a standard alarm widget where you will receive all alarms related to selected gateway;

  • Navigation Panel is a navigation panel on which all other dashboards for configuring, managing and monitoring the gateway are located, namely:
    • Launch command - a modal window with an auto-generated command for launching the gateway;

    • Logs - a dashboard with various types of logs (it should be noted that the button is active only when Remote Logging is enabled on the gateway);

    • Statistics - a dashboard with general and custom statistics of the gateway;

    • Remote Shell - dashboard with Remote Shell (it should be noted that the button is active only when Remote Shell is enabled on the gateway);

    • RPC - Gateway RPC sending dashboard.

General Configuration

If you click on the General Configuration button on the gateway dashboard in the Navigation Panel, you will be transferred to the dashboard general settings of the gateway.

The dashboard consists of the following tabs:

Doc info icon

For each field there are hints that appear when hovering over the “i” icon.

General - this tab contains the main settings, namely:

  • Remote Configuration - enables remote configuration and management of the gateway;
  • Remote Shell - enables remote control of the operating system with the gateway from the Remote Shell widget;
  • ThingsBoard host - hostname or IP address of ThingsBoard server;
  • ThingsBoard port - port of MQTT service on ThingsBoard server;
  • Security type (you can read more about them here) - currently 3 types of security are supported for remote configuration:
    • Access Token;
    • TLS + Access Token;
    • Username and Password;
    • TLS + Private Key (unsupported yet).

Logs - a tab for setting local and remote logs, which consists of 3 main sections:

  • General log settings - the usual settings for the Python logging module are used here:
    • Date format - date format of log message;
    • Log format - log message format.
  • Remote logging - to configure remote logs:
    • Remote logs - enables remote logging and logs reading from the gateway;
    • Log level.
  • Local logging - for configuring local loggers (Service, Connector, Converter, TB Connection, Storage, Extension):
    • Log level;
    • File path;
    • Log saving period;
    • Backup count - if Backup count is > 0, when a rollover is done, no more than Backup count files are kept - the oldest ones are deleted.

Storage - provides configuration for saving incoming data before it is sent to the platform:

  • Memory storage - saved data to the RAM memory;
  • File storage - saving received data to the hard drive;
  • SQLITE - saved data to the .db file.

GRPC - provides GRPC configuration:

  • Server port - network port on which the GRPC server will listen for incoming connections;
  • Keep alive permit without calls - allow server to keep the GRPC connection alive even when there are no active RPC calls;
  • Keep alive - duration (in milliseconds) between two successive keepalive ping messages when there is no active RPC call;
  • Max pings without data - maximum number of keepalive ping messages that the server can send without receiving any data before it considers the connection dead;
  • Keep alive timeout - maximum time (in milliseconds) the server should wait for a keepalive ping response before considering the connection dead;
  • Min time between pings - minimum amount of time (in milliseconds) the server should wait between sending keepalive ping messages;
  • Min ping interval without data - minimum amount of time (in milliseconds) the server should wait between sending keepalive ping messages when there is no data being sent or received.

Statistics - in this tab you can configure general statistics, as well as custom statistics:

  • Statistics - enable/disable;
  • Statistic send period - period of time for sending statistics;
  • Commands - commands for collecting additional statistics (to add a new command, press the “Add command” button):
    • Attribute name - gateway telemetry key name;
    • Timeout - timeout for command execution;
    • Command - the result of the command will be used as the value of the client attribute (for example “/bin/sh -c ipconfig getifaddr en0”).

Other - in this tab, you can configure additional gateway parameters:

  • Checking device activity - enables monitoring the activity of each connected device:
    • Inactivity timeout - device inactivity time after which the gateway will disconnect the device;
    • Inactivity check period - periodicity of device activity check.
  • Advanced - configure the following parameters only if you know what you are doing:
    • Min pack send delay - delay between sending packets (Decreasing this setting results in increased CPU usage);
    • QoS - quality of Service in MQTT messaging (0 - at most once, 1 - at least once);
    • Check connectors’ configuration - the period of time when the configuration of the connectors will be checked for a change.

Connector Configuration

If you click on the Connectors configuration button on the gateway dashboard in the Navigation Panel, you will be transferred to the Connectors configuration dashboard.

The dashboard consists of two main sections:

  • Connectors list - basic information and control elements of all created connectors are displayed here:
    • Enabled - enable or disable the connector;
    • Name of connector;
    • Type of connector;
    • Configuration status - displays whether the remote configuration is synchronized with the local configuration;
    • Status of the connector - if it is “green” - there are no errors, and the connector is working correctly. If it is “red” - the connector is not working correctly;
    • Actions:
  • Connector configuration - fields for configuring the connector are displayed here, namely:
    • Name of the connector;
    • Type of connector;
    • Logging level;
    • Configuration.

Logs

Doc info icon

It should be noted that the Logs dashboard is active only when Remote Logging is enabled on the gateway.

If you click on the Logs button on the gateway dashboard in the Navigation Panel, you will be transferred to the Logs dashboard.

The dashboard displays the main gateway log information in real time (General, Service, Connection, Storage, Extension):

  • Created time;
  • Status;
  • Message.

Statistics

If you click on the Statistics button on the gateway dashboard in the Navigation Panel, you will be transferred to the Statistics dashboard.

The dashboard consists of two widgets:

  • Gateway General Chart Statistics - general statistics metrics are displayed here, namely:
    • Sent To Device - total amount of data sent from the gateway to devices;
    • Send To ThingsBoard - the total amount of data sent from the gateway to ThingsBoard;
    • Received From ThingsBoard - total amount of data received from RPC and Attribute Updates;
    • Converted From Devices - the total number of converted data on the gateway;
    • Events Produced - the number of events received from ThingsBoard;
    • Events Sent - total number of events sent to ThingsBoard;
    • Received From Devices - total amount of data received from devices.
  • Gateway Custom Statistics - custom statistics are displayed here, you can select a single metric using select. Also, the far right widget will change its type depending on the type of data (if integer/float data is a graph, the other type is a table).

Remote Shell

Doc info icon

It should be noted that the Remote Shell dashboard is active only when Remote Shell is enabled on the gateway.

If you click on the Remote Shell button on the gateway dashboard in the Navigation Panel, you will be transferred to the Remote Shell dashboard.

The dashboard allows control of the operating system with the gateway from the Remote Shell widget.

RPC

If you click on the RPC button on the gateway dashboard in the Navigation Panel, you will be transferred to the Gateway RPC sending dashboard.

The dashboard consists of 3 widgets:

  • Service RPC - for sending RPC and viewing the result of command execution:
    • Command - service gateway RPC (Ping, Stats, Devices, Update, Version, Restart, Reboot);
    • Timeout - command execution time;
    • Result - the result of executing the sent command.
  • RPS Logs - displays gateway logs when processing the sent RPC;
  • RPC debug terminal - widget for debugging gateway RPC.

Next steps

Explore guides related to main ThingsBoard features: