Overview of MindConnect MQTT¶
Securely connect your MindConnect MQTT agents to Insights Hub using MQTT protocol. This is a step-by-step guide to perform specific operations to successfully connect and exchange data with Insights Hub from your MQTT agent.
1. Authenticate your MindConnect MQTT Agent¶
All the communication between your agent and Insights Hub occurs over TLS encrypted connection. This requires the following steps:
- Installing MindConnect MQTT broker's certificate by the agent.
- Downloading this certificate from Asset Manager.
- Authenticating the MindConnect MQTT agent. Every MindConnect MQTT agent can authenticate itself by presenting X.509 based certificate and associated private key.
There are two ways to obtain them.
- Option 1: Create a CA Certificate: You can use your own CA certificate and create the agent certificate and key. This approach may require you to be savvy with IT skills. However, there is user interface provided in the Asset Manager for uploading the CA certificate along with assistance.
For more information, refer to Managing CA Certificates using UI.
It is also possible to perform this entire operation programmatically using Insights Hub API. For more information, refer to Managing CA Certificates using MindConnect MQTT API.
- Option 2: Get AutoGenerated Agent Certificate: You can download an agent certificate and associated key from the Asset Manager application. For more information,refer to Obtaining Auto Generated Agent Certificate
2. Generate an Agent Certificate and Onboard¶
- Generate an agent certificate for each device using OpenSSL or an equivalent tool. The agent certificate must have the device name as the Common Name attribute of the subject. You also need to concatenate the agent certificate and the CA certificate into a chain file.
- Connect your device to MindConnect MQTT broker using the client ID, which is composed of your tenant name and your device name. You also need to provide the chain file and the agent private key for authentication.
- To complete this step, refer to Onboarding MindConnect MQTT Agent.
3. Create Data Model¶
After connecting your agent to Insights Hub, to send data from the MindConnect MQTT agent, the agent provides the asset model thereby letting Insights Hub know how to handle the data. An asset model is a description of data points, aspects, assets and their mappings. Using this feature, the MindConnect MQTT agents can completely create and manage asset model from itself and avoid the end user of the device from creating the data model. For information on creating asset model from your MindConnect MQTT agent, refer to Create DataModel for MQTT Agent.
4. Send Data¶
- With asset model created, your MindConnect MQTT agent can now send data. Sending data to Insights Hub is very optimal and structured. Refer to Send Data for MQTT Agent document and efficiently send the time series data from your agent.
5. Send Data to Agent from Insights Hub¶
- Your MindConnect MQTT agents can also subscribe to commands or data originating from Insights Hub. It can originate from an application, service or anything similar. For more information about sending commands to an agent, refer to MindConnect MQTT Commanding.
Except where otherwise noted, content on this site is licensed under the Development License Agreement.