Integration with AZURE IoT HUB using the Advantco MQTT adapter
The Azure Internet of Things (IoT) is a collection of Microsoft-managed cloud services that connect, monitor, and control billions of IoT assets. In simpler terms, an IoT solution is made up of one or more IoT devices that communicate with one or more back-end services hosted in the cloud.
(source Azure IoT Hub)
This blog guides you through the configuration steps to connect your SAP PI/PO or SAP Cloud Platform Integration to Azure IoT Hub using the Advantco MQTT adapter.
2. Configure on Azure IoT Hub
2.1 Create an IoT hub
Sign in to the Azure portal
Click New -> Internet of Things -> Azure IoT Hub.
Provide the configuration parameters of IoT hub and click Create
Status of deployment is shown below:
After successfully creation, the configuration looks as below:
2.2 Obtain IoT Hub Connection String
On the IoT Hub setting page, select Shared access polices -> iothubowner policy -> make a note of the connection string.
2.3 Create a Device Identity
We use Device Explorer tool to create device, to download this tool, open the link: https://github.com/Azure/azure-iot-sdks/releases and select the download link as below image:
For more details on how to use this tool, refer to the link
2.4 Obtain the Azure IoT Certificate
Go to the Azure IoT portal and click on the lock icon and then click details
Click in view certificate
Export certificate to file:
3. Configure MQTT Adapter on SAP PI/PO
3.1. Create Keystore View
Create new Key store view (Example: AZURE-I0T) and import the downloaded cert above file to this view.
3.2 Configuration of sender MQTT channel
3.3 Configuration of receiver MQTT channel
4. Configure the MQTT Adapter on the SAP Cloud Platform Integration
4.1 Import certificate file to Keystore
Go to Manage Keystore > Add > Certificate
4.2 Configuration of sender MQTT channel
4.3 Configuration of receiver MQTT channel
5. Sample scenarios in SAP Cloud Platform Integration
5.1 RabbitMQ to Azure IoT Hub
We use Device Explorer tool to monitor the messages on the device
Open Device Explorer tool -> select Data tab -> select Device Id -> click Monitor Button
Publish an message to hci_azure_iot_hub_snd queue on RabbitMQ -> we will see the content message on the Device explorer tool as below image.
5.2 Azure IoT Hub to RabbitMQ
We use device explorer tool to send an message to the Azure IoT Hub
Open Device Explorer tool -> select Mesasge to Device tab -> select Device Id -> input the message content -> click Send button
Result in RabbitMQ:
6. ConclusionThe Advantco MQTT adapter is available for both SAP PI/PO and SAP Cloud Platform Integration. It is an ideal solution when connecting to Azure IoT Hub.
Minimal effort to install, configure and usage of the MQTT adapter.
Maintain and supported by team with profound knowledge of SAP PI/PO and CPI adapters developments.
Please reach out to our sales team at firstname.lastname@example.org if you have any questions.