MQTT Transport
Connects to an MQTT broker as a client. Each publish is one message, so no codec is needed.
- Broker URL:
mqtt://host:1883,mqtts://host:8883(TLS),ws://orwss://(MQTT over WebSocket). A barehost:portmeansmqtt://. - Subscribe Topics: one topic filter per line (
+and#wildcards work), all with the chosen QoS. They are subscribed again after every reconnect. - TLS: a CA certificate path for a private CA, plus client certificate and key paths if the broker requires mutual TLS.
Received messages carry the topic, QoS and retain flag in their metadata. Publish with the MQTT message
input or mqtt_publish in Lua. To run a broker inside CycBox instead, use the
MQTT Server transport.

Configuration reference
| Config ID | mqtt_transport |
| Selected by | app_transport = "mqtt_transport" |
| Platforms | Linux, Windows, Android |
| License | Free |
MQTT pub/sub messaging transport
Supported server address types:
- mqtt://host:port - Standard MQTT connection (port 1883)
- mqtts://host:port - MQTT over TLS connection (port 8883)
- ws://host:port/path - MQTT over WebSocket (port 8083)
- wss://host:port/path - MQTT over Secure WebSocket (port 8084)
Supports TLS encrypted connections, optionally providing CA certificate and client certificate for authentication.
Supports subscribing to multiple topics, separating the topic list with newlines. Subscribe QoS applies to all subscribed topics.
| Setting | Key | Type | Default | Notes |
|---|---|---|---|---|
| Broker URL | mqtt_transport_broker_url | Text | "mqtt://localhost:1883" | Required |
| Client ID | mqtt_transport_client_id | Text | detected at runtime | Required |
| Username | mqtt_transport_username | Text | "" | |
| Password | mqtt_transport_password | Text | "" | |
| Use TLS/SSL | mqtt_transport_use_tls | Boolean | false | |
| CA Certificate Path | mqtt_transport_ca_path | File path | "" | Shown when Use TLS/SSL (mqtt_transport_use_tls) = true |
| Client Certificate Path | mqtt_transport_client_cert_path | File path | "" | Shown when Use TLS/SSL (mqtt_transport_use_tls) = true |
| Client Key Path | mqtt_transport_client_key_path | File path | "" | Shown when Use TLS/SSL (mqtt_transport_use_tls) = true |
| Subscribe Topics | mqtt_transport_subscribe_topics | Multiline text | "" | |
| Subscribe QoS | mqtt_transport_subscribe_qos | Integer (with presets) | 1 | Required |
| HTTP/HTTPS Proxy URL (optional) | mqtt_transport_proxy_url | Text (with presets) | "" |
Setting details
Client ID
The available values are detected on the machine running CycBox (attached devices, generated ids), so no fixed default or option list is shown here.
Subscribe QoS
Presets (any other value can be entered):
| Value | Label |
|---|---|
0 | QoS 0 (At most once) |
1 | QoS 1 (At least once) |
2 | QoS 2 (Exactly once) |
HTTP/HTTPS Proxy URL (optional)
Presets (any other value can be entered):
| Value | Label |
|---|---|
"" | No proxy |
"http://proxy.example.com:8080" | HTTP |
"http://user:pass@proxy.example.com:8080" | HTTP with auth |
"https://proxy.example.com:8443" | HTTPS |
"https://user:pass@proxy.example.com:8443" | HTTPS with auth |
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_transport"
},
"mqtt_transport": {
"mqtt_transport_broker_url": "mqtt://localhost:1883",
"mqtt_transport_username": "",
"mqtt_transport_password": "",
"mqtt_transport_use_tls": false,
"mqtt_transport_ca_path": "",
"mqtt_transport_client_cert_path": "",
"mqtt_transport_client_key_path": "",
"mqtt_transport_subscribe_topics": "",
"mqtt_transport_subscribe_qos": 1,
"mqtt_transport_proxy_url": ""
}
}