IBH Link UA:MQTT Description: Difference between revisions

From IBHsoftec Wiki English
Jump to navigation Jump to search
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..."
 
Tag: Manual revert
 
(5 intermediate revisions by the same user not shown)
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.
This page summarizes the MQTT functionality of the IBH OPC UA Server/Client.


A structured layout of the variables can be created very conveniently using the IBH OPC UA Editor, which is available free of charge.
== Overview ==
[[Image:IBH-Link-UA-MQTT-Function-Overview.png|900px]]


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


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.
== Web Interface ==


With the support of '''Sparkplug-B''', MQTT becomes suitable for industrial use (IIoT).
The <code>MQTT</code> section allows:


The key advantages of '''Sparkplug-B''':
Upload / download configuration
Restart connections
Delete configuration
View diagnostics (broker, client ID, status)


- Uniform data model
== Basic Concept ==


- Online/offline detection
<code>Publish</code>: OPC UA → MQTT
<code>Subscribe</code>: MQTT → OPC UA
Structure defined via XML configuration


- Plug-and-Play
== Communication Modes ==


-  Binary & efficient
=== JSON (Standard) ===


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.
OPC UA values are sent as JSON
Incoming JSON is parsed into variables
Supports structures and arrays


*In the IBHLinkUA configuration, you can define OPC UA variables that serve as triggers or statuses for MQTT.
=== Sparkplug B ===
*These variables can be read or written by the PLC (e.g. Siemens S7, Mitsubishi, Rockwell) via OPC UA.
*Typical controls::
** 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.


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


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

Latest revision as of 11:44, 30 March 2026

IBH Link UA: MQTT Function

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