Skip to end of metadata
Go to start of metadata

Azure Integration enables LoopEdge to publish data directly to the Microsoft Azure cloud. The following sections describe LoopEdge integration with the Azure IoT Hub.

Configure the Azure IoT Hub

This section goes over creating an Azure IoT Hub, Adding Devices to Azure, and finding required connection parameters for LoopEdge connectivity.

Create an IoT Hub

  1. Navigate to . Log in with your Azure account, or create a new account.
  2. Click Create a Resource, then search for Iot Hub in the search bar.

  3. Click Iot Hub, then click Create.

  4. Select your Subscription, Azure Resource Group, Region, and IoT Hub Name.

  5. Choose the Pricing and Scale of your IoT hub depending on the number of connected devices to host on Azure and send messages to from LoopEdge.

  6. Click Review + Create to finalize creating the IoT Hub and begin adding devices to it.

Add an IoT Device

  1. From the Azure portal, open the Command-Line-Interface (CLI)

  2. In the Azure CLI, type the following two commands:

    az extension add --name azure-cli-iot-ext
    az iot hub device-identity create --hub-name YourIoTHubName --device-id MyNodeDevice

    Make sure to replace YourIoTHubName with the name of your IoT Hub and to replace MyNodeDevice with the name that you want to have for your device.

  3. Click your IoT Hub from the Azure Portal, then click IoT devices from the left-hand-side to check that you successfully added the new device.

Note Connection Details

  1. From the Azure IoT Hub, click Iot devices from the panel on the left-hand-side.

  2. From the list, click the Azure device listing to send messages to from LoopEdge.

  3. Note the connection details to configure an Azure connector in LoopEdge.

Configure the LoopEdge Azure Connector

  1. From the LoopEdge navigation panel, click Integration.
  2. Click to add a new connector.
  3. Select MQTT - Azure IoT Hub over SSL as the Provider.
  4. Configure each field for the connector. Refer to the descriptions below for details:

    Field Descriptions

    Name: Choose a name for the Azure connector that will be easy to remember and recognize.

    Hostname: The HostName portion of the Azure Connection string. It should be in the following format:

    Port:The MQTT port number for the Azure IoT Hub. It will be 8883 in nearly all cases.

    CA Certificate: The CA certificate that you can configured on the Azure IoT Hub.

    Device ID:The ID from the IoT Devices list and the connection string.

    authMethod: LoopEdge currently supports SaS authentication with Azure.

    Key: The shared access key portion from the Azure device Connection string (primary key).

    Integration Topic: Replace {deviceId} with the device ID from Azure.

  5. Click OK to finish the configuration and enable the connector.
  6. Click the connector from LoopEdge, then click to start sending data to Azure from a LoopEdge topic.
  7. Copy and paste the raw or IPSO topic in LoopEdge, then check Enable to begin sending data to the Azure cloud.

Read Outbound Device-to-Cloud Messages

This section covers the simplest way of ensuring connectivity to the Azure cloud by reading device-to-cloud messages sent from LoopEdge.

  1. Download Visual Studio Code from:
  2. From Visual Studio Code, install the IoT Hub Toolkit:

  3. Connect your Azure account to the IoT Hub Toolkit when prompted.

  4. Select the IoT Hub of your choice from the More Actions... option.

  5. From the same menu, click Star Monitoring D2C to view messages being sent from LoopEdge devices to the Azure cloud.

Read Inbound Cloud-to-Device Messages

This section covers the simplest way to send and view inbound messages from Azure to LoopEdge.

  1. Edit an existing Integration for the Azure connector, or create a new one.
  2. In the Integration Topic field, enter the following topic to enable Inbound connectivity from Azure to LoopEdge:


    deviceid should be your Azure device id on the Azure IoT Hub

  3. Click the Azure Connector, and add an integration topic for Inbound connectivity. Choose any name, and make sure to enable the Topic.

  4. Copy the Inbound topic.
  5. Open Flows. Add a Datahub node and a Debug node to the canvas.
  6. Paste the Inbound topic into the Datahub node. Make sure to connect the nodes, and Save the flow.
  7. Click the IoT device for LoopEdge on the Azure IoT Hub. Click Message to Device.

  8. Type a message of your choosing into the Message Body, click Send Message.

  9. View the message in the Flow that you set up in an earlier step:

Further Information

For more information on setting up an Azure IoT hub, see the quick start guide from the Microsoft Azure website:
  • No labels