Overview

This page presents specific configurations fields and user actions available that are specific to the MQTT  Data Explorer Tools. For the general explanation on using the Data Explorer, return to the main DataExplorer Tools page. 

The DataExplorer for MQTT shows data from MQTT Broker in its data browsing tree, plain data form. It also correctly parses and format the data from SparkplugB topics.

On this page:


Connect to a MQTT Broker

The User Interface presents the following options to locate the server:

  • Local Built-in Broker: connects with internal OPC UA Server (Runtime needs to be in execution, with the OPC Server Module enabled).
  • Solution Connection: connected with the OPC UA server used by a Device Node, or a TagProvider. 
  • Remote Broker URL: setup manually the configuration to connect to a Broker.

The MQTT Publish Simulator, allows to run a MQTT Client application that publishes data using SparkplugB.

Connect and Disconnect

Select the option you want with the radio buttons and do the required configuration according to the selected option. You can then use the top buttons to Connect with the server.

After connecting, if you want to change to another server, use the Disconnect button first. 

Refer to Enabling the TMQTT Broker for information on how to install the TMQTT Service.


Local Built-in Broker

This configuration option allows the user to use a built-in MQTT broker that is integrated within the tool.

The button starts the broker, and the button stops it. When you click on the icon next to the command buttons, it opens the TMQTT Broker Settings dialog window.

Go to Integrations / MQTT /  Built-In MQTT Broker, for details on the execution and configuration of the built-in Broker.

In most of cases, the default settings are enough. It's not necessary to open the Configuration Dialog, you can just run the Broker directly.

At Solutions Manager, you can setup the Broker to run as Windows Service.

The message "TMQTTBroker is running" confirms that the broker is active.

Additionally, there are two options: 

Enable Trace: When enabled, it provides the option to enable tracing of MQTT messages. It logs detailed information about MQTT messages, including their content, source, destination, and timestamps.

Enable Raw View Mode: When selected, it displays the raw data of MQTT messages without any formatting or parsing, providing a clear view of the actual transmitted data. It presents raw data and low-level information for debugging and shows unprocessed data streams, memory contents, register values, and network packets that facilitate in-depth troubleshooting.


Solution Connections

Within the Solution Configuration, there are two location you can link to MQTT Brokers:

  • Using the Device Module, Channels, selecting an MQTT protocol.
  • Using the TagProvider connections, to dynamic use the data from remote MQTT Brokers.

In order the expedite the testing of those connections, the Data Explorer tools allows you easily select those settings, and explorer the connection and data of that MQTT Broker.

Just select the configuration you want to test, and connect to it.

If the Radio Button for Solution Connections is disabled, it means the solution doesn't have any DeviceChannel or TagProvider using MQTT Brokers


Remote Broker URL

To connect using the Remote Broker URL option, start by entering the broker’s IP address or domain name in the specified field. Click the icon next to this field to access the MQTT Broker Connection dialog. In this dialog:

  1. Specify the port number, typically 1883.

  2. Assign a unique ClientID to identify the client.

  3. If authentication is required, input the username and password.

  4. For secure connections, provide the path to the SSL certificate file and its password.

  5. Select the network security protocol, such as SSL or TLS 1.2, to ensure encrypted communication.

  6. Enable WebSocket connections if traditional MQTT ports are blocked.

  7. Choose the Quality of Service (QoS) level based on the desired message delivery guarantee.

  8. Configure the KeepAlive interval to maintain an open connection during inactivity.

The following tables has the complete set of fields available when setting up a Broker connection. 

Broker Connection Configuration Settings

Field

Description

Broker URL

Specifies the address of the MQTT broker. This is typically an IP address or a domain name (e.g., localhost).

Port

Indicates the port number used for the connection. The default MQTT port is 1883.

ClientID

A unique identifier for the client connecting to the broker. This ensures that each client can be uniquely identified.

Username

(Optional) username required for authentication with the broker.

Password

(Optional) password required for authentication with the broker.

Certificate File

Path to the SSL certificate file used for secure connections. This is important for encrypted communication.

CertificatePassword

Password for the SSL certificate file, ensuring secure access to the certificate.

Network Security

Specifies the security protocol used (e.g., None, SSL, TLS). Determines the encryption level for the connection. Network security options for MQTT brokers include: 

None: No encryption or protocols are applied. This option is suitable for secure or isolated networks but risky in public settings.

TLS 1.0: An early TLS version that enhances SSL 3.0 security. However, it is now outdated and vulnerable to attacks like POODLE and BEAST. It is generally discouraged.

TLS 1.1: An improvement over TLS 1.0, addressing initialization vector issues. However, it remains outdated and susceptible to attacks, with limited support for new standards.

TLS 1.2: Offers significant security upgrades, supporting modern cryptographic algorithms like AEAD ciphers. It ensures data confidentiality and integrity. TLS 1.2 is the recommended secure protocol for network communications until TLS 1.3 sees wider adoption.

WebSocket

Checkbox option to enable WebSocket connections. This is useful for scenarios where traditional MQTT ports are blocked.

QoS

The Quality of Service (QoS) levels in MQTT define the guarantee of message delivery between the sender and the receiver. The available QoS levels are:

AtMostOnce: Ensures that each message is delivered at least once to the receiver. This level may result in duplicate messages but guarantees that no message is lost.

AtLeastOnce: Guarantees that a message is delivered at most once, meaning it might not be delivered at all. This level is suitable for scenarios where occasional message loss is acceptable but duplicate messages are not.

ExactlyOnce: Ensures that each message is delivered exactly once. This is the highest level of service, preventing both message loss and duplication, but it incurs the highest overhead.

KeepAlive (sec)

Time interval in seconds to keep the connection alive. Ensures that the connection remains open even if no messages are sent.


MQTT Publisher Simulator

This tool allows users to simulate an MQTT Publisher device integrated into the platform.

The button starts the Simulator, and the button stops it. Clicking on the green play button starts the execution the simulator. When doing so the MQTTspB Simulator window shows, closing that window will cease the execution the simulator. You can minimize if you want to keep the simulation in background. 

When you click on the icon next to the command buttons, it opens the MQTTspB Simulator Configuration dialog which allows to custom the Simulator data model and execution behaviors.

Go to Integrations / MQTT / SparkplugB Simulator, for detailed information for customization the Simulator Settings.

In many cases, the default settings are enough. It's not necessary to open the Configuration Dialog, you can just run the Simulator directly.


Browsing the Data

The table in the MQTT Tools displays the hierarchical organization and current state of various parameters. It includes columns for each parameter's name, type, value, timestamp, and address, allowing users to browse the asset model and view the data model and its organization. Each row represents a specific data point within the hierarchy, providing details on its current state and location within the MQTT topic structure, facilitating effective monitoring and management of the system. Here is a brief description and explanation of each column in the table:

  • Name: This column lists the names of various entities and parameters in the simulation. It includes hierarchical names that represent groups, panels, and specific parameters within those panels. Examples include "LocalBroker," "spBv1.0," "GroupID," "Barcelona," "Panel1," and specific data points like "Latitude," "PanelPower," etc.

  • Type: This column indicates the data type of each parameter listed in the "Name" column. Common types shown include "ModuleDevice," "Double," "Text," and "Digital." These types describe the nature of the data, such as numerical values (Double), text strings (Text), and binary states (Digital).

  • Value: This column displays the current value of each parameter at the given timestamp. The values can be numerical, textual, or binary. For example, "37.36" for Latitude, "Sevilha - Panel1" for Name, and "true" for State.

  • Timestamp: This column shows the exact date and time when the value of each parameter was recorded. This is useful for tracking the time-specific states and readings of the various parameters. The format used is "M/D/YYYY H:MM AM/PM."

  • Address: This column provides the full address or path within the MQTT topic hierarchy for each parameter. This path helps locate the specific data points within the overall structure of the simulation. Examples include "spBv1.0/GroupID/Sevilha/Panel1/Latitude" and "spBv1.0/GroupID/Sevilha/Panel1/PanelPower."


In this section:

  • No labels