Getting Started Cameras & Video Detection & Recording Automation & Events Actions Integration & Connectivity Network & Discovery AI & Remote Control MQTT Modbus ZeroMQ System & Administration Use Cases Troubleshooting About & Legal
Home / Documentation / MQTT v3 Connector
Knowledge base

MQTT v3 Connector

MQTT V3 Connector connects Banalytics to MQTT brokers using MQTT 3.1.1. Use it for legacy devices, broadly compatible IoT brokers, local MQTT servers, and cloud endpoints that expose the MQTT v3 protocol.

Connect Banalytics to an external MQTT broker

The connector is built on the HiveMQ client library. It can publish bytes, subscribe to topic filters through listener tasks, report connection status, and expose runtime counters for published and received messages.

V3

MQTT 3.1.1

Use the v3 connector when the broker or device documentation lists MQTT 3.1.1 support.

SUB

Subscriptions

Attach MQTT Topic Listener tasks to turn incoming MQTT messages into Banalytics events.

PUB

Publishing

Use MQTT Set State actions to send commands, states, or small telemetry messages through this connector.

Adding an MQTT v3 connector

01

Choose the broker endpoint

Set host and port from the broker documentation. Use localhost for a local Banalytics MQTT Server on the same host, or a LAN/cloud hostname for external brokers.

02

Set a stable client ID

Many brokers use clientId to track sessions and reject duplicate active clients. Choose a predictable ID per connector instance.

03

Configure authentication

Use username/password authentication for broker-level credentials, or TLS/mTLS when certificate-based security is required.

04

Add listener tasks or actions

Use MQTTTopicListenerTask for inbound topics and MQTTSetStateAction for outbound state changes or device commands.

Choosing MQTT v3 for common integration paths

IOT

Legacy IoT broker

Use v3 when a gateway, PLC bridge, embedded broker, or cloud service supports MQTT 3.1.1 but not MQTT 5.

LOCAL

Local Banalytics broker

Connect to an MQTT Server using localhost or the LAN address. Use the matching plain or TLS port.

CLOUD

Cloud broker

Use the hostname, port, client ID, TLS, and authentication scheme provided by the cloud MQTT service.

Compatibility first: MQTT 3.1.1 is often the safest choice for older industrial and IoT systems. Switch to MQTT v5 only when the broker explicitly supports it and the deployment benefits from the newer session model.

TLS, mTLS, and username/password

Username/password
Enable clientAuthentication, set username and password, and keep mTLS disabled.
TLS
Enable useSsl and select a client keystore when the broker requires encrypted transport or certificate trust material.
Mutual TLS
Enable useSsl and mtlsAuthentication, then select a keystore that contains the client key and certificate.
Trusted network
Plain MQTT can be acceptable only inside a trusted local segment or lab environment.
Keystore role: the selected JKS is used as certificate material for TLS validation and, in mTLS mode, as the client identity presented to the broker.

Configuration parameters

ParameterRequiredDescriptionDefault
MAC address
YesDevice MAC address shown as read-only metadata.Auto
Title
YesHuman-readable connector name inside Banalytics.None
Host
YesMQTT broker hostname or IP address.localhost
Port
YesMQTT broker port. Allowed range is 1-65535.1883
SSL/TLS
YesEnables SSL/TLS encrypted connection to the broker.false
mTLS authentication
ConditionalEnables mutual TLS client certificate authentication. Visible when SSL is enabled.false
Client keystore
ConditionalReference to a JKS keystore that provides client certificate or trust material. Visible when SSL is enabled.None
Keystore Password
ConditionalPassword for the selected client keystore. Visible when SSL is enabled.None
Username/password authentication
ConditionalEnables MQTT username/password authentication. Visible when mTLS is disabled.false
Client ID
YesUnique MQTT client identifier used by the broker for session tracking.None
Username
ConditionalMQTT authentication username. Visible when client authentication is enabled and mTLS is disabled.None
Password
ConditionalMQTT authentication password. Visible when client authentication is enabled and mTLS is disabled.None
Keep Alive Interval (sec)
YesPing interval used to detect broken links. Allowed range is 5-600 seconds.60
Clean Session
YesStarts without broker-side session state when enabled.true
Connection Timeout (sec)
YesStartup connection timeout. Allowed range is 1-60 seconds.10

Session and connection tuning

SESS

Clean session

Keep cleanSession=true for stateless telemetry and command publishing. Set it to false only when broker-side subscriptions or queued QoS messages should survive reconnects.

PING

Keep-alive interval

Short intervals detect broken links sooner; longer intervals reduce network chatter on slow or metered networks.

VPN

Connection timeout

Increase timeout for slow VPN, cellular, or satellite links so startup does not fail too aggressively.

Related MQTT pages

Related tasks and pages