4 summary: 'MQTT interface to Prosody''s pubsub'
10 [MQTT](http://mqtt.org/) is a lightweight binary pubsub protocol suited
11 to embedded devices. This module provides a way for MQTT clients to
12 connect to Prosody and publish or subscribe to local pubsub nodes.
17 MQTT has the concept of 'topics' (similar to XMPP's pubsub 'nodes').
18 mod\_pubsub\_mqtt maps pubsub nodes to MQTT topics of the form
19 `HOST/NODE`, e.g.`pubsub.example.org/mynode`.
23 The current implementation is quite basic, and in particular:
25 - Authentication is not supported
26 - SSL/TLS is not supported
27 - Only QoS level 0 is supported
31 XMPP payloads are always XML, but MQTT does not define a payload format.
32 Therefore mod\_pubsub\_mqtt will attempt to convert data of certain
33 recognised payload types. Currently supported:
35 - JSON (see [XEP-0335](http://xmpp.org/extensions/xep-0335.html) for
37 - Plain UTF-8 text (wrapped inside
38 `<data xmlns="https://prosody.im/protocol/mqtt"/>`)
40 All other XMPP payload types are sent to the client directly as XML.
41 Data published by MQTT clients is currently never translated, and always
42 treated as UTF-8 text.
47 There is no special configuration for this module. Simply load it on
48 your pubsub host like so:
50 Component "pubsub.example.org" "pubsub"
51 modules_enabled = { "pubsub_mqtt" }
53 You may also configure which port(s) mod\_pubsub\_mqtt listens on using
54 Prosody's standard config directives, such as `mqtt_ports`. Network
55 settings **must** be specified in the global section of the config file,
56 not under any particular pubsub component. The default port is 1883
57 (MQTT's standard port number).
62 ------- --------------
66 ------- --------------