v3.25.2

Getting Started Devices Gateways The Things Stack Integrations Reference
Get The Things Stack

The Things Stack

    Overview
  • Basic Concepts
  • The Things Stack Cloud
  • Host The Things Stack
  • Interact with The Things Stack
  • Manage The Things Stack
  • Migrate to The Things Stack
    • Migrating End Devices between The Things Stack distributions
    • Migration Tool
    • Migrating End Devices from V2
    • Import End Devices in The Things Stack
    • Fine-tuning MAC Settings for End Devices
    • Migrating Gateways
    • JSON File Reference
    • CSV File Reference
    • Migration FAQ
  • Packet Broker
  • Troubleshooting

Import End Devices in The Things Stack

To import end devices, you need access to an application in The Things Stack. If you have not created one previously, see the Adding Applications guide for detailed instructions.

There are two ways to import devices in The Things Stack - using Console or CLI.

The Things Stack supports importing end devices in JSON and CSV format:

  • To import devices that are in a JSON file (for example, the one you created by following Migrating End Devices from V2 or Exporting Devices from ChirpStack), use The Things Stack JSON format (identified by the-things-stack). The JSON format data format is documented in the JSON File Reference.
  • To import devices that are in a CSV file, use the The Things Stack CSV (identified by the-things-stack-csv). The CSV data format is documented in the CSV File Reference, including a handy Excel template.
  • Console
  • CLI

Import devices via the Console

Open your application and click the button Import end devices

import devices

Select the File format and upload the file (e.g. devices.json or devices.csv).

You can specify Fallback values for Frequency plan and LoRaWAN® and Regional Parameters version, in case the import file does not specify these settings for the device.

You can also expand the Advanced claiming and component settings to set targeted components, and set the claim authentication code to be generated.

Start the import by clicking the Import end devices button.

upload devices.json file

Wait for the end devices to be successfully imported. In case any device fails, you will see a relevant error message in the console.

import finished

If the import was successful, your devices are added to the list of end devices in your application.

Import devices via the CLI

To complete these steps, you need the have the latest version of ttn-lw-cli installed on your system.

Command-line interface only

The instructions below use the command-line interface (CLI).

Learn how to install the CLI

To import a file in The Things Stack, run the following command with ttn-lw-cli:

# JSON format
ttn-lw-cli end-devices create --application-id <application-id> < devices.json
# CSV format
ttn-lw-cli end-devices template from-data --local-file devices.csv --format-id the-things-stack-csv \
  | ttn-lw-cli end-devices template execute \
  | ttn-lw-cli end-devices create --application-id <application-id>

This will import your devices in The Things Stack. In case any device import fails, you will see a relevant error message at the end of the output.

If the import was successful, you will see your devices added to the list of end devices in your application.

successful-import

Your devices are now registered on The Things Stack.

Keep in mind that you still might need to initiate a new join on The Things Stack network! See Migrating End Devices from V2 for detailed info on how to complete the migration of your devices.

← Migrating End Devices from V2 Fine-tuning MAC Settings for End Devices →

On this page

  • Import devices via the Console
  • Import devices via the CLI

The Things Stack

Getting Started

Devices

Gateways

The Things Stack

Integrations

Reference

Contributing

GitHub

Forum

About Us

The Things Network

The Things Industries

About this page

Last changed by Darya Plotnytska on 25 May 2023.
Add TTUI and update hugo (#1113)

Edit on Github