Changes for page Notes for TTN

Last modified by Xiaoling on 2025/08/04 14:58

From version 201.1
edited by Edwin Chen
on 2023/03/15 16:07
Change comment: There is no comment for this version
To version 203.1
edited by Bei Jinggeng
on 2023/03/16 11:28
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.Edwin
1 +XWiki.Bei
Content
... ... @@ -807,4 +807,102 @@
807 807  
808 808  **For TTS in LPS8v2**
809 809  
810 -
810 +Open your application and click the button **Import end devices**
811 +
812 +[[image:https://www.thethingsindustries.com/docs/getting-started/migrating/import-end-devices.png||alt="import devices" height="517" width="828"]]
813 +
814 +Select the **File format** and upload the file (e.g. or ).devices/jsondevices.csv
815 +
816 +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.
817 +
818 +You can also expand the **Advanced claiming and component settings** to set targeted components, and set the claim authentication code to be generated.
819 +
820 +Start the import by clicking the **Import end devices** button.
821 +
822 +[[image:https://www.thethingsindustries.com/docs/getting-started/migrating/upload-file.png||alt="upload devices.json file" height="536" width="858"]]
823 +
824 +Wait for the end devices to be successfully imported. In case any device fails, you will see a relevant error message in the console.
825 +
826 +[[image:https://www.thethingsindustries.com/docs/getting-started/migrating/operation-finished.png||alt="import finished" height="551" width="882"]]
827 +
828 +If the import was successful, your devices are added to the list of end devices in your application.
829 +
830 +[[image:https://www.thethingsindustries.com/docs/getting-started/migrating/successful-import.png||alt="successful-import" height="556" width="889"]]
831 +
832 +Devices are now registered on The Things Stack.
833 +
834 +=== JSON File Reference ===
835 +
836 +The Things Stack allows you to import end devices from V2, ChirpStack and other LoRaWAN networks using a JSON file describing those devices.
837 +
838 +Using JSON file with device descriptions, you can migrate end devices with or without their existing sessions.
839 +
840 +Here is an example of an OTAA device description in the file:devices.json
841 +
842 +{{{{
843 + "ids": {
844 + "device_id": "my-device",
845 + "dev_eui": "0102030405060708",
846 + "join_eui": "0102030405060708"
847 + },
848 + "name": "My Device",
849 + "description": "Living room temperature sensor",
850 + "lorawan_version": "MAC_V1_0_2",
851 + "lorawan_phy_version": "PHY_V1_0_2_REV_B",
852 + "frequency_plan_id": "EU_863_870_TTN",
853 + "supports_join": true,
854 + "root_keys": {
855 + "app_key": {
856 + "key": "01020304050607080102030405060708"
857 + }
858 + }
859 +}
860 +}}}
861 +
862 +Multiple end devices can also be contained in a single file like so:devices.json
863 +
864 +{{{{
865 + /* device 1 */
866 +}
867 +{
868 + /* device 2 */
869 +}
870 +}}}
871 +
872 +The format above is considered by the Console and CLI as a JSON stream, processing one object at a time. For more details in how to use the file
873 +
874 +
875 +=== CSV File Reference ===
876 +
877 +The Things Stack has support for importing end devices from CSV (comma-separated values) files. This is useful when batches of end devices are managed in Microsoft Excel or any other spreadsheet or database that can export to CSV file.
878 +
879 +The CSV import in The Things Stack uses the following settings:
880 +
881 +* Semicolon () as field delimiter. This makes working with Microsoft Excel and other spreadsheets convenient;
882 +* Header row is required
883 +* On each row, the same number of fields as on the header line
884 +* Use quotes to use in a field value;
885 +* Use double quotes to escape quotes
886 +* Unknown header columns are permitted and ignored
887 +
888 +== Example ==
889 +
890 +Minimal example:
891 +
892 +{{{dev_eui;join_eui;frequency_plan_id;lorawan_version;lorawan_phy_version;app_key
893 +1111111111111111;1111111111111111;EU_863_870_TTN;MAC_V1_0_4;RP002_V1_0_3;11111111111111111111111111111111
894 +2222222222222222;2222222222222222;EU_863_870_TTN;MAC_V1_0_4;RP002_V1_0_3;22222222222222222222222222222222
895 +3333333333333333;3333333333333333;EU_863_870_TTN;MAC_V1_0_4;RP002_V1_0_3;33333333333333333333333333333333
896 +}}}
897 +
898 +All columns for a LoRaWAN 1.0.4 device:
899 +
900 +{{{id;dev_eui;join_eui;name;frequency_plan_id;lorawan_version;lorawan_phy_version;brand_id;model_id;hardware_version;firmware_version;band_id;app_key
901 +test-one;1111111111111111;1111111111111111;Device 1;EU_863_870_TTN;MAC_V1_0_4;RP002_V1_0_3;the-things-industries;generic-node-sensor-edition;1.0.4;1.0;EU_863_870;11111111111111111111111111111111
902 +test-two;2222222222222222;2222222222222222;Device 2;EU_863_870_TTN;MAC_V1_0_4;RP002_V1_0_3;the-things-industries;generic-node-sensor-edition;1.0.4;1.0;EU_863_870;22222222222222222222222222222222
903 +test-three;3333333333333333;3333333333333333;Device 3;EU_863_870_TTN;MAC_V1_0_4;RP002_V1_0_3;the-things-industries;generic-node-sensor-edition;1.0.4;1.0;EU_863_870;33333333333333333333333333333333
904 +}}}
905 +
906 +== Excel Template ==
907 +
908 +[[Download the Excel template>>url:https://www.thethingsindustries.com/docs/getting-started/migrating/tts-end-devices-csv-template.xlsx]]. You can remove all columns that are not required (see above).