How to configure in the HMI the new functionality "MQTT broker" in Azure Event Grid?

David Gallego 0 Reputation points
2023-06-03T17:34:36.93+00:00

Hello, I want to use Azure Event Grid as Broker. the MQTT client is an HMI which I can configure as follows:1.png, 2.png, 3.png, 4.png

I have tried to configure the hmi and the Event Grid without being able to establish MQTT communication. any suggestion about it? thank you

Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
350 questions
{count} votes

1 answer

Sort by: Most helpful
  1. VasimTamboli 4,785 Reputation points
    2023-06-03T18:27:42.4433333+00:00
    1. Azure Event Grid documentation
    2. Connect your IoT devices to Azure Event Grid
    3. Azure Event Grid troubleshooting guide

    Create an Azure Event Grid topic:

    • In the Azure portal, navigate to the Event Grid service.
    • Click on "Topics" and then "+ Event Grid Topic" to create a new topic.
    • Provide a name, select the appropriate subscription and resource group, and choose the region.
    • Click on "Create" to create the topic.

    Configure Event Grid for MQTT support:

    • Once the topic is created, click on the topic name to open its settings.
    • In the topic settings, click on "Endpoints" and then "+ Event Subscription" to create a new subscription.
    • Provide a name for the subscription.
    • In the "Endpoint Type" section, select "Webhook" as the endpoint type.
    • In the "Endpoint" field, provide the URL of the MQTT broker you want to connect to. This will depend on your specific setup.
    • Configure any additional settings as needed and click on "Create" to create the subscription.

    Configure the HMI:

    • On your HMI device, open the configuration settings for the MQTT client.
    • In the configuration settings, you will typically find options to set the MQTT broker URL, client ID, username, password, and other relevant settings.
    • Use the MQTT broker URL you specified in the Azure Event Grid subscription endpoint as the broker URL in the HMI configuration.
    • Configure the remaining settings (such as client ID, username, and password) as required by your MQTT broker and HMI device.

    Test the MQTT communication:

    • Save the configuration settings on the HMI device and ensure that it is connected to the network.
    • Publish a test message to the Azure Event Grid topic or simulate an event that should trigger a message to be sent to the MQTT broker.
    • Monitor the MQTT broker to see if it receives the messages from the Event Grid topic.

    In addition to the above steps, here are a few KB articles that you can refer to for more information and troubleshooting:

    0 comments No comments