Versions Compared

Key

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

Overview  

This page contains information about MQTT SparkplugB ExternalTags. MQTT SparkplugB ExternalTags allow The MQTT TagProvider provides access to standard MQTT data, as well as automatically parsing data using the SparkplugB specification. The MQTT TagProvider allows you to dynamically connect to servers using the MQTT SparkplugB protocol brokers at runtimeRuntime. This allows enables the integration and visualization of data and other components of your application without the need to create local Tagstags. 

On this page:

Table of Contents
maxLevel3
minLevelstyle2NONE


Configuration

The software platform supports both MQTT Standard and MQTT SparkplugB protocols. MQTT Standard allows general message communication via publish/subscribe, quality of service levels, message retention, last-will messages, and secure connections. SparkplugB adds standardized data models, device birth and death messages, auto-discovery, network state monitoring, efficient binary payloads, and state retention, enhancing interoperability and network management in industrial IoT applications.

Connection Parameters

Both options share the same configuration parameters.

Field

Description

Provider

Specifies the system the TagProvider will interface with. In this case, it interfaces with the MQTT Message Queuing Telemetry Transport.

Access Mode

Determines permissions for interacting with tags.

Read allows data reading.

Write permits data writing.

ReadWrite enables both reading and writing.

Name

User-defined name for the TagProvider instance. Identifies the specific configuration in the system.

Description

Explains the TagProvider's purpose or the systems it interfaces with. Provides context for its usage.

Connection

Defines connection settings for the MQTT broker, including broker URL, port, client ID, username, password, and security options.



MQTT Standard

To set up a new TagProvider connection navigate to Unified Namespace/TagProvider Connections and press the add button to open the New TagProvider Connection dialog. You can also create your TagProvider Connection directly from the AssetTree. To do this, navigate to Unified Namespace/Assets Tree and press the iconImage Added to open the New TagProvider Connection dialog. In the configuration dialog, select the MQTT Message Queuing Telemetry Transport and provide the connection parameters. After that, press the Ok button to finish the provider configuration, it creates a folder automatically in the Assets Tree (Unified Namespace / Assets Tree).

Image Added


Field

Description

BrokerURL

Sets the address of the MQTT broker, typically an IP or hostname.

Port

Specifies the port number used for the MQTT connection.

ClientID

A unique identifier for the client connecting to the MQTT broker. This is a user-defined string, which can also include the following macros, intermixed with the text:

  • _Guid_: Replaced by a dynamically generated Global Unique Identifier (GUID).

  • _Solution_: Replaced by the name of the solution (without the path or file extension).

InitialBranch

Defines the starting branch or topic for tag subscriptions.

UserName

Specifies the username for authentication with the broker.

Password

Sets the password for authentication with the broker.

X509Certificate

Specifies the path or content of an X.509 certificate for secure connections.

CertificatePsw

Defines the password for the provided X.509 certificate.

Network Security

Network Security options specify the security protocol (e.g., None, SSL, TLS) and encryption level for MQTT connection. Options include:

None: Applies no encryption or protocols, suitable for secure or isolated networks but poses risks in public settings.

SSL2: Implements an early security protocol that is now considered obsolete due to numerous vulnerabilities, including susceptibility to man-in-the-middle attacks and lack of protection against cipher block chaining attacks. Deprecated and should not be used.

SSL3: Offers an updated protocol but remains vulnerable to attacks such as POODLE. Lacks modern security features and should be avoided in favor of newer protocols like TLS 1.2 for secure communications.

TLS: Uses an early version of the Transport Layer Security (TLS) protocol with enhancements for security, now outdated and vulnerable to attacks.

TLS 1.1: Addresses initialization vector issues and includes protection against certain types of attacks but remains susceptible to modern cryptographic attacks with limited support for new standards.

TLS 1.2: Provides significant security upgrades, supporting modern cryptographic algorithms like AES-GCM and AEAD ciphers. Ensures data confidentiality and integrity with robust mechanisms for secure key exchange and message authentication. Recommended for secure network communications and widely supported across modern systems and applications.

WebSocked

Enables or disables WebSocket communication for the connection.

Collector ID

Assigns an identifier for the data collector handling the connection.

QoS

Defines the Quality of Service level for message delivery. Options include:

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 (s)

Defines the interval in seconds for sending keep-alive packets to the broker.

Report Out Of Range By Exception

Enables reporting of tag values that fall outside expected ranges.



MQTT SparkplugB

To set up a new TagProvider connection navigate to Unified Namespace/TagProvider Connections and press the add button to open the New TagProvider Connection dialog. You can also create your TagProvider Connection directly from the AssetTree. To do this, navigate to Unified Namespace/Assets Tree and press Image Added to open the New TagProvider Connection dialog. In the configuration dialog, select the MQTT SparkplugB Protocol and provide the connection parameters. After that, press the Ok button to finish the provider configuration, it creates a folder automatically in the Assets Tree (Unified Namespace / Assets Tree).

Image Added

The Test button verifies the connection settings to ensure successful communication with the specified broker.

Field

Description

BrokerURL

Specifies the address of the MQTT broker, such as an IP or hostname.

Port

Defines the port number used to establish the MQTT connection.

ClientID

Assigns a unique identifier for the SparkplugB client connecting to the broker. This is a user-defined string, which can also include the following macros, intermixed with the text:

  • _Guid_: Replaced by a dynamically generated Global Unique Identifier (GUID).

  • _Solution_: Replaced by the name of the solution (without the path or file extension).

UserName

Specifies the username required for broker authentication.

Password

Sets the password required for broker authentication.

X509Certificate

Provides the path or content of an X.509 certificate for secure communication.

CertificatePsw

Specifies the password for the provided X.509 certificate.

NetworkSecurity

Network Security options specify the security protocol (e.g., None, SSL, TLS) and encryption level for MQTT connection. Options include:

None: Applies no encryption or protocols, suitable for secure or isolated networks but poses risks in public settings.

SSL2: Implements an early security protocol that is now considered obsolete due to numerous vulnerabilities, including susceptibility to man-in-the-middle attacks and lack of protection against cipher block chaining attacks. Deprecated and should not be used.

SSL3: Offers an updated protocol but remains vulnerable to attacks such as POODLE. Lacks modern security features and should be avoided in favor of newer protocols like TLS 1.2 for secure communications.

TLS: Uses an early version of the Transport Layer Security (TLS) protocol with enhancements for security, now outdated and vulnerable to attacks.

TLS 1.1: Addresses initialization vector issues and includes protection against certain types of attacks but remains susceptible to modern cryptographic attacks with limited support for new standards.

TLS 1.2: Provides significant security upgrades, supporting modern cryptographic algorithms like AES-GCM and AEAD ciphers. Ensures data confidentiality and integrity with robust mechanisms for secure key exchange and message authentication. Recommended for secure network communications and widely supported across modern systems and applications.

WebSocked

Enables or disables WebSocket communication for the SparkplugB connection.

Collector ID

Defines an identifier used to track the data collector.

QoS

Specifies the Quality of Service level for message delivery guarantees.

KeepAlive (s)

Defines the interval in seconds for sending keep-alive packets to the broker.

Report Out Of Range By Exception

Enables exception-based reporting for values that exceed expected ranges.

InitialBranch

Sets the initial branch or topic for SparkplugB tag subscriptions.


Importing Tags from Broker

If you are navigating and exploring tags from an MQTT Broker by using the data discovering tool available on Data Explorer/MQTT Tools, you can view the tags from the MQTT broker before importing them. After, you can select the tags and map the selected connection and data to the solution by pressing Map to the Solution in the top-left corner. To view the imported data, navigate to Unified Namespace/Asset Tree, create a folder, select it, and use the "Insert Data from TagProvider" Image Added to select the MQTT data you want added. You can link all the data to the folder on your Asset Tree or select a specific part of the application.

Image Added

Image Added

Once the data is added to the Asset Tree, you'll be able to browse all the values. 

Image Added

Configuration

To configure this Protocol as a ExternalTags, go to Unified Namespace → ExternalTags Sources and create a new provider for MQTT +SparkplugB - Message Queuing Telemetry Transport - Collector.

Image Removed

The configuration includes:

Access Mode: Defines the mode of access for the MQTT connection. The options are Read, Write and ReadWrite.

Type: If the MQTTSpB will be a Publisher or a Collector.

TagProperties : Configurations related to specific tag properties.

TimePublishRate : The rate at which data is published. Default is 500ms, meaning data is sent every half-second.

StoreAndForward: Determines if messages should be stored locally when the connection to the broker is lost and forwarded when the connection is re-established.

PublishDBIRTHAfterNBIRTH : Configuration related to the MQTT SparkPlugB Birth message sequence.

UseParenthesesForArray : If set, array elements will be enclosed in parentheses. Useful for specific formatting requirements.

For the broker configuration:

  • BrokerURL: The URL or IP address of the MQTT broker. Default is localhost.

  • Port: The port number on which the MQTT broker is running. The default is 1883 for no encryption and 8883 for SSL/TLS security.

  • ClientID: A unique identifier for the MQTT client connecting to the broker (if required).

  • Username: Username credential for authenticating with the MQTT broker (if required).

  • Password: Password credential for authenticating with the MQTT broker (if required).

  • X509Certificate: If using certificate-based authentication, this is where the path of the X.509 certificate is specified.

  • CertificatePassword: The password to unlock the provided X.509 certificate (if it's password-protected).

On Assets Tree page, you can see the external tags imported from MQTT .

Image Removed


In this section:

Page Tree
root@parent
spacesV10