XPL Protocol

Last updated

xPL is an open protocol intended to permit the control and monitoring of home automation devices. The primary design goal of xPL is to provide a rich set of features and functionality, whilst maintaining an elegant, uncomplicated message structure. The protocol includes complete discovery and auto-configuration capabilities which support a fully "plug-n-play" architecture - essential to ensure a good end-user experience.

Contents

xPL benefits from a strongly specified message structure, required to ensure that xPL-enabled devices from different vendors are able to communicate without the risk of incompatibilities. [1]

Communications between xPL applications on a Local Area Network (LAN) use UDP on port 3865. [2]

xPL development has primarily occurred in the DIY community, where users have written connecting software to existing protocols and devices. Some examples include bridges to other home automation protocols like Z-Wave [3] and UPB. [4] Commercially, the Logitech SqueezeCenter software for the Squeezebox supports xPL. [5]

Architecture

Different devices communicate using xPL within a local network. They all broadcast their messages on the IANA registered UDP port 3865 for the other devices to handle.

As on modern operating systems only one program can listen to a given port, there is a need for a hub forwarding the messages to all devices on the same machine. The devices register to the hub on a private UDP port and the hub then forwards all incoming message to these private ports.

HUB

A hub is the first xPL component required on a machine running xPL devices.

All devices send a heartbeat message to the hub on a regular basis (typically 5 minutes). When disconnecting, they also can send a special heartbeat end message for the hub to radiate them out of his list.

The hub forwards all messages to every device in its list. There is no filtering of messages: a blind redistribution of all messages is carried out.

XPL device

Applications add functionality to a home automation solution such as light control, sun rise/set, weather information and so on.

A device chooses a free UDP port and sends heartbeat messages from that port to the hub on the IANA registered UDP port 3865.

From that time, the devices listens for messages on its private port but sends messages as broadcast on the xPL port 3865. The message types are one of the following:

An extensive list of applications can be downloaded from the net. Tooklits are also provided for users wishing to develop their own devices.

Bridge

It is assumed that your network protocol is UDP/IP but this is by no means a requirement. If you wish for your XPL message to cross from one transport medium to another (UDP/IP to RS232 for example) then you will need a Bridge.

Rules

On Windows, xPL HAL processes incoming xPL messages and executes scripts to perform a wide variety of tasks. Configuration is done either through a Windows-based Manager or via a browser. xPL HAL also includes an xPL Configuration Manager.

On Linux or Mac OS, xpl-central monitors all xPL messages and can trigger other messages based on a set of rules stored in an XML file.

Transmission media

The xPL protocol can operate over a variety of transmission media, including Ethernet, RS232 and RS485.

Ethernet

All xPL devices broadcast their messages over UDP, on IANA registered port 3865.

But, as only one application can listen at a time to a given port, the xPL protocol uses a hub to retransmit all broadcast messages to the different applications on the same machine. The applications subscribe to the hub on a free port by sending heartbeat messages which specifies the port they are listening to. In turn, the hub forwards all xPL broadcast messages it receives to every application in his list.

Protocol

Lite on the wire, by design

Example

xPL Messages are line based, with each line ending with a linefeed (ASCII: 10 decimal) character. The following is an example of a typical xPL Message:

xpl-cmnd { hop=1 source=xpl-xplhal.myhouse target=acme-cm12.server } x10.basic { command=dim device=a1 level=75 }

Message Structure

All messages are made out of:

In the header block, the target name is replaced by the wildcard symbol "*" for broadcast messages. This is the case for tigger and status messages.

Message Schema

xPL uses well defined message schemas to ensure that applications from different vendors can interact sensibly. Message Schemas are extensible, and define not only the elements which should be present in a message, but also the order in which they appear.

This allows simple devices and applications to parse messages more easily.

All of the existing message schemas can be found on the xPL project home page. Developers looking to create a new schema are invited to do so. [7]

See also

Related Research Articles

The Dynamic Host Configuration Protocol (DHCP) is a network management protocol used on Internet Protocol (IP) networks for automatically assigning IP addresses and other communication parameters to devices connected to the network using a client–server architecture.

In computer networking, the User Datagram Protocol (UDP) is one of the core communication protocols of the Internet protocol suite used to send messages to other hosts on an Internet Protocol (IP) network. Within an IP network, UDP does not require prior communication to set up communication channels or data paths.

Simple Network Management Protocol (SNMP) is an Internet Standard protocol for collecting and organizing information about managed devices on IP networks and for modifying that information to change device behavior. Devices that typically support SNMP include cable modems, routers, switches, servers, workstations, printers, and more.

<span class="mw-page-title-main">Universal Plug and Play</span> Set of networking protocols

Universal Plug and Play (UPnP) is a set of networking protocols on the Internet Protocol (IP) that permits networked devices, such as personal computers, printers, Internet gateways, Wi-Fi access points and mobile devices, to seamlessly discover each other's presence on the network and establish functional network services. UPnP is intended primarily for residential networks without enterprise-class devices.

The Simple Service Discovery Protocol (SSDP) is a network protocol based on the Internet protocol suite for advertisement and discovery of network services and presence information. It accomplishes this without assistance of server-based configuration mechanisms, such as Dynamic Host Configuration Protocol (DHCP) or Domain Name System (DNS), and without special static configuration of a network host. SSDP is the basis of the discovery protocol of Universal Plug and Play (UPnP) and is intended for use in residential or small office environments. It was formally described in an IETF Internet Draft by Microsoft and Hewlett-Packard in 1999. Although the IETF proposal has since expired, SSDP was incorporated into the UPnP protocol stack, and a description of the final implementation is included in UPnP standards documents.

Modbus or MODBUS is a client/server data communications protocol in the application layer. It was originally published by Modicon in 1979 for use with its programmable logic controllers (PLCs). Modbus has become a de facto standard communication protocol for communication between industrial electronic devices in a wide range of buses and network.

Diameter is an authentication, authorization, and accounting protocol for computer networks. It evolved from the earlier RADIUS protocol. It belongs to the application layer protocols in the Internet protocol suite.

<span class="mw-page-title-main">Logitech Media Server</span> Open-source streaming audio server

Logitech Media Server is a streaming audio server supported by Logitech, developed in particular to support their Squeezebox range of digital audio receivers.

CANopen is a communication protocol and device profile specification for embedded systems used in automation. In terms of the OSI model, CANopen implements the layers above and including the network layer. The CANopen standard consists of an addressing scheme, several small communication protocols and an application layer defined by a device profile. The communication protocols have support for network management, device monitoring and communication between nodes, including a simple transport layer for message segmentation/desegmentation. The lower level protocol implementing the data link and physical layers is usually Controller Area Network (CAN), although devices using some other means of communication can also implement the CANopen device profile.

In computer networking, a port or port number is a number assigned to uniquely identify a connection endpoint and to direct data to a specific service. At the software level, within an operating system, a port is a logical construct that identifies a specific process or a type of network service. A port at the software level is identified for each transport protocol and address combination by the port number assigned to it. The most common transport protocols that use port numbers are the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP); those port numbers are 16-bit unsigned numbers.

OPC Unified Architecture is a cross-platform, open-source, IEC62541 standard for data exchange from sensors to cloud applications developed by the OPC Foundation. Distinguishing characteristics are:

Instrument Neutral Distributed Interface (INDI) is a distributed control system (DCS) protocol to enable control, data acquisition and exchange among hardware devices and software front ends, emphasizing astronomical instrumentation.

A protocol converter is a device used to convert standard or proprietary protocol of one device to the protocol suitable for the other device or tools to achieve the desired interoperability. Protocols are software installed on the routers, which convert the data formats, data rate and protocols of one network into the protocols of the network in which data is navigating. There are varieties of protocols used in different fields like power generation, transmission and distribution, oil and gas, automation, utilities, and remote monitoring applications. The major protocol translation messages involve conversion of data messages, events, commands, and time synchronization.

EtherNet/IP is an industrial network protocol that adapts the Common Industrial Protocol (CIP) to standard Ethernet. EtherNet/IP is one of the leading industrial protocols in the United States and is widely used in a range of industries including factory, hybrid and process. The EtherNet/IP and CIP technologies are managed by ODVA, Inc., a global trade and standards development organization founded in 1995 with over 300 corporate members.

VRPN is a device-independent, network-based interface for accessing virtual reality peripherals in VR applications. It was originally designed and implemented by Russell M. Taylor II at the Department of Computer Science of the University of North Carolina at Chapel Hill. VRPN was maintained and supported by Sensics while it was business. It is currently maintained by ReliaSolve and developed in collaboration with a productive community of contributors. It is described more fully at vrpn.net and in VRPN-VRST.

The Stream Control Transmission Protocol (SCTP) is a computer networking communications protocol in the transport layer of the Internet protocol suite. Originally intended for Signaling System 7 (SS7) message transport in telecommunication, the protocol provides the message-oriented feature of the User Datagram Protocol (UDP), while ensuring reliable, in-sequence transport of messages with congestion control like the Transmission Control Protocol (TCP). Unlike UDP and TCP, the protocol supports multihoming and redundant paths to increase resilience and reliability.

<span class="mw-page-title-main">Very Simple Control Protocol</span> Home automation protocol

The Very Simple Control Protocol (VSCP) is a free automation protocol suitable for all sorts of automation task where building- or home-automation is in the main focus.

The Internet Assigned Numbers Authority (IANA) officially assigned TCP port 4604 to the Identity Registration Protocol (IRP) created by Sixscape Communications, Pte. Ltd. The assignment was issued by IANA on 17 March 2014, and is listed in the official IANA resource registry.

Network Device Interface (NDI) is a software specification developed by the technology company NewTek that enables high-definition video to be delivered, received, and communicated over a computer network in a low-latency, high-quality manner. The specification is royalty-free and allows for frame accurate switching, making it suitable for use in live production environments.

References

  1. "About the Project". The xPL Project Web Site. Retrieved 23 April 2012.
  2. Lansell, Mal. "xPL Primer". xPL Monkey Web Site. Retrieved 23 April 2012.
  3. Lansell, Mal. "xPLMonkey Z-wave Page". xPL Monkey Web Site. Retrieved 23 April 2012.
  4. Duprey, Gerald R Jr (5 July 2008). "UPB4Java V1.2c - Java API for the UPB automation protocol". xPL4Java Web Site. Retrieved 23 April 2012.
  5. "SqueezeboxWiki xPL Page". SqueezeboxWiki. Retrieved 23 April 2012.
  6. "XPL Specification Document". The xPL Project Web Site. 3 August 2011. Retrieved 23 July 2015.
  7. "xPL Project Documentation". The xPL Project Web Site. 3 August 2011. Retrieved 23 July 2015.

Official

Development

Other