mod_muc_webchat_url: Fix default url
[prosody-modules.git] / mod_pubsub_mqtt / README.markdown
blobbb4a7a5a0f5b47bc7a1edf8738e144816e22fc11
1 ---
2 labels:
3 - 'Stage-Beta'
4 summary: 'MQTT interface to Prosody''s pubsub'
5 ...
7 Introduction
8 ------------
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.
14 Details
15 -------
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`.
21 ### Limitations
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
29 ### Payloads
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
36     the format)
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.
44 Configuration
45 -------------
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).
59 Compatibility
60 -------------
62   ------- --------------
63   trunk   Works
64   0.9     Works
65   0.8     Doesn't work
66   ------- --------------