Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
iconfalse

Quick video tutorial: MQTT Broker Without Sparkplug TMQTT Broker And SparkplugMQTT With Mosquitto Broker

Introduction

MQTT

As defined in http://mqtt.org/:

”MQTT is a machine-to-machine (M2M)/”Internet of Things” connectivity protocol. It was designed as an extremely lightweight publish/subscribe messaging transport. It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium. For example, it has been used in sensors communicating to a broker via satellite link, over occasional dial-up connections with healthcare providers, and in a range of home automation and small device scenarios. It is also ideal for mobile applications because of its small size, low power usage, minimized data packets, and efficient distribution of information to one or many receivers (more...)”.

Sparkplug B

As defined in https://www.bevywise.com/blog/sparkplug-b-mqtt-simulation/.

Sparkplug provides an open and freely available specification for how Edge of Network (EoN) gateways or native MQTT enabled end devices and MQTT Applications communicate bi-directionally within an MQTT Infrastructure. One of the unique aspects of MQTT is that it was originally designed for real time SCADA systems to help reduce data latency over bandwidth limited and often unreliable network infrastructure. Similarly the intent of the Sparkplug specification is to take full advantage of MQTT’s native Continuous Session Awareness capability as it applies to real time SCADA/IIoT solutions.

Inside the product installation folder, you will find an executable file called TMQTTBroker.exe. To run it, double click on the file. Once the file is running, a blue icon will appear in the Windows System Tray. The MQTT Broker will run by following the specifications configured in the TMQTTBroker.exe.config file. You can find more information regarding this in the next section. 

...

You can set up communication between the TMQTT Broker with and third party MQTT Clients. In this example, we use MQTT.fx.

To configure this clientMQTT.fx, the following steps are required:

...

Note

It is worth mentioning that its not required to point to each element individually for an array tag. The broker is smart enough to fetch all data by just receiving the main tag element. The same happens for tags with template datatypes.



There is more More data that can be exchanged between the running project and TMQTT Broker. Some examples can be seen below.

...

Info

The client is case-sensitive. If the topic is not fetching data, check for possible typos in the subscribed topics.


Step 4: After subscribing for to the desired topics, the exchanged data can be seen in the top right corner.

...

Code Block
{
"timestamp": 1580152490182, "metrics": [
{
"name":  "Integer1", "timestamp": 1580152489659, "dataType": "Int32", 
"value": 30
}
],
"seq": 1
}


...

Appendix

MQTT

As defined in http://mqtt.org/:

”MQTT is a machine-to-machine (M2M)/”Internet of Things” connectivity protocol. It was designed as an extremely lightweight publish/subscribe messaging transport. It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium. For example, it has been used in sensors communicating to a broker via satellite link, over occasional dial-up connections with healthcare providers, and in a range of home automation and small device scenarios. It is also ideal for mobile applications because of its small size, low power usage, minimized data packets, and efficient distribution of information to one or many receivers (more...)”.


Sparkplug B

As defined in https://www.bevywise.com/blog/sparkplug-b-mqtt-simulation/.

...