Summary
Mqtt Connector it is the component which is responsible for managing connection, sending and receiving messages from a MQTT broker in a Niagara station.
This component is a RealTimeConnector, this page will only contain information specific to this component.
Implementation
-
Drag and drop the RealTimeConnector to Services > Btib Service > External Connectors > Realtime Connectors.
-
Follow Step 1 Set up a broker and a client app and Step 2 Set up the MQTT connector for devices, points and references.
-
Enable the connector. It is also possible to ping the Connector to check if it works.
Properties
-
MqttHost: The broker hostname or ip address.
-
Port: The broker port number.
-
Ssl: Use ssl connection.
-
DevicePublishTopicFormat: The topic with the full format where the events will be sent. It should always include
${deviceId},this will be replaced by the actual device id by the connector. -
DeviceServiceTopicFormat: The topic with the full format where the tags will be sent. It should always include
${deviceId}this will be replaced by the actual device id by the connector. -
DeviceReferenceTopicFormat : The format of the topic where the references will be sent..
-
DeviceSubscriptionTopicFormat: The topic with the full format where the device will listen for external messages. It should always include
${deviceId}this will be replaced the the actual device id by the connector. -
ClientId: The client id format to be used should always include
${deviceId}.This will be replaced by the actual device id by the connector. -
ServiceTopicUpdateDelay: the delay between writes to the service topic.
-
AuthenticationSchemes: the authentication mechanisms to use.
Fault Causes
-
Unable to connect: verify the your hostname and port are correct.
-
Unauthorized: verify your authentication mechanism used by the broker and the connector.
-
Any other: just relaunch a ping.
-
Ssl error: if your server uses a self signed certificate for ssl you need to add the Asymmetric Keys Authentication option.