Skip to main content

MQTT Server Transport

Runs an MQTT broker inside CycBox. Devices and other clients connect to it as to any broker, and CycBox sees every publish that matches the Observation Topic Filter (one filter per line; empty means #, all topics). CycBox can also publish to any topic, from the MQTT message input or Lua.

Use it to debug MQTT devices without a cloud broker, or to bridge a device into a script: add an MQTT client connection to 127.0.0.1 next to it.

  • Credentials: username:password, one pair per line. Leave empty to allow anonymous clients.
  • TLS: certificate and key paths, plus an optional CA certificate path.
  • WebSocket: an extra listener on its own port for browser or ws:// clients.

The built-in MQTT broker listening on port 1883.

Configuration reference​

Config IDmqtt_server_transport
Selected byapp_transport = "mqtt_server_transport"
PlatformsLinux, Windows, Android
LicensePremium

Embedded MQTT broker for local debugging and service bridging

Start an embedded MQTT broker for local debugging and service bridging.

Use cases:

  • Run an MQTT server, connect zigbee2mqtt and Home Assistant, observe their communication
  • Local MQTT debugging, view all pub/sub messages

Authentication: Enter credentials as username:password, one per line. Leave empty to allow all clients to connect anonymously.

Enable TLS by providing server certificate and key files.

The observation topic filter controls which messages appear in CycBox. Separate multiple filters with newlines. Default # means all messages.

SettingKeyTypeDefaultNotes
Bind Addressmqtt_server_transport_bind_addressText (with presets)"0.0.0.0"Required
Bind Portmqtt_server_transport_bind_portInteger1883Required
Enable TLSmqtt_server_transport_use_tlsBooleanfalse
CA Certificate Pathmqtt_server_transport_tls_ca_pathFile path""Shown when Enable TLS (mqtt_server_transport_use_tls) = true
TLS Certificate Pathmqtt_server_transport_tls_cert_pathFile path""Shown when Enable TLS (mqtt_server_transport_use_tls) = true
TLS Private Key Pathmqtt_server_transport_tls_key_pathFile path""Shown when Enable TLS (mqtt_server_transport_use_tls) = true
Credentials (username:password, one per line)mqtt_server_transport_credentialsMultiline text""
Observation Topic Filtermqtt_server_transport_topic_filterMultiline text"#"

Setting details​

Bind Address​

Presets (any other value can be entered):

ValueLabel
"0.0.0.0"0.0.0.0
"127.0.0.1"127.0.0.1
"::"::
"::1"::1

Example config​

Default values as they appear in a saved configuration (for example the JSON block at the end of a cycbox/examples/*.lua file). Settings detected at runtime are omitted.

{
"app": {
"app_transport": "mqtt_server_transport"
},
"mqtt_server_transport": {
"mqtt_server_transport_bind_address": "0.0.0.0",
"mqtt_server_transport_bind_port": 1883,
"mqtt_server_transport_use_tls": false,
"mqtt_server_transport_tls_ca_path": "",
"mqtt_server_transport_tls_cert_path": "",
"mqtt_server_transport_tls_key_path": "",
"mqtt_server_transport_credentials": "",
"mqtt_server_transport_topic_filter": "#"
}
}