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
      • Export Devices from The Things Stack
      • Export End Devices from ChirpStack
    • 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
  • Works with The Things Stack
  • Troubleshooting

Export End Devices from ChirpStack

This section contains instructions on how to configure migration tool and use it to export end devices from ChirpStack, that can later be imported in The Things Stack. This is a base for migrating end devices from ChirpStack to The Things Stack.

Configuration

First, configure the environment with the following variables modified according to your setup. Navigate to the folder where you installed ttn-lw-migrate and execute:

export CHIRPSTACK_API_URL="localhost:8080"    # ChirpStack Application Server URL
export CHIRPSTACK_API_TOKEN="7F0as987e61..."  # ChirpStack API key
export JOIN_EUI="0101010102020203"            # Set The Things Stack JoinEUI for exported devices
export FREQUENCY_PLAN_ID="EU_863_870"         # Set The Things Stack FrequencyPlanID for exported devices
export CHIRPSTACK_API_INSECURE=0              # Set to 1 if not using TLS on ChirpStack

If using Windows OS, replace export with set and remove the double-quotes in commands above. For example, you would use:

set CHIRPSTACK_API_TOKEN=7F0as987e61...

JoinEUI and FrequencyPlanID have to be set because ChirpStack does not store these variables. See Frequency Plans for a full list of frequency plans supported by The Things Stack (and their IDs).

You can now proceed to exporting devices or applications.

Export Devices and Applications

  • Export devices
  • Export applications

To export a single end device to a devices.json file based on their DevEUI:

ttn-lw-migrate --source chirpstack device "0102030405060701" > devices.json

To export multiple end devices, create a devices.txt file containing one DevEUI per line:

0102030405060701
0102030405060702
0102030405060703
0102030405060704
0102030405060705
0102030405060706

To export multiple end devices to a devices.json file:

ttn-lw-migrate --source chirpstack device < devices.txt > devices.json

To export end devices from a single application using its name (from ChirpStack):

ttn-lw-migrate --source chirpstack application "app1" > applications.json

To export end devices from multiple applications to an applications.json file, you need to create a .txt file containing one application name per line and run the following command in your terminal:

ttn-lw-migrate --source chirpstack application < applications.txt > applications.json
Warning:
ABP end devices without an active session can be exported from ChirpStack, but cannot be imported in The Things Stack.

Please note that MaxEIRP parameter may not be always set properly, and that the ChirpStack variables parameter related to payload formatting will always be converted to null when the end device is imported to The Things Stack.


After exporting, devices and applications can be imported in The Things Stack. See Import End Devices in The Things Stack for details about importing devices.

← Export Devices from The Things Stack Migrating End Devices from V2 →

On this page

  • Configuration
  • Export Devices and Applications

The Things Stack

Getting Started

Devices

Gateways

The Things Stack

Integrations

Reference

Contributing

GitHub

About Us

The Things Industries