WebSockets

This project is an evaluation of the WebSocket specification and the WebSocket JavaScript interface, introduced as part of the HTML5 initiative. Our goal is to understand how and where this technology can best can be applied to the Smart Home.

The WebSocket Protocol enables two-way communication between a client (running untrusted code in a controlled environment) to a remote host (that has opted-in to communications from that code). The security model used for this is the origin-based security model commonly used by web browsers.

The protocol consists of an opening handshake followed by basic message framing, layered over TCP. The goal is to provide a mechanism for browser-based applications (e.g. our Smart Home web apps) that need two-way communication with servers (e.g. our Home Control System (HCS)), which does not rely on opening multiple HTTP connections (e.g. XMLHttpRequest or <iframe>s and long polling).

Potential Applications

Natural Langauge Text Interface

When we developed natural language interface, we envisaged it being exposed using a number of different technologies. We mainly use a web interface and an XMPP interface but, we saw the WebSocket 'Echo Test' example as another way to expose this functionality.

HCS Events

Our hybrid technology Home Control System (HCS) uses events to enable components to communicate in near real-time. These are simple text messages (both machine and human readable), typically sent between processes, using socket layer comms. This approach is very close to the WebSocket concept and we plan to expose a WebSocket interface, to allow authenticated elements out on the Internet to communicate with our Home Control System (HCS). This will ensure all elements are reachable and part of the Internet of Things.

Advanced Applications

We plan to get the above applications working before we move on to more advanced applications but these links are worth a look, to see the wider potential of this technology:

Progress

Progress has been good. It is incredibly simple to build a WebSocket server in Java and we now have this runing as a service as part of our core smart home capability.

We have written numerous clients and this technology is now our primary method to test and develop our artificial intelligence (AI) engine.

Share ...
We are on ...
Facebook Twitter
YouTube Flickr Follow us on Pinterest