locked
Azure IoT Hub Integration RRS feed

  • Question

  • Hi everybody,

    I'd like connect an industrial PC, Advantech ARK Series, to Azure IoT hub via MQTT. I've read about this issue but it seems the only way is to use an external broker becuase of the lack in IoT Hub. However I've seen an article 

    OPC Router. Azure IoT Hub MQTT Connection

    where is explained how to connect to the broker but it doesn't specify if the broker is Azure IoT Hub.

    My goal is to connect ARK hardware in a PV plant with Azure IoT Hub. I thought it'd be easier but it seems that IoT 
    Hub has some issues about acting like MQTT broker server.

    Please, can anybody help about this connection?

    Thanks in advance


    Tuesday, February 25, 2020 10:58 AM

All replies

  • Hi Javiernl96,

    IoT Hub is not a full featured MQTT broker nor does is support all the features of MQTT v.3.1.1 standard but you can connect to an IoT Hub with MQTT, either by running an SDK, or directly. Please review the following document if you haven't already. 

    Communicate with your IoT hub using the MQTT protocol

    Is there a specific issue or scenario that is the area of contention?

    ~Mike

    Wednesday, February 26, 2020 4:46 AM
  • Hi Mike,

    thanks for your reply. In my Industrial PC, I have WebAccess MQTT software (Publisher). I want to connect this device with IoT Hub ( and then, Stream Analytics and Power BI) but I don't know how, I don´t know if an external MQTT broker is necesary (like Mosquitto). I don´t know what is the best solution.

    I need help about a possible solution and architecture.

    Sorry but I can´t attached any images because my account is not verified. 

    Thanks.

    Wednesday, February 26, 2020 9:25 AM
  • I am working with the product group to see about this integration. I found this SDK (https://github.com/Advantech-WebAccess/MQTT-SDK-for-CSharp) but not sure if this can used in this scenario. Does the WebAccess client have a configuration where connection properties can be set? What are these connection properties...can you detail these? 

    An IoT Hub has the following as a connection string:

    HostName={YourIoTHubName}.azure-devices.net;DeviceId=MyDotnetDevice;SharedAccessKey={YourSharedAccessKey}

    These properties can be sourced from the Azure Portal for you specific IoT Hub deployment. I am insure what specific connection properties the WebAccess MQTT client requires?

    I do not think the integration would be direct, as there is a Service SDK and a Device SDK, where IoT Hub would require running the Service SDK. The industrial PC would run the Device SDK.

    Let me get back with you on this.

    Regards,

    Mike

    Friday, February 28, 2020 6:00 AM
  • Hi Javier,

    I spoke with our IoT Hub team and have the following information to share but, I do have a question with regard to the WebAccess MQTT software component. Is this a requirement for you solution? If you deploy the Azure IoT SDK to the industrial PC, you will be able to connect with an IoT Hub without the need for the WebAccess client. We have sample sample projects you could take a look at. It looks like the WebAccess client is an OEM client so, not sure if you have the ability to install the IoT SDK client but by doing so, you will have the ability to connect with the IoT Hub natively. We do have an Azure IoT Hub developer guide that will prove useful. All you need is a Device SDK to connect with IoT Hub.

    Once that part of the integration has been completed, you can then connect with Azure Stream Analytics and leverage PowerBI for reporting and dashboards, etc.

    Create a Stream Analytics job to power real-time dashboarding experience

    Please let me know if you have any additional questions.

    Regards,

    Mike


    Saturday, February 29, 2020 12:46 AM
  • Hi Mike,

    WebAccess is not mandatory but then:

    - Azure IoT SDK  Scenario

    how do I handle the information that this software serves to send it through the Azure IoT SDK? That is, if the information is provided by this software, how do I configure the Azure IoT SDK to choose the information I want to send to the cloud and how does this SDK connect with the WebAccess SCADA software in the Industrial PC?

    Is MQTT broker mandatory in this scenario ?

    - Direct Scenario

    Is it not possible to install an MQTT broker in IoT Hub?

    On the other hand, if the connection is through Device SDK WebAccess and the Service SDK on IoT Hub, isn't an MQTT Broker necessary? (Attached image with the Publicher conf of the MQTT Broker)

    Thanks in advance

    Monday, March 2, 2020 8:01 AM
  • It is possible that the WebAccess MQTT Broker/Driver can connect directly to the IoT Hub: Using the MQTT protocol directly (as a device). The IoT Hub already has an MQTT broker...or it has a partial broker that will allow use of the MQTT protocol to connect. 

    IoT Hub is not a full featured MQTT broker nor does is support all the features of MQTT v.3.1.1 standard but you can connect to an IoT Hub with MQTT, either by running an SDK, or directly.

    So, if the WebAccess MQTT Broker/Driver will not work, you can use the device SDKs. As you stated, how does telemetry data get streamed? May I ask how many and what type of sensors are connected to the industrial PC? In this scenario, I believe the industrial PC serves as the device with sensors being connected to it. Is that correct? Is the configuration detail in the screen capture (highlighted in red) taken from your IoT Hub, or is this some other platform in your environment? The "Using the MQTT protocol directly (as a service)" link I provided shows the configuration parameters that need to be configured for connectivity to the IoT Hub instance.

    To use an IoT Hub Device SDK, you will need to build something from scratch. The best option is to see about having the WebAccess MQTT Broker/Device connect to your IoT Hub instance. This will save you a bunch of time. I just don't have access to this OEM set-up to experiment and see if I can get it to work. 

    Regards,

    Mike

    Tuesday, March 3, 2020 2:13 AM
  • Thanks again Mike,

    Reply:

    As you stated, how does telemetry data get streamed?

    ARK is a data collector through Industrial protocols (modbus).

    May I ask how many and what type of sensors are connected to the industrial PC? 

    It is a Photovoltaic Plant. I want to collect every data and then send them to the cloud. 

     I believe the industrial PC serves as the device with sensors being connected to it. Is that correct? yes 

    Is the configuration detail in the screen capture (highlighted in red) taken from your IoT Hub, or is this some other platform in your environment? It is taken from an Advantech Cloud Platform.

    Ok, maybe in this point the best option would be test every possible solution. I thought this kind of integration was more common and documented. 

    Thanks. 

    Wednesday, March 4, 2020 12:28 PM