This section contains instructions on how to migrate end devices from ChirpStack to The Things Stack using
ttn-lw-migrate migration tool.
0.5.0or higher installed on your system.
Note:See the Migration Tool guide for detailed installation instructions.
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
set and remove the double-quotes in commands above. For example, you would use:
$ set CHIRPSTACK_API_TOKEN=7F0as987e61...
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).
Export End Devices
ttn-lw-migrate tool you can easily export a single or multiple end devices based on their DevEUI.
To export a single end device to a
$ 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
$ ttn-lw-migrate --source chirpstack device < devices.txt > devices.json
You can also export applications with
ttn-lw-migrate tool using their names from ChirpStack, which results in a JSON file containing descriptions of all the end devices contained by that application.
To export end devices from a single application:
$ 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
Note:ABP end devices without an active session can be exported from ChirpStack, but cannot be imported in The Things Stack.
MaxEIRPparameter may not be always set properly.
variablesparameter related to payload formatting will always be converted to
nullwhen the end device is imported to The Things Stack.