Updated on 2023-11-10 GMT+08:00

Importing and Exporting Devices

Overview

ROMA Connect supports device import and export. You can export device as a file to the local host or import a local product file to ROMA Connect to migrate device information in batches.

Prerequisites

  • Before importing a device, ensure that the integration application to which the device belongs has been created. Otherwise, create the integration application in advance.
  • Before importing a device, ensure that the product to which the device belongs has been created. Otherwise, create the product in advance.
  • Before importing a device, check whether a duplicate device name exists in the instance to which the device is to be imported. If there are duplicate device names, the device will fail to be imported.
  • Ensure that the quota of devices meets the requirements before importing the devices.
  • The files to be imported must be in CSV format and have been encoded using UTF-8 BOM.
  • When you use an exported file to import devices:
    • Create an import file and add the information about the new devices to the file.

      Do not change the name and sequence of table headers in the template. For details about the table header names, see Description of Device Import Files.

    • Open the import file and check whether any field value starting with Base64: exists. If there is no field value starting with Base64:, the file is exported from the instance of an earlier version.

      In this case, rename the file by adding -none-base64-prefix to the end of the file name. For example, if the original file name is import.csv, change it to import-none-base64-prefix.csv.

  • If you use Excel to edit the file to be imported, perform the following operations to save the file:
    1. Save the Excel file as a CSV file by selecting Comma Delimited files (*.csv).
    2. Use a text editor to open the CSV file saved in 1. Save the file in UTF-8 with BOM.

Importing Devices

  1. Log in to the ROMA Connect console. On the Instances page, click View Console of an instance.
  2. In the navigation pane on the left, choose LINK > Device Management. On the Devices tab page, click Import Device.
  3. In the dialog box displayed, select a local device file and import it.
  4. After the import is successful, you can view the imported devices in the device list.

Exporting Devices

  1. Log in to the ROMA Connect console. On the Instances page, click View Console of an instance.
  2. In the navigation pane on the left, choose LINK > Device Management.
  3. Export devices.
    • Exporting specified products: Select the devices to be exported and click Export to export the device file to the local PC.
    • Exporting all devices: Click Export All to export all the devices to the local PC.

Description of Device Import Files

Table 1 describes the requirements of a device import file.
Table 1 Device import file requirements

Column

Description

Remarks

DeviceName

Device name.

Mandatory. The complexity requirements are the same as those for device creation on the console.

ProductSerial

SN of the product to which the device belongs.

Mandatory. The product SN should already exist.

ParentDeviceClient

Client ID of the gateway device to which a device belongs.

Optional. The gateway device should already exist.

ClientID

Client ID.

Optional.

DeviceIdentifier

Device ID.

Mandatory. The complexity requirements are the same as those for device creation on the console.

Username

Username.

Optional.

Password

Password.

Optional. The complexity requirements are the same as those for device creation on the console.

DeviceType

Device type.

Mandatory. The value depends on the protocol type of the product:

  • MQTT: COMMON
  • Modbus: MODBUS
  • OPC UA: OPCUA

Remark

Device description.

Optional.

customTopic

Custom topic.

Optional. You are advised to create custom topics on the console.

  • The topic format of publish permissions is product_ID/out/device_ID/topic_name.
  • The topic format of subscribe permissions is product_ID/in/device_ID/topic_name.

Separate two topics with a comma (,).

Enable

Device status.

Mandatory. The options are 0 (enabled) and 1 (disabled).