Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Start the Azure IoT Hub Connector with the appropriate command for your operating system.
NOTE: On Windows you may have to shorten the installation directory name or move the bin directory closer to the root directory of your system to prevent exceeding the Windows limit on the classpath length.
With the ThingWorx Azure IoT Connector, you can import into ThingWorx any existing devices that are currently provisioned to the Azure IoT Hub.
If you have not provisioned any devices to your Azure IoT Hub you can learn more about Azure IoT Hub device identity before following the steps below to create a test device.
We will manually execute a service in ThingWorx that will import Azure IoT Hub devices into ThingWorx.
In ThingWorx Composer, navigate to the ConnectionServicesHub Thing.
Click Services tab and scroll to the ImportAzureIotDevices service and click the execute Arrow.
NOTE: The * in the pattern field will act as a wildcard and import all devices, you can enter a string to match that will only import a subset of all available devices.
The ThingWorx Azure IoT Connector download includes a Java application that simulates a device connecting to your Azure IoT Hub. A ThingTemplate is also included and can be imported into ThingWorx.
In ThingWorx Composer, click Import/Export menu, then click From File and browse to ../demo/edgedevice- demo/platform/entities/CPUDemo_AllEntities.xml
Below is an example configuration:
// Azure Edge Device Demo configuration azure-edge-device { // Name of the remote thing on the ThingWorx platform, which should match the Azure Device ID deviceId = "alstestedgething" // Name of the hub host in Azure iotHubHostname = "alsiot.azure-devices.net" // Policy name used by this thing (could require services as well in future) registryPolicyName = "registryReadWrite" // The Key related to the policy above registryPolicyKey = "pzXAi2nonYWsr3R7KVX9WuzV/1234567NZVTuScl/Kg=" }
NOTE: If the edgedevice-demo is running on Windows, the Load Average does not register.
Congratulations! You've successfully completed the Connect Azure IoT Hub to ThingWorx Quickstart. By following the steps in this lesson, you imported a device created in Azure into ThingWorx and saw how data from an Azure device could be used in a ThingWorx Mashup.
We recommend the following resources to continue your learning experience:
Capability | Guide |
Connect | Choose a Connectivity Method |
Build | Design Your Data Model |
Experience | Create Your Application UI |
If you have questions, issues, or need additional information, refer to:
Resource | Link |
Community | Developer Community Forum |
Support | Getting Started with ThingWorx |