The PahoMqtt Extension implements MQTT client subscription and publication to topics on an MQTT broker where messages on those topics contain current point values. It uses the Eclipse Paho MQTT java client for all MQTT Broker communication. This extension depends on pahoMqtt which is just a wrapper for the runtime Java jar files it requires.
Discovery and learn are not supported functions. As a result, brokers are not discoverable from within the Connectors app and from within the Builder app, the Connectors panel will not show the PahoMqtt Connector.
All PahoMqtt proxy points must be manually bound.
History synchronization is not supported by PahoMqtt. You will need to use History Collected to store history.
NOTE: This is a community built MQTT connector from Stackhub.
Download and install the latest of these pods for the current framework version being used: pahoMqtt (latest for FIN 5.0 and 5.1 is v1.2.1) pahoMqttExt (latest for FIN 5.0 and 5.1 is v1.0.14)
Once installed, go to the Settings app → Ext → and enable Paho MQTT.
Creating a MQTT connector
The MQTT connector can be added via the DB Builder → Connectors tree under the PahoMqtt.
The connector URI has the following format:
IP – the IP address of the MQTT device
port - default for MQTT is 1883
If username is entered, then a password is also expected. These will be supplied to the broker on connection. If you have a non-authenticating broker, just leave username and password blank.
Additionally, the two tags below need to be added to the connector if there are points that are writable.
pahoMqttQos (number tag) - value being either 0, 1, or 2. Recommend setting it to 1. There is no difference between those values.
pahoMqttConstructor (string tag) - value being the name of the contructor function being used
Adding data points
This portion has to be done manually. Each point has to be created and have a reference to the MQTT connector. More documentation from Stackhub about “Parser” and “PointName” can be found here and look for those sections.
First, the user needs to create a local point in DB Builder.
Then add the following tags to read the current value: