Send data from iot device to HMI through azure iot hub using mqtt protocol.

Konstantinos Krikelis 0 Reputation points
2023-05-22T14:03:07.64+00:00

Hello, I am trying to send data from an industrial router to a HMI (Scada) system. So far, I am sending messages from the router to Azure IoT Hub. But I am confused on how to subscribe to them from the HMI.

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,272 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sander van de Velde | MVP 36,761 Reputation points MVP Volunteer Moderator
    2023-05-22T16:02:43.82+00:00

    Hello @Konstantinos Krikelis,

    the Azure IoT Hub is perfect for sending data to the cloud and optionally sending commands back for a full control loop.

    I'm not sure where the HMI is living, but I expect this is some solution in the cloud.

    Then you want:

    industrial router -> Azure IoT Hub -> [something] -> HMI
    

    It's not clear from what you share how data is provided to the HMI.

    If the HMI can read data from databases eg. Sql Server or Azure Data Explorer (just like Grafana) then you need to persist the incoming data in that database:

    industrial router -> Azure IoT Hub -> Azure Stream Analytics|Azure Function -> DB <- HMI
    

    But perhaps your HMI can ingest streaming data (like using a REST endpoint or MQTT endpoint).

    In that case, you need to call the endpoint for each incoming message.

    An Azure Function is most convenient:

    industrial router -> Azure IoT Hub -> Azur function -> HMI endpoint -> HMI
    

    An alternative is using an HMI in the local network.

    In that case, why should you use the IoT Hub between the router and HMI?

    How about using an edge solution.

    Here is an example of using Azure IoT Edge for local logic.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.