IBH Link UA:MQTT Description: Difference between revisions

From IBHsoftec Wiki English
Jump to navigation Jump to search
Andreas (talk | contribs)
Created page with "'''MQTT Connection:''' Here, user-defined OPC UA variables can be exchanged with an MQTT broker/server via the MQTT publisher/subscriber functionality. MQTT supports security..."
 
Andreas (talk | contribs)
mNo edit summary
Line 1: Line 1:
'''MQTT Connection:'''
= IBH Link UA: MQTT Function =


Here, user-defined OPC UA variables can be exchanged with an MQTT broker/server via the MQTT publisher/subscriber functionality. MQTT supports security mechanisms such as encrypted connections, certificates and user authentication, thereby achieving a very high level of data security.
Status: 2026-03-26


A structured layout of the variables can be created very conveniently using the IBH OPC UA Editor, which is available free of charge.
This page summarizes the MQTT functionality of the IBH OPC UA Server/Client.


== Overview ==


The MQTT function in the IBHL ink UA supports remanent storage for messages on the SD card. This means that messages can be retained even after a restart, power failure or connection interruption and sent later.
Supports MQTT publish and subscribe
Multiple parallel connections to different brokers
Configuration via <code>ibhlinkua-mqtt.xml</code>
Web interface for configuration management and diagnostics
Supports JSON and Sparkplug B
Includes TLS, certificates, buffering, and persistent storage


With the support of '''Sparkplug-B''', MQTT becomes suitable for industrial use (IIoT).
== Web Interface ==


The key advantages of '''Sparkplug-B''':
The <code>MQTT</code> section allows:


- Uniform data model
Upload / download configuration
Restart connections
Delete configuration
View diagnostics (broker, client ID, status)


- Online/offline detection
== Basic Concept ==


- Plug-and-Play
<code>Publish</code>: OPC UA → MQTT
<code>Subscribe</code>: MQTT → OPC UA
Structure defined via XML configuration


-  Binary & efficient
== Communication Modes ==


The MQTT function can be controlled via the PLC – however, not directly via MQTT commands, but via the OPC UA variables linked to MQTT topics.
=== JSON (Standard) ===


*In the IBHLinkUA configuration, you can define OPC UA variables that serve as triggers or statuses for MQTT.
OPC UA values are sent as JSON
*These variables can be read or written by the PLC (e.g. Siemens S7, Mitsubishi, Rockwell) via OPC UA.
Incoming JSON is parsed into variables
*Typical controls::
Supports structures and arrays
** Trigger publish: A PLC variable is set to a specific value, and IBHLinkUA sends the message to the MQTT topic.
**Monitor status: Received MQTT messages are written to OPC UA variables, which are evaluated by the PLC.


=== Sparkplug B ===


The IBH Link UA can therefore be used as a layer between machines and control systems (MES, ERP, etc.) independently of Simatic, Mitsubishi or Rockwell controlers controllers.
Uses protobuf encoding
Supports standard Sparkplug topics (DBIRTH, DDATA, etc.)
Automatic birth messages on connect
Rebirth supported
 
== Connection Configuration ==
 
Defined in XML:
 
Broker address, client ID
Authentication (username/password)
TLS (CA, client certificate, private key)
Last will message
Auto reconnect
Proxy support
Message buffering and persistence
 
== Security ==
 
TLS with certificates supported
Optional server certificate validation
PSK supported (if configured)
 
== Buffering ==
 
Controlled via <code>maxBufferedMessages</code>
Enables offline buffering
Persistent storage via <code>PersistDir</code>
 
== Cloud Support ==
 
=== Azure IoT Hub ===
 
Uses connection string
Only one topic per hub
 
=== AWS IoT ===
 
Certificate-based authentication
 
== Topics ==
 
Defined under <code>Publish</code> / <code>Subscribe</code>.
 
Key parameters:
 
<code>qos</code> (0–2)
<code>retain</code>
<code>trigger_mode</code> (rising_edge, falling_edge, value_change)
<code>status_var</code>
<code>deadband</code>
 
== Data Types ==
 
Supported:
 
Numeric types (Int, UInt, Float, Double)
Boolean, String, DateTime
Arrays and structured data
 
== Runtime Behavior ==
 
=== Subscribe ===
 
Parses incoming data (JSON / Sparkplug)
Writes values into OPC UA variables
Errors reflected in status
 
=== Publish ===
 
Sends values on change or trigger
Uses configured QoS and retain
Sparkplug generates birth/data messages
 
== Operation & Diagnostics ==
 
Typical workflow:
 
Upload configuration
Restart connections
Check status
 
For troubleshooting:
 
Broker address
Client ID
Connection status
XML configuration
Certificates
Topics and triggers

Revision as of 09:12, 27 March 2026

IBH Link UA: MQTT Function

Status: 2026-03-26

This page summarizes the MQTT functionality of the IBH OPC UA Server/Client.

Overview

Supports MQTT publish and subscribe Multiple parallel connections to different brokers Configuration via ibhlinkua-mqtt.xml Web interface for configuration management and diagnostics Supports JSON and Sparkplug B Includes TLS, certificates, buffering, and persistent storage

Web Interface

The MQTT section allows:

Upload / download configuration Restart connections Delete configuration View diagnostics (broker, client ID, status)

Basic Concept

Publish: OPC UA → MQTT Subscribe: MQTT → OPC UA Structure defined via XML configuration

Communication Modes

JSON (Standard)

OPC UA values are sent as JSON Incoming JSON is parsed into variables Supports structures and arrays

Sparkplug B

Uses protobuf encoding Supports standard Sparkplug topics (DBIRTH, DDATA, etc.) Automatic birth messages on connect Rebirth supported

Connection Configuration

Defined in XML:

Broker address, client ID Authentication (username/password) TLS (CA, client certificate, private key) Last will message Auto reconnect Proxy support Message buffering and persistence

Security

TLS with certificates supported Optional server certificate validation PSK supported (if configured)

Buffering

Controlled via maxBufferedMessages Enables offline buffering Persistent storage via PersistDir

Cloud Support

Azure IoT Hub

Uses connection string Only one topic per hub

AWS IoT

Certificate-based authentication

Topics

Defined under Publish / Subscribe.

Key parameters:

qos (0–2) retain trigger_mode (rising_edge, falling_edge, value_change) status_var deadband

Data Types

Supported:

Numeric types (Int, UInt, Float, Double) Boolean, String, DateTime Arrays and structured data

Runtime Behavior

Subscribe

Parses incoming data (JSON / Sparkplug) Writes values into OPC UA variables Errors reflected in status

Publish

Sends values on change or trigger Uses configured QoS and retain Sparkplug generates birth/data messages

Operation & Diagnostics

Typical workflow:

Upload configuration Restart connections Check status

For troubleshooting:

Broker address Client ID Connection status XML configuration Certificates Topics and triggers