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 > Gateway Shell
Getting Started
Installation
On this page

How to use Gateway Shell

This guide explains how to use Gateway Shell and provide examples of how to use each command defined in Gateway Shell. The Gateway Shell feature allows users to interact with a gateway through a command-line interface. By using the provided commands and corresponding arguments, users can execute specific actions and retrieve information from the Gateway. Refer to the usage examples outlined in this guide to effectively utilize the Gateway Shell feature.

For the purpose of this tutorial, you need:

  1. Locally installed instance of ThingsBoard platform (In case you are new with ThingsBoard use this ‘how to install’ documentation).
  2. Installed and configured ThingsBoard IoT Gateway.

Storage Command

The storage command provides functionality related to storage operations.

Get Storage Name

To retrieve the storage name, use the following command:

1
$ tb-gateway-shell storage -n

Get Storage Events Count

To obtain the count of storage events, use the following command:

1
$ tb-gateway-shell storage -c

Connector Command

The connector command enables actions related to connectors.

Get Available Connectors

To list the available connectors, use the following command:

1
$ tb-gateway-shell connector -l

Get Connector Status

To retrieve the status of a specific connector, provide the connector name as follows:

1
$ tb-gateway-shell connector -s <name>

Get Connector Config

To obtain the configuration of a specific connector, provide the connector name as follows:

1
$ tb-gateway-shell connector -c <name>

Gateway Command

The gateway command allows operations related to the gateway itself.

Get Gateway Status

To retrieve the status of the gateway, use the following command:

1
$ tb-gateway-shell gateway -s

Next steps

Explore guides related to main ThingsBoard features: