Getting Started Azure IoT Data Hub

Create an IoT hub

View the following video for a complete demonstration of how to send live data to Azure IoT Data Hub.

You need to create an IoT Hub for your device to connect to. The following steps show you how to complete this task using the Azure portal:

Step 1

Sign in to the Azure portal.

Step 2

From the left menu, click Create a resource, then click Internet of Things, and then click IoT Hub.

Step 3

On the Basic tab, enter your Project Details.

Step 4

In Resource Group, create a new resource group, or select an existing one. For more information, see Using resource groups to manage your Azure resources.

Step 5

In the IoT Hub Name field, enter a name for your hub. If the Name is valid and available, a green check mark appears in the Name box.

Step 6

When you have finished entering your IoT hub configuration options, click Review + Create at the bottom of the page.  On the next page, review your details and then click Create.

Step 7

A page will appear that says: Your deployment is underway.

It can take a few minutes for Azure to create your IoT hub. Be patient.

When it is done you will see a page that says:  Your deployment is complete.  Click the Go to resource button.

Step 8

The page you now see gives you an Overview of your new IoT Hub. On the top right side of the page, you will see the Hostname for your hub.  Copy this somewhere because you will need it later on in the tutorial to set up your OAS driver.

Step 9

Next click Shared access policies from the left menu.  In the pane that appears to the right, click iothubowner.

In the panel that appears to the right, select the Copy to clipboard icon next to Connection string – primary key.  Save this as well, you will need it later.

You have now created your IoT hub and you have the hostname and connection string you need to complete the rest of this tutorial.

Create an IoT Driver

Step 1

Open Configure UDI.

Step 2

Select Configure >> Drivers from the top menu.

Step 3

Select your Network Node, either local or remote.

Step 4

Enter the Driver Interface Name you wish to use.

Step 5

Select Azure IoT from the Driver combo box.

Step 6

Enter the Azure IoT Device ID you want to use.

Step 7

Enter the Connection String from Step 9 of the previous section into the Azure IoT Connection field.

Step 8

Enter the hostname from Step 8 of the previous section into the Azure IoT Hub URL field.

Step 9

Select the preferred Azure IoT Transport. Typically it is AMQP.

Step 10

Click Add Driver on the top left.

Route Live Data to your Azure IoT Hub.

Step 1

Select Configure >> Tags from the top menu.

Step 2

Select your Network Node, either local or remote.

Step 2

From the demo tags select the Ramp Tag.

Step 3

Select the Target tab.

Step 4

Enable Write to target.

Step 5

Select the Azure IoT in the Target Type dropdown.

Step 6

Select the Driver interface you created.

Step 7

Apply the Changes and you should now be writing to your IoT Hub.

Step 8

The message is formatted as follows.

{“deviceId”:”myFirstDevice”,”TagName”:”Ramp”,”Value”:66,”DataType”:”DoubleFloat”,”Quality”:true,”TimeStamp”:”2016-04-11T14:38:53.7125255″}

.