You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 44 Next »

Overview

This page presents specific configurations fields and user actions available that are specific to the MQTT  Data Explorer Tools.

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

Go to DataExplorer Tools, for the general explanation on using the Data Explorer.

On this page:


Connecting and Disconnecting

Use the Connect button to connect to the target MQTT broker. If you are already connected, use the Disconnect button to finish your connection. The connection status appears beside the buttons.


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

After using the Radio Button, to select the OPC UA Server, and do the required configuration according the option select, you can 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 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


Solution Connection

This configuration option has a drop-down menu that allows users to select predefined MQTT TagProvider or Devices Nodes to discover their data. When selected, the Solution Connection option generates a connection string with the connection details of the selected TagProvider or Device Node. It contains the parameters for connecting to the target MQTT broker.

Enabling this configuration can require creating an MQTT External TagProvider or configuring a MQTT Device. For more details, refer to the External TagProviders.


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 opens the MQTTspB Simulator window. This window has buttons to connect and disconnect. It also has two tabs: Connection Parameters and Payload Settings.


Connections Parameters displays configurations options defined on MQTTspB Simulator Configuration, such as the Broker URL, Port, Username, Password, Start Minimized, Block Configuration Field, Connect On Startup and Publish Data On Startup.


The Payload Settings of the MQTTspB Simulator Configuration dialog allows users to manage settings related to the data payload being sent, such as GroupID, Number of NodesIDs and the Edit Data Structure button. 

GroupID: Specifies a unique identifier for a group of clients or devices. This identifier helps organizing and managing clients within the same group.

Number Of NodeIDs: Indicates the number of nodes or individual devices within the specified group. This value helps structuring the data to be sent, ensuring that the correct number of nodes is included in the payload.

Edit Data Structure: This button allows users to modify the data structure that will be used in the payload. Clicking this button opens a configuration popup where users can define or adjust the data points, types, and hierarchical organization of the data to be published.


When you click on the icon next to the command buttons, it opens the MQTTspB Simulator Configuration dialog. This configuration dialog has the following fields:

MQTTspB Simulator Configuration


Broker URL

Specifies the IP address or domain name of the MQTT broker. For example, 127.0.0.1 indicates a local broker running on the same machine as the simulator.

Broker Port

Indicates the port number used to connect to the MQTT broker. The default port for MQTT is 1883, which is specified here.

Username

Allows to enter the username required for authentication with the MQTT broker. This is used to verify the identity of the client connecting to the broker.

Password

Allows to enter the password required for authentication with the MQTT broker. This works in conjunction with the username to authenticate the client.

GroupId

Specifies a unique identifier for a group of clients or devices. This can be used to manage and identify clients within a specific group.

ConfigFile

Displays the path to the configuration file used by the simulator. This file contains the saved settings for the simulator, allowing for easy reconfiguration and management.

Minimized

When checked, starts the simulator minimized. This can be useful for reducing screen clutter and running the simulator in the background.

Block Configuration Field

When checked, prevents changes to the configuration fields once the simulator is running. This helps maintain consistency and prevents accidental modifications during operation.

Connect On Startup

When checked, automatically connects the simulator to the MQTT broker upon startup. This is useful for ensuring that the simulator is always connected and ready to operate as soon as it is launched.

Publish Data On Startup

When checked, enables the simulator to start publishing data immediately upon connecting to the broker. This automates the data publication process, ensuring that data starts flowing as soon as the connection is established.

Refer to the MQTTspB Simulator for detailed information.


Editing MQTT Data Structure

This configuration popup in the MQTTspB Simulator allows users to define and customize the data payload that the simulator will publish to the MQTT broker. Here is a detailed description and explanation of each section and its components:

NodeIDs

NumberOfNodes: Specifies the number of nodes (or groups of devices) included in the data structure. Default value is set to 4, meaning there are four groups of devices.

Node List: Lists the node names. By default, the nodes are named "Barcelona," "Bilbao," "Madrid," and "Sevilha." Users can add or remove nodes using the add (+) and remove (–) buttons.

DeviceIDs

Device List: Lists the devices under the selected node. By default, the devices are named "Panel_1," "Panel_2," and "Panel_3." Users can add or remove devices using the add (+) and remove (–) buttons.

Tags

Tags Table: Defines the tags associated with each device. Each row represents a variable with the following columns:

Name: The name of the variable (e.g., "Name," "State," "Latitude," "Longitude").

Type: The data type of the variable (e.g., "String," "Boolean," "Double").

VariationFlag: Indicates whether the variable should vary over time. When checked, the variable's value will change according to the specified range.

Min: The minimum value of the variable when it varies.

Max: The maximum value of the variable when it varies.

InitialValue: The initial value assigned to the variable when the simulation starts.


Controlling the Simulator

The Simulation Control in the MQTTspB Simulator allows users to manage the data publication process. Here is an explanation of each control option available:

Publish One Data Sample: Initiates publishing a single data sample to the MQTT broker. It is useful for testing and verifying if the data structure and connection are configured correctly. By publishing one sample, users can ensure the data is sent and received as expected without starting a continuous data flow.

Publish Continuous Data: Starts the continuous publication of data to the MQTT broker. When active, the simulator will repeatedly send data samples at specified intervals. This is useful for simulating real-time data streams and stress testing the MQTT infrastructure. Continuous data publishing also helps evaluate how the system handles sustained data loads.

Stop Publishing Data: Stops the data publication process, whether a single or continuous data sample. It controls the data flow and stops the simulation when necessary. Stopping data publication can be used to adjust configurations, analyze received data, or halt the simulation after a specific testing period.


Browsing the Asset model

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 their 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 an 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:

The root page @parent could not be found in space v10.

  • No labels