Versions Compared

Key

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

Overview

This page presents specific configurations fields and user actions available that are specific to the MQTT Tools provides functionalities for managing MQTT communications.External Tags allows you to use directly variables in remote systems, without the needing to create tags in this solution.  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:

Table of Contents
maxLevel3
stylenone


Connect to a MQTT Broker

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

Image Added

Tools

  • Local Built-in Broker

A local broker is available for immediate MQTT communication within your environment.

Control Options: Easily start (Run) or stop (Stop) the Broker as needed, offering control over your simulation scenarios.

Local/Remote Settings

Access the specific settings of the MQTT broker. Here, you can set parameters such as 'Backlog', 'MaxPendingMessagesPerClientOut', and whether you want to disable the retained file. In addition, you can manage user credentials, adding usernames and passwords for MQTT client authentication. There are also options for managing client connections, specifying client names, topics and permissions for subscribing and publishing.

Solution Connection

Configure your MQTT to connect through the Solution Connection, integrating with other existing FrameworX solution.

Remote Broker URL

Specify a Remote Broker URL to connect to an external MQTT broker. This flexibility allows for integration with broader systems and external data sources.

Publish Simulator

A tool for simulating MQTT publications, providing a environment for testing and validation.

Control Options: Easily start (Run) or stop (Stop) the simulator as needed, offering control over your simulation scenarios.

  • : 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 Image Added button starts the broker, and the Image Added button stops it. When you click on the Image Added 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.

Tip

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.

Tip

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 Image Added 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 Image Addedbutton starts the Simulator, and the Image Added 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. 

Image Added

When you click on the Image Added 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.

Tip

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."

MQTT Tools, an integrated function in FrameworX, serves as a robust bridge for configuring and managing the transmission of MQTT data in various ways. This document aims to explain how to use this tool efficiently.

To access MQTT Tools, just go Data Explorer → MQTT Tools

Image Removed

Local Built-In Broker

To see more details about the Built-In MQTT Broker, go to the Embedded MQTT Broker page.

Enable Trace

This option activates the Trace functionality in Output Window, which logs additional messages related to MQTT communication. These messages can be useful for troubleshooting and understanding the data flow in your MQTT network.

Enable Debug Raw View Mode

When this option is enabled, it provides a more detailed view of the raw MQTT messages. This can be particularly useful when debugging complex issues, as it allows you to see the exact data being transmitted.

MQTT External Tags

To see more details about the Built-In MQTT Broker, go to the MQTT Tag Provider page.

MQTT Broker URL

You can configure another Broker URL with this option. 

MQTT SparkPlugB Publisher Simulator

Image Removed

With the SparkPlugB Publisher Simulator, you can launch a Publisher and see if the connection is running and if the data is publishing properly.

In this section:

Page Tree
rootV10:@parent
spacesV10