MVI69E-LDM-MQTT ♦ MQ Telemetry Transport
MQTT SparkplugB Example
CompactLogix® Platform
Quick Start Guide
ProSoft Technology, Inc.
Page 24 of 54
5
MQTT SparkplugB Example
Use this chapter to install, configure, and run the MVI69E-LDM module with MQTT
Sparkplug-B communications. Set the configuration file parameters, configure the
CompactLogix PLC, and begin data exchange.
5.1
Config.json Configuration Requirements
This section give sample configuration settings when using Sparkplug-B.
config.json "MqttServer" section file parameters
Parameters
Values for unencrypted
messaging
Values for encrypted
messaging
{
"MqttServer": {
"Type":
"Sparkplug",
"Sparkplug",
"Host":
"192.168.4.200",
"192.168.4.200",
"Port":
1883,
8883,
"Timeout"
5000,
5000,
"DoNotUseTls":
1,
0,
"DisableCertificateValidation":
1,
0,
"RootCaFileName":
"root ca.cer",
"root ca.cer",
"ClientCertPublicFileName":
"client_cert_public_key.cer", "client_cert_public_key.cer",
"ClientCertPrivateFileName":
"client_cert_private_key.pe
m",
"client_cert_private_key.pe
m",
"UserName":
"ldm",
"ldm",
"Password":
"ldm",
"ldm",
"GroupId":
"ProSoft",
"ProSoft",
"UUID":
"UniqueUUID",
"UniqueUUID",
"ClientId":
"MVI69E-1",
"MVI69E-1",
"WillTopic":
"spBv1.0/ProSoft/NDEATH/
MVI69E-1",
"spBv1.0/ProSoft/NDEATH/
MVI69E-1",
"WillMessage":
"Node MVI69E-1 is
disconnected",
"Node MVI69E-1 is
disconnected",
"PublishRetryInterval":
1000,
1000,
"MaxPublishRetries":
10,
10,
"MaxPublishInterval":
5000
5000
"PublishTopicPrefix":
"",
"",
"SubscribeTopicPrefix":
"",
"",
"PublishQOS":
1,
1,
"PublishRetain":
1,
1,
},
The remaining section of the "config.json" files are applicable to the PLC communications. No editing is
required.