This XEP specifies an simple and easy to implement XMPP extension protocol for the Internet of Things. At is core, the IoT protocol defined herein defines, amoungst others, the terms Thing, Owner, Requestor and Provisioning Service and the interaction between those. A fundamental permission concept is Friendship, which is based on XMPP presence subscriptions state. Since a thing can't decide on it's own if another entity should be a friend or not, a proxy mechanism for XMPP subscription states is also specified.
A thing is a physical or virtual entity which provides data and/or can be controlled in some way. Typical examples include a temperature sensor, a light bulb or a door lock. A thing is mapped into XMPP to a bare JID. No bare JID shall represent more than one thing.
A requestor is an XMPP entity which makes a request to a thing. Typical examples for requests include reading out the current temperature, turning the light bulb on, or opening the door lock. A requestor also be a thing, but this is not necessary.
Friendship is the basic mechanism upon which things decide if another XMPP entity is allowed to interact with them. If the requestor is a friend of the thing, then the thing must try to fullfil the request (if no other limitations are in effect).
Friendship is defined on XMPP level as follows: A requestor R is a friend of thing T, if T's roster has an item for R's bare JID with a subscription state of either 'From' or 'Both'.
The provisioning service acts as link between a thing and its owner. It acts as manager between those two types: Things ask the provisioning service if it should accept a friendship request. Owners inform the provisioning service if an XMPP entity is a friend of a thing or not.
Provisioning services may act as as registry for things. Or they could forward their knowledge about existing things and owners to such registries. IoT registry services are not within the scope of this XEP (but may be specified by another XEP).
A owner is an XMPP entity. represented as bare JID, owning a thing. The ownership of a thing is noted in the provisioning service used by the thing. Ownership gives full control over thing and allows to decide about the thing's friends. The owner of thing is always also a friend of the thing.
This section explains how the story of an IoT product and its customer could look like. Note that the manufacturer needs to decide which parameters are pre-configured for the thing. The recommendation is that a thing only has a valid and unique JID and the corresponding credentials shipped, and is able to to generate and show a key to the user.
During the initial setup of the thing, e.g. after customer has unpacked the thing, the thing creates a new random key, presents the key to the customer, connects to the XMPP network and registers itself with the provisioning service.
Now the customer can claim ownership of the thing, just by using the provisining server, the product name and the key of the thing.
The ting can be at any point reset to factory settings. For example when the customer wants to sell it. Doing so will make the thing forget the generated key, but not its XMPP account credentials, so that a new initial setup can be performed
Derivations from this approach, e.g. using the same key all the time, are possible but come with their own drawbacks (and advantages).
A thing registers with the provisioning service by sending an IQ of type 'set' with the <register/> element qualified by the 'urn:xmpp:siot:1' namespace. The element must have an 'name' attribute with the description of the thing, and a 'key' attribute containing a unique key for the thing.
The value of the key element must be a string consiting of at
least TODO entropy. It is suggested that it consists of 24 upper
case characters from the Latin alphabet and numbers without 'O'
("LATIN CAPITAL LETTER O") and '0' ("DIGIT ZERO") (alphabet:
123456789ABCDEFGHIJKLMNPQRSTUVWXYZ) grouped into
If the registration was successful, then the provisioning service replies with a empty result response.
After the provisioning service has acknowledged the registration, it MUST send send a presence subscription request to thing in order to subscribe to the thing's presence.
A thing MUST approve any presence subscription request from the provisioning service.
A XMPP entity claims a thing by sending an IQ of type 'set' with a <claim/> child element qualified by the 'urn:xmpp:siot:1' namespace to a provisioning service.
The provisioning service may now also send a owner update message to the thing, informing the thing about the changed ownership state. The 'jid' attribute must contain the owners bare JID.
A requestor first sends a presence subscription request to the thing in order to establish friendship (see RFC 6121 § 3.1.1).
If the thing is unaware wether the requestor is a friend or not (the usual case), then upon receiving a presence subscription request, it must ask the provisioning service about the friendship status.
To inform the provisioning service about a change in the friendship state, the owner sends a friend state update <iq/>. This is typically done by the owner after he became aware of pending friendship requests, if he wants to remove an existing friend, or if he wants to add a new friend.
In order to inform a thing about changed friendship state, the provisioning service sends a notification to the thing.
TODO: Make this an IQ? Would require mandating the provisioning service to subscribe to the things presence and that the thing allowing it.
Involved entities, in particular but not only things, MUST verify the sender of the received messages: Things MUST verify that stanzas send by provisining services have the correct JID set in the 'from' attribute of the stanza.
REQUIRED for protocol specifications.
This document in other formats: XML PDF
This XMPP Extension Protocol is copyright © 1999 – 2020 by the XMPP Standards Foundation (XSF).
Permission is hereby granted, free of charge, to any person obtaining a copy of this specification (the "Specification"), to make use of the Specification without restriction, including without limitation the rights to implement the Specification in a software program, deploy the Specification in a network service, and copy, modify, merge, publish, translate, distribute, sublicense, or sell copies of the Specification, and to permit persons to whom the Specification is furnished to do so, subject to the condition that the foregoing copyright notice and this permission notice shall be included in all copies or substantial portions of the Specification. Unless separate permission is granted, modified works that are redistributed shall not contain misleading information regarding the authors, title, number, or publisher of the Specification, and shall not claim endorsement of the modified works by the authors, any organization or project to which the authors belong, or the XMPP Standards Foundation.
## NOTE WELL: This Specification is provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. ##
In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall the XMPP Standards Foundation or any author of this Specification be liable for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising from, out of, or in connection with the Specification or the implementation, deployment, or other use of the Specification (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if the XMPP Standards Foundation or such author has been advised of the possibility of such damages.
This XMPP Extension Protocol has been contributed in full conformance with the XSF's Intellectual Property Rights Policy (a copy of which can be found at <https://xmpp.org/about/xsf/ipr-policy> or obtained by writing to XMPP Standards Foundation, P.O. Box 787, Parker, CO 80134 USA).
The HTML representation (you are looking at) is maintained by the XSF. It is based on the YAML CSS Framework, which is licensed under the terms of the CC-BY-SA 2.0 license.
The Extensible Messaging and Presence Protocol (XMPP) is defined in the XMPP Core (RFC 6120) and XMPP IM (RFC 6121) specifications contributed by the XMPP Standards Foundation to the Internet Standards Process, which is managed by the Internet Engineering Task Force in accordance with RFC 2026. Any protocol defined in this document has been developed outside the Internet Standards Process and is to be understood as an extension to XMPP rather than as an evolution, development, or modification of XMPP itself.
The primary venue for discussion of XMPP Extension Protocols is the <firstname.lastname@example.org> discussion list.
Discussion on other xmpp.org discussion lists might also be appropriate; see <http://xmpp.org/about/discuss.shtml> for a complete list.
Errata can be sent to <email@example.com>.
The following requirements keywords as used in this document are to be interpreted as described in RFC 2119: "MUST", "SHALL", "REQUIRED"; "MUST NOT", "SHALL NOT"; "SHOULD", "RECOMMENDED"; "SHOULD NOT", "NOT RECOMMENDED"; "MAY", "OPTIONAL".
Note: Older versions of this specification might be available at http://xmpp.org/extensions/attic/