<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
     xmlns:atom="http://www.w3.org/2005/Atom"
     xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:wfw="http://wellformedweb.org/CommentAPI/"
     >
  <channel>
    <title>Temporal Anomaly</title>
    <link>http://www.temporalanomaly.com/blog</link>
    <description>Automating our house and other random stuff</description>
    <pubDate>Sun, 08 Jan 2012 15:58:29 GMT</pubDate>
    <generator>Blogofile</generator>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Home Automation Protocols: MQTT</title>
      <link>http://www.temporalanomaly.com/blog/2011/05/02/home-automation-protocols:-mqtt</link>
      <pubDate>Mon, 02 May 2011 20:52:23 BST</pubDate>
      <category><![CDATA[home automation]]></category>
      <category><![CDATA[mqtt]]></category>
      <category><![CDATA[protocols]]></category>
      <guid isPermaLink="true">http://www.temporalanomaly.com/blog/2011/05/02/home-automation-protocols:-mqtt</guid>
      <description>Home Automation Protocols: MQTT</description>
      <content:encoded><![CDATA[<p>In my previous post, I mentioned some of the issues I was experiencing
with my current choice of home automation protocol, <a href="http://xplproject.org.uk/wiki/index.php?title=XPL_Specification_Document">xPL</a>.</p>
<p>The primary issue was the need to perform filtering for every message
on every client due to the use of broadcasts for messaging.  One way
to avoid this is to use a pub/sub messaging system instead.  A number
of people that I respect have been using the <a href="http://mqtt.org/">MQTT Protocol</a> so
I thought I'd take a better look at it.</p>
<p>I figured a good way to understand it would be to implement it.  I've
implemented several protocols from scratch without any documentation
so implementing MQTT from a well-written specification was simple
process.  The basic implementation took less than a week and resulted
in <a href="http://github.com/beanz/net-mqtt-perl">Net::MQTT</a> and <a href="http://github.com/beanz/anyevent-mqtt-perl">AnyEvent::MQTT</a> on CPAN.</p>
<p>The protocol is lightweight and flexible.  This is great.  It works
well in contexts where you are both publisher and subscriber because
you can design the simplest, minimal messaging format between
agents.</p>
<p>However, building communities that can write components that can
interoperate will require some more structure.  For example, using
<a href="http://xplproject.org.uk/wiki/index.php?title=XPL_Specification_Document">xPL</a>, I have a client that monitors messages using the
"<a href="http://xplproject.org.uk/wiki/index.php?title=Schema_-_SENSOR.BASIC">sensor.basic</a>" schema and creates/updates
<a href="http://www.mrtg.org/rrdtool/">round robin database</a> files for each sensor reading.  This works
for all xPL clients that support the "<a href="http://xplproject.org.uk/wiki/index.php?title=Schema_-_SENSOR.BASIC">sensor.basic</a>"
schema regardless of developer/platform/etc.  Another good example of
this kind of protocol layering is <a href="http://xmpp.org/xmpp-protocols/">XMPP</a> and the
<a href="http://xmpp.org/xmpp-protocols/xmpp-extensions/">XMPP Extension Protocols</a>.</p>
<p>Essentially what is required to make this work is an ontology - a
specification for topic usage and semantics.  I have no idea how
to produce such a suitable ontology but I plan to think about it
some more.  I'll probably draw ideas from various existing sources
such as <a href="http://xplproject.org.uk/wiki/index.php?title=XPL_Message_Schema">xPL Message Schema</a>, <a href="http://www.xapautomation.org/index.php?title=Schema">xAP Message Schema</a>, <a href="http://www.pachube.com/">Pachube</a>
feed definitions, etc.</p>
<p>If anyone has any ideas (is it a good idea, how to proceed, etc?) then
I'd love to hear about them.</p>]]></content:encoded>
    </item>
  </channel>
</rss>

