Interacting with Azure Edge Devices through ThingWorx > Importing Device Information from an Azure IoT Hub
Importing Device Information from an Azure IoT Hub
A ThingWorx Azure IoT Hub Connector supports a single Azure IoT Hub. During its first startup the Connector installs the Connection Services Extension and AzureIotHubAdapter Extension on ThingWorx Platform. The Connection Services Extension provides the ConnectionServicesHub Thing. The AzureIotHubAdapter Extension provides the Thing Templates for Azure IoT Things and the ImportAzureIotDevices service of the ConnectionServicesHub Thing.
* 
Before importing a group of devices, test the import process with a single device.
To set up and import device information from an Azure IoT Hub, follow these steps
1. Using ThingWorx Composer, make sure that you have specified an Azure Blob Thing as the deviceExportBlobThing property in your AzureIotHub Thing. If the deviceExportBlobThing is not configured, the Connector fails to initialize and writes an error message that states the configuration is invalid.
2. In addition, if you are importing a large number of devices, set the deviceExportReadBlockSize to 10000 at a minimum.
3. Navigate to the Thing that represents the Connection Services Hub in ThingWorx Composer.
4. In the Services page for the ConnectionServicesHub Thing, invoke the ImportAzureIotDevices service.
5. When prompted, supply the following information to the service:
A base Thing Template such as the AzureIotThing Thing Template or a Thing Template derived from it.
A list of Thing Shapes that will be applied to the newly created Things.
A device-name pattern.
The pattern supports the * character (asterisk) for globbing. Note that you can use multiple wildcard characters in the pattern.
6. When the process has finished, the ConnectionServicesHub:AzureThingImportStatusEvent is fired from your AzureIotHub Thing. The event provides the status of the import and lists any failures and name conflicts (not persistent). To view this information, create a Thing that subscribes to this event.