<?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 Setup: May 2011</title>
      <link>http://www.temporalanomaly.com/blog/2011/05/08/home-automation-setup:-may-2011</link>
      <pubDate>Sun, 08 May 2011 20:20:07 BST</pubDate>
      <category><![CDATA[home automation]]></category>
      <category><![CDATA[backend]]></category>
      <category><![CDATA[xpl]]></category>
      <guid isPermaLink="true">http://www.temporalanomaly.com/blog/2011/05/08/home-automation-setup:-may-2011</guid>
      <description>Home Automation Setup: May 2011</description>
      <content:encoded><![CDATA[<p>I was planning to answer a question in a comment on previous post and
wanted to talk about the number of <a href="http://xplproject.org.uk/wiki/index.php?title=XPL_Specification_Document">xPL</a> clients that I have
running.  Rather than just quoting the number, I thought I'd make a
post to put my response in context.</p>
<p>Most of my xPL components support the <a href="http://xplproject.org.uk/wiki/index.php?title=Schema_-_HBEAT"><code>hbeat</code></a> schema.  So I
can identify them by sending a <code>hbeat.request</code> message.  My perl
<code>xpl-sender</code> command can do this:</p>
<pre><code>bash$ xpl-sender --schema hbeat.request --wait 10
</code></pre>
<p>By default, the sender just sends the specified message and exits.
But, with the <code>--wait</code> parameter, it prepares to receive replies,
sends the message and waits the specified number of seconds for any
replies.  The output from the above command is a summary of each
received <code>hbeat.app</code> reply:</p>
<pre><code>xpl-stat/hbeat.app: bnz-apcups.apc -&gt; * 5/53556/192.168.32.1
xpl-stat/hbeat.app: bnz-blue.slave -&gt; * 5/51540/192.168.32.1
xpl-stat/hbeat.app: bnz-ccost.slave -&gt; * 5/58435/192.168.32.1
xpl-stat/hbeat.app: bnz-dmx.slave -&gt; * 5/44072/192.168.32.1
xpl-stat/hbeat.app: bnz-gpower.slave -&gt; * 5/59772/192.168.32.1
xpl-stat/hbeat.app: bnz-heyu.slave -&gt; * 5/56009/192.168.32.1
xpl-stat/hbeat.app: bnz-lcdproc.slave -&gt; * 5/41722/192.168.32.1
xpl-stat/hbeat.app: bnz-linux.slave -&gt; * 5/46917/192.168.32.1
xpl-stat/hbeat.app: bnz-lirc.slave -&gt; * 5/33992/192.168.32.1
xpl-stat/hbeat.app: bnz-mpd.slave -&gt; * 5/32798/192.168.32.1
xpl-stat/hbeat.app: bnz-ownet.slave -&gt; * 5/46631/192.168.32.1
xpl-stat/hbeat.app: bnz-rfxcomrx.slave -&gt; * 5/40448/192.168.32.1
xpl-stat/hbeat.app: bnz-rfxcomtx.slave -&gt; * 5/48635/192.168.32.1
xpl-stat/hbeat.app: bnz-sendsms.slave -&gt; * 5/47592/192.168.32.1
xpl-stat/hbeat.app: bnz-smart.slave -&gt; * 5/43472/192.168.32.1
xpl-stat/hbeat.app: bnz-udin.slave1 -&gt; * 5/50553/192.168.32.1
xpl-stat/hbeat.app: bnz-udin.slave2 -&gt; * 5/52187/192.168.32.1
xpl-stat/hbeat.app: bnz-wol.slave -&gt; * 5/33981/192.168.32.1
xpl-stat/hbeat.app: bnz-zenah.slave -&gt; * 5/39324/192.168.32.1
xpl-stat/hbeat.app: bnz-mythtv.vz -&gt; * 5/34473/192.168.32.6
xpl-stat/hbeat.app: bnz-smart.vz -&gt; * 5/34298/192.168.32.6
xpl-stat/hbeat.app: bnz-xosd.vz -&gt; * 5/34487/192.168.32.6
xpl-stat/hbeat.app: bnz-xvkbd.vz -&gt; * 5/49051/192.168.32.6
</code></pre>
<p>Each summary is of the form:</p>
<pre><code>message_type/schema: source-identifier -&gt; target interval/port/ip
</code></pre>
<p>and each source-identifier is of the form:</p>
<pre><code>vendorid-deviceid.instanceid
</code></pre>
<p>My vendor id (developer id) is <code>bnz</code>, the device id is typically the
type of the device being managed, and the instance id is typically the
hostname of the machine running the client.</p>
<p>There are two machines in the list <code>vz</code> (which is my main <a href="http://www.mythtv.org/">mythtv</a>
box) and <a href="http://en.wikipedia.org/wiki/Scorpio_(Blake&apos;s_7)"><code>slave</code></a> (which is the main home automation server).
(The observant may notice that there is also <code>apc</code> but that is
actually running on <code>slave</code> monitoring an <a href="http://www.amazon.co.uk/gp/product/B002EB1FNO?tag=temporalanoma-21">APC UPS</a> via USB but the
instance id is changed as a convinience in order to distinguish
between <code>slave</code> and the UPS as they both report power/battery
information.)  The clients on the <a href="http://www.mythtv.org/">mythtv</a> box are:</p>
<ul>
<li>
<p><code>xpl-mythtv</code> which reports the percentage utilisation of the video
  inputs/tuners,</p>
</li>
<li>
<p><code>xpl-smart</code> which reports disk temperatures so I can turn on fans to
  extract warm air from the server room,</p>
</li>
<li>
<p><code>xpl-xosd</code> which responds to <a href="http://xplproject.org.uk/wiki/index.php?title=Schema_-_OSD.BASIC"><code>osd.basic</code> schema</a> messages
  showing on-screen display text using <a href="http://libxosd.sf.net">xosd</a>, and</p>
</li>
<li>
<p><code>xpl-xvkbd</code> which sends fake key presses to the active window
  (probably a security risk even though the keys always go to
  mythfrontend).</p>
</li>
</ul>
<p>The clients on <code>slave</code> are:</p>
<ul>
<li>
<p><code>xpl-apcups</code> which reports status of my APC UPS and sends events if
  when the UPS switches between mains and battery and vice versa,</p>
</li>
<li>
<p><code>xpl-blue</code> which monitors for the presence of various bluetooth
  devices so that my house "knows" when different people are home,</p>
</li>
<li>
<p><code>xpl-ccost</code> which monitors my mains power usage (or at least it did
  until it got confusing when I started exporting power) and the solar
  power generated by the PV panels on my roof,</p>
</li>
<li>
<p><code>xpl-dmx</code> which sends commands to a
  <a href="http://www.amazon.co.uk/gp/product/9792347860?tag=temporalanoma-21">Milford Instruments DMX Transmitter</a> to control a
  <a href="http://www.pulsarlight.com/Products/LEDLighting/ChromaZone/tabid/57/Default.aspx">Pulsar ChromaZone 12 Controller</a> which in turn drives a
  number of <a href="http://www.pulsarlight.com/Products/LEDLighting/tabid/56/Default.aspx">ChromaRange</a> lamps,</p>
</li>
<li>
<p><code>xpl-gpower</code> which reports my power usage information into the
  <a href="http://code.google.com/apis/powermeter/">Google PowerMeter API</a>,</p>
</li>
<li>
<p><code>xpl-heyu</code> which uses the <a href="http://www.heyu.org/">heyu</a> X10 software control my mains
  appliances and lights,</p>
</li>
<li>
<p><code>xpl-jabber</code> which enables interaction via <a href="http://xmpp.org/">XMPP</a> instant messages
  (such as Google Talk),</p>
</li>
<li>
<p><code>xpl-lcdproc</code> which responds to <a href="http://xplproject.org.uk/wiki/index.php?title=Schema_-_OSD.BASIC"><code>osd.basic</code> schema</a>
  messages showing text on a <a href="http://www.mini-box.com/picoLCD-4x20-sideshow">picoLCD-4x20-slideshow</a> device
  using the [lcdproc][] protocol,</p>
</li>
<li>
<p><code>xpl-linux</code> which reports Linux battery status and events, system
  temperature, etc.,</p>
</li>
<li>
<p><code>xpl-lirc</code> which reports <a href="http://www.lirc.org/">LIRC</a> IR remote button presses (so that
  I can switch the kettle on or send wake-on-lan packets using a basic
  TV remote control),</p>
</li>
<li>
<p><code>xpl-mpd</code> which controls a <a href="http://musicpd.sf.net/">Music Player Daemon</a> to play music
  in several zones around the house,</p>
</li>
<li>
<p><code>xpl-ownet</code> which is an interface to an <a href="http://www.owfs.org/">OWFS Daemon</a> that
  reads from temperature/humidity sensors and writes to relay
  controllers on the one-wire network in my house,</p>
</li>
<li>
<p><code>xpl-rfxcomrx</code> which is an interface to an <a href="http://rfxcom.com/receivers.htm">RFXCOM RF Receiver</a>
  that reports RF messages received from various sensors, switches,
  etc.,</p>
</li>
<li>
<p><code>xpl-rfxcomtx</code> which sends RF messages via an
  <a href="http://www.rfxcom.com/transmitters.htm">RFXCOM RF Transmitter</a> to control X10, HomeEasy, etc. devices,</p>
</li>
<li>
<p><code>xpl-sendsms</code> which sends SMS messages via any service supported by
   the <a href="http://search.cpan.org/search?query=sms::send">SMS::Send Perl API</a> (I use the service from
   <a href="http://www.csoft.co.uk/">Connection Software</a>),</p>
</li>
<li>
<p><code>xpl-smart</code> which reports disk temperatures,</p>
</li>
<li>
<p>two instances of <code>xpl-udin</code> to control two
  <a href="http://www.audon.co.uk/udin.html">UDIN USB Relay Controllers</a> to momentarily pulse the open/close
  inputs of several blind and curtains,</p>
</li>
<li>
<p><code>xpl-wol</code> which sends wake-on-lan packets (using the <code>etherwake</code>
  command) to wake up devices that are shutdown in order to save power
  (such as my <a href="http://www.mythtv.org/">mythtv</a> box), and</p>
</li>
<li>
<p><code>zenah</code> which is the brains of my house - triggering actions based
  on timers and incoming xPL messages.</p>
</li>
</ul>
<p>I am also running several other clients that run in <code>stealth mode</code> -
that is only sending messages and not listening for or responding to
<code>hbeat.request</code> messages.  These "inputs" include:</p>
<ul>
<li>
<p>a web frontend,</p>
</li>
<li>
<p>an experimental daemon supporting the <a href="http://melloware.com/products/lightswitch/">lightswitch</a> API so that I
  can use existing Android (or iPhone) applications to control my
  house, and</p>
</li>
<li>
<p>some security-related inputs (that I wont be writing much about).</p>
</li>
</ul>
<p>I'm currently trying to refactor the code to separate out the
device-related code from the xPL code and to reduce the coupling
between the web interface and the <code>zenah</code> "brains".  This will
probably involve a couple re-write of the <code>zenah</code> component and the
web interface.</p>]]></content:encoded>
    </item>
    <item>
      <title>Rackmount ITX</title>
      <link>http://www.temporalanomaly.com/blog/2005/06/30/rackmount-itx</link>
      <pubDate>Thu, 30 Jun 2005 20:00:00 BST</pubDate>
      <category><![CDATA[home automation]]></category>
      <category><![CDATA[backend]]></category>
      <guid isPermaLink="true">http://www.temporalanomaly.com/blog/2005/06/30/rackmount-itx</guid>
      <description>Rackmount ITX</description>
      <content:encoded><![CDATA[<p>This is going to be the heart (or maybe that should be brain) of our
automated home.</p>
<p><a href="/blog/images/rack-itx.png"><img alt="ITX Inside" src="/blog/images/t/rack-itx.png" /></a></p>
<p>At the moment it's named "slave" after a computer from <a href="http://en.wikipedia.org/wiki/Blake&apos;s_Seven">Blake's
Seven</a>. If it works out
well enough we might rename it "Orac" or "Zen".</p>
<p>I'm hoping there is enough space in there to fit in a PCI serial card
and hide the VIOM in some of the spare space.</p>]]></content:encoded>
    </item>
    <item>
      <title>More jabber bots</title>
      <link>http://www.temporalanomaly.com/blog/2005/06/23/more-jabber-bots</link>
      <pubDate>Thu, 23 Jun 2005 18:00:00 BST</pubDate>
      <category><![CDATA[home automation]]></category>
      <category><![CDATA[backend]]></category>
      <guid isPermaLink="true">http://www.temporalanomaly.com/blog/2005/06/23/more-jabber-bots</guid>
      <description>More jabber bots</description>
      <content:encoded><![CDATA[<p>I spent a little time coding a Perl module to hide the details of
bots. Had a little trouble with the Net::Jabber modules because I
couldn't find the XML stream socket to add to the select loop of the
new module. I might email the author of the Net::Jabber modules to ask
about this.</p>
<p>After converting the two existing modules, I decided to take a look
writing a temperature monitor using the Dallas 1-Wire stuff, that I'd
been trying to find time to look at for a few days. Fortunately Debian
includes the <a href="http://www.digitemp.com/">digitemp</a> package so it didn't
take long to get this working. The only problem was that it was
worryingly hot in my computer room thanks to the current unusually hot
summer weather.</p>
<p>While I'd been busy coding, I'd not noticed the problems with our ADSL
link going up and down every thirty seconds. So I decided to write a
monitor for the network interfaces on my firewall too. That took only
a few minutes which means the modules I wrote are already helping.</p>]]></content:encoded>
    </item>
    <item>
      <title>Jabber!</title>
      <link>http://www.temporalanomaly.com/blog/2005/06/21/jabber!</link>
      <pubDate>Tue, 21 Jun 2005 22:00:00 BST</pubDate>
      <category><![CDATA[home automation]]></category>
      <category><![CDATA[backend]]></category>
      <guid isPermaLink="true">http://www.temporalanomaly.com/blog/2005/06/21/jabber!</guid>
      <description>Jabber!</description>
      <content:encoded><![CDATA[<p>I looked at <a href="http://www.spread.org/">spread</a>, but I was getting too many errors from the Perl
API. So for now I'm going to use Jabber clients for the messaging
infrastructure.</p>
<p>I wrote two simple clients using the Net::Jabber perl modules. The
first was for X10, that reports events and will take commands, and
then a second for caller id, that will report calls/rings and will
accept commands to send to the modem. These thumbnails link to genuine
screenshots - edited only to remove my mobile number.</p>
<p><a href="/blog/images/x10-raw.png"><img alt="X10 Chat Window" src="/blog/images/t/x10-raw.png" /></a>
<a href="/blog/images/callerid.png"><img alt="Caller Id Chat Window" src="/blog/images/t/callerid.png" /></a></p>]]></content:encoded>
    </item>
  </channel>
</rss>

