Intuity Lab Session: Making things talk 01 – Controlling lights with your mobile via XMPP

Written by
Matthias Wagler
27 August 2009

Watch it in HD

The goal: Learn how to make things talk

In our ongoing process of analyzing and playing with the Internet of Things we had a deeper look at emerging technologies and trends in this context. In our office In our playground for the new ecology of things we wanted to experience what it means to make things communicate. It started with a couple of questions: How can we make things talk? How can we make them talk to each other? And how can we make this happen in real time? What’s the perfect technology to build or prototype applications for the Internet of Things? And how to let them talk to people. In order to do so we got our hands dirty and started with a simple setup.

XMPP – A real time communication paradigm that might accelerate the internet of things

Recently there’s been some buzz going on around the real time web. Mindmeister and Google Wave are just two examples of services that augment their user experience by offering real time communication. Now for the techy part of the story: XMPP is an open protocol that enables this kind of technology. Originally intended to be an open standard for instant messaging it’s also extensible in all kinds of way. Have a look at “What can you do with XMPP?” to get an idea of what’s possible with it. It’s also the secret sauce behind the Google Wave protocol and the OpenSpime project, an XMPP approach to the new ecology of things. Our lab setup was intended to learn and play with this fascinating emerging technology.

The result: Android phone controlling office lights via XMPP

As a result we’ve setup an OpenFire XMPP Server on a windows machine that serves as a central node and cares about user management. We’ve hooked up a Macbook with a simple Flex client that utilizes the Open Source XMPP Library XIFF and controls a lamp via a PhidgetInterfaceKit and a RelayBoard. This can be seen as a Lamp Controller in our lab setup but could later be any kind of embedded device connected to the web.

Hey I’m a designer why should I care about this stuff?

  • XMPP is different approach than standard web developement. It’s changing the way we architect software environments and might enable new kind of services in the future. As a designer who builds interfaces and shapes communication with these it’s important to know about its possibilities
  • As XMPP is real time, this kind of environment is a good base for distributed installations at fairs or museums. It’s got a user built-in repository so you could also track what your visitors are doing

What did we learn?

  • XMPP is a very flexible base you can build real time services upon
  • XMPP is powered by a very active Open Source community
  • The model behind XMPP (Distributed environment, Presence Services, One-to-one messaging, Service discovery, Multi-party messaging, etc) are also needed in this new IoT environment
  • Making things talk via XMPP is great fun

Standing on the shoulders of giants

As I believe in the Open Source model and the DRY paradigm we managed this lab sesssion with the help of some Open Source components. We wanted to share this knowledge so you can create your own little Spime Network.

  • OpenFire – Java based XMPP Server (Seems like a very stable plattform to build upon. Unfortunately it was very problematic to run it on Mac OS. So try it on Windows XP if you can…)
  • XIFF – Actionscript XMPP  Library (It was quite easy to set up a simple Flex client with the help of XIFF that connects to a server)
  • Strophe – Javascript XMPP Library (You can also check out this quick introduction by Jack Moffit)

To be continued…

Now that we have a basic framework and understanding of XMPP we can further explore related techniques like OpenSpime etc. and make things talk in our office.

The web is your friend – Further readings

Book: XMPP the definitive guide

Tutorial: Connecting to an XMPP Server with the XIFF AS3 Library


13 October 2009

It only ran the first time after installing it. After system reboot it didn't start again, although I had the option checked in the settings. Do you use it on a mac?
12 October 2009

What issues did you have with the Mac OpenFire installation?
15 September 2009

I think he is using imov Messenger for android for this demo...
04 September 2009

I've made something like this some years ago: a modified c jabber client (mcabber) getting messages from a jabberd2 server, and sending them to an heyu process (x10 network)On the other side (the web one), an apache server, sending orders to the jabberd2 server.As this, i've got a html/php page (iphone format, or another) with all the devices in my house, and it works anywhere. I still have some great ideas and improvements about this, but didn't find enough time yet to finish
02 September 2009

@Chris Karr: thankx for the links. I'll have a look at them and will try to contact you when I'm back in the office! I just wanna make it clear that we're not trying to make a final product out of this. It is currently a playground for the technology and a framework that we can use to prototype ideas.@Christian: :-) thankx for the detailed review
02 September 2009

what if that bearded guy stood up off his chair, made one step forward and switched the lamp on himself?
01 September 2009

I'm doing something very similar with my Shion application: me know if you'd like to collaborate so that our respective systems can talk to each other.Also, good work!
31 August 2009

"@Peter: For this quick hack we just used a prebuilt XMPP Client."Which prebuilt client? I have found one on the internet, but wasn't too impressed with it, and it didnt look like the one you are using.Thanks, and awesome hack! I'm going to attempt a similar setup using a Leprechaun Dimmer pack via MIDI.
31 August 2009

@Peter: For this quick hack we just used a prebuilt XMPP Client. But the Smack Library would be my weapon of choice for the next step. It may already be included in the Android OS layer already. But I haven't checked that. But it makes sense as Google will need a solid XMPP Library for bringing Wave to Android phones.
29 August 2009

It's going though so much it makes me think of The big Bang Theory. :p
29 August 2009

hi! great work! i'm working on something very simmilar!could you comment on how you did get a xmpp client on android! is it the smack library or something else? any chance to see the source code?greetings,peter
27 August 2009

Great to see things coming to fly/glow … grow!

Leave a reply

You must be logged in to post a comment.