<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>killswtch.net &#187; Software</title>
	<atom:link href="http://www.killswtch.net/category/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.killswtch.net</link>
	<description>A geek's thoughts on various stuff</description>
	<lastBuildDate>Mon, 17 May 2010 20:58:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Power monitoring with CurrentCost</title>
		<link>http://www.killswtch.net/2009/01/03/power-monitoring-with-currentcost/</link>
		<comments>http://www.killswtch.net/2009/01/03/power-monitoring-with-currentcost/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 14:45:20 +0000</pubDate>
		<dc:creator>killswtch</dc:creator>
				<category><![CDATA[Geeky]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Source Code]]></category>
		<category><![CDATA[currentcost]]></category>
		<category><![CDATA[electricity]]></category>

		<guid isPermaLink="false">http://www.killswtch.net/?p=341</guid>
		<description><![CDATA[
The CurrentCost power monitor has become very popular amongst amateur home automators and those technically-savvy who want to keep an eye on how much electricity they are using (and ultimately how much they are going to have to pay in bills). A couple of months ago I purchased the CurrentCost device and a USB cable [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-346" title="CurrentCost monitor" src="http://www.killswtch.net/wp-content/uploads/img_3607.jpg" alt="CurrentCost monitor" width="420" height="315" /></p>
<p>The <a href="http://www.currentcost.co.uk/" onclick="javascript:urchinTracker ('/outbound/article/www.currentcost.co.uk');">CurrentCost power monitor</a> has become very popular amongst amateur home automators and those technically-savvy who want to keep an eye on how much electricity they are using (and ultimately how much they are going to have to pay in bills). A couple of months ago I purchased the CurrentCost device and a USB cable to connect it to a computer <a href="http://stores.ebay.co.uk/Current-Cost-Ltd" onclick="javascript:urchinTracker ('/outbound/article/stores.ebay.co.uk');">from eBay</a>. Having just seen their eBay store, it looks like they&#8217;ve got a fantastic new model on the way, but this article is about the older version.</p>
<p><span id="more-341"></span></p>
<p>By itself the device works very well, providing an at-a-glance view of current power use and a history over several periods of time. There is a simple bar chart showing the relative amounts of power used in the previous day, split into day time, evening and night. However if you want a clearer understanding of how power use changes day-to-day or even over a decade, connecting the device to a computer will provide the ability to store every reading in a database and/or produce live graphs of usage.</p>
<p><a href="http://andypiper.wordpress.com/2008/04/27/current-cost/" onclick="javascript:urchinTracker ('/outbound/article/andypiper.wordpress.com');">Several</a> <a href="http://gibbalog.blogspot.com/2008/07/graphing-current-cost.html" onclick="javascript:urchinTracker ('/outbound/article/gibbalog.blogspot.com');">people</a> <a href="http://rooreynolds.com/2008/05/09/current-cost-charting-fun/" onclick="javascript:urchinTracker ('/outbound/article/rooreynolds.com');">have</a> <a href="http://knolleary.net/2008/05/05/power-graphing/" onclick="javascript:urchinTracker ('/outbound/article/knolleary.net');">written</a> articles on how to do the logging, each using a slightly different method (and language) to do so. Most of them are for linux though, but any programmer should be able to port the ideas across to a different platform such as Windows or Mac OS. For my implementation, I followed <a href="http://www.jibble.org/currentcost/" onclick="javascript:urchinTracker ('/outbound/article/www.jibble.org');">this guide on jibble.org</a>.</p>
<p>This is what my perl script turned out like:</p>
<pre>#!/usr/bin/perl -w
# Reads data from a Current Cost device via serial port.

use strict;
use Device::SerialPort qw( <img src='http://www.killswtch.net/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ARAM :STAT 0.07 );

my $PORT = "/dev/ttyUSB1";
my $ob = Device::SerialPort-&gt;new($PORT);

$ob-&gt;baudrate(9600);
$ob-&gt;write_settings;

open(SERIAL, "+&gt;$PORT");
while (my $line = &lt;SERIAL&gt;) {
    if ($line =~ m!&lt;ch1&gt;&lt;watts&gt;0*(\d+)&lt;/watts&gt;&lt;/ch1&gt;.*&lt;tmpr&gt;([\d.]+)&lt;/tmpr&gt;!) {
        my $watts = $1;
        my $temp = $2;
        print `/usr/bin/rrdtool update /var/scripts/currentcost/powertemp.rrd N:$watts:$temp`
    }
}</pre>
<p>Note that because I&#8217;m connecting via a USB port, the serial port name is different. The baud is also 9600 rather than 2800. I have set this script to run at startup (detatched from the console) so that it is always running in the background.</p>
<p>I have also produced another simple script, which is run every minute as a cron job.  The script generates the graphs from the data stored in the RRD file, and uploads them to my web server via SSH.</p>
<pre>#!/bin/sh

rrdtool graph /var/scripts/currentcost/power-10min.png --start end-10m --width 323 --end now --slope-mode --no-legend --vertical-label Watts --lower-limit 0 --alt-autoscale-max DEF:Power=/var/scripts/currentcost/powertemp.rrd:Power:AVERAGE LINE1:Power#0000FF:"Average" &gt; /dev/null
rrdtool graph /var/scripts/currentcost/power-60min.png --start end-60m --width 323 --end now --slope-mode --no-legend --vertical-label Watts --lower-limit 0 --alt-autoscale-max DEF:Power=/var/scripts/currentcost/powertemp.rrd:Power:AVERAGE LINE1:Power#0000FF:"Average" &gt; /dev/null
rrdtool graph /var/scripts/currentcost/power-day.png --start end-24h --width 323 --end now --slope-mode --no-legend --vertical-label Watts --lower-limit 0 --alt-autoscale-max DEF:Power=/var/scripts/currentcost/powertemp.rrd:Power:AVERAGE LINE1:Power#0000FF:"Average" &gt; /dev/null
rrdtool graph /var/scripts/currentcost/power-week.png --start end-1weeks --width 323 --end now --slope-mode --no-legend --vertical-label Watts --lower-limit 0 --alt-autoscale-max DEF:Power=/var/scripts/currentcost/powertemp.rrd:Power:AVERAGE LINE1:Power#0000FF:"Average" &gt; /dev/null
rrdtool graph /var/scripts/currentcost/power-month.png --start end-1months --width 323 --end now --slope-mode --no-legend --vertical-label Watts --lower-limit 0 --alt-autoscale-max DEF:Power=/var/scripts/currentcost/powertemp.rrd:Power:AVERAGE LINE1:Power#0000FF:"Average" &gt; /dev/null
rrdtool graph /var/scripts/currentcost/power-year.png --start end-1years --width 323 --end now --slope-mode --no-legend --vertical-label Watts --lower-limit 0 --alt-autoscale-max DEF:Power=/var/scripts/currentcost/powertemp.rrd:Power:AVERAGE LINE1:Power#0000FF:"Average" &gt; /dev/null

#Copy locally
cp /var/scripts/currentcost/*.png /var/www/currentcost/

#Upload to mars
/usr/bin/scp /var/scripts/currentcost/*.png root@192.168.2.3:/var/www/vhosts/currentcost.elemental.killswtch.net</pre>
<p>You can see the result on the <a href="/power/">Power</a> page of this site. The graphs at the moment are fairly basic. The Jibble article includes some extra data in the graphs, which I will probably add at some point. For the moment though it does the job very well.</p>
<p><img class="aligncenter size-full wp-image-347" title="img_3599" src="http://www.killswtch.net/wp-content/uploads/img_3599.jpg" alt="img_3599" width="420" height="315" /></p>
<p>The CC device is located downstairs, in the living room. Thanks to the serial output connector being an RJ45 socket, it was very easy to plug it into the exising CAT5 network (which I&#8217;m very glad I did) and run the signal to the cabinet in my room where it is then broken out through the RJ45 patch panel, through the RS232/USB cable and into the fileserver <em>boron</em>, which hosts the scripts.</p>
<p><img class="aligncenter size-full wp-image-348" title="USB cable" src="http://www.killswtch.net/wp-content/uploads/img_3601.jpg" alt="USB cable" width="420" height="315" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.killswtch.net/2009/01/03/power-monitoring-with-currentcost/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Source code for the VAMS-0808 serial interface</title>
		<link>http://www.killswtch.net/2008/08/23/source-code-for-the-vams-0808-serial-interface/</link>
		<comments>http://www.killswtch.net/2008/08/23/source-code-for-the-vams-0808-serial-interface/#comments</comments>
		<pubDate>Sat, 23 Aug 2008 07:13:24 +0000</pubDate>
		<dc:creator>killswtch</dc:creator>
				<category><![CDATA[A/V]]></category>
		<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://www.killswtch.net/?p=312</guid>
		<description><![CDATA[As promised, here&#8217;s the source code for my VAMS-0808 interface. It&#8217;s in C#, with C# projects included, and can be opened in Visual C# Express or full Visual Studio 2005 or greater. There are two test projects included &#8211; one which just writes status changes out to the console, and a WinForms project (which runs [...]]]></description>
			<content:encoded><![CDATA[<p>As promised, here&#8217;s the <a href="http://www.killswtch.net/files/HALibs.VAMS0808.zip" >source code for my VAMS-0808 interface</a>. It&#8217;s in C#, with C# projects included, and can be opened in Visual C# Express or full Visual Studio 2005 or greater. There are two test projects included &#8211; one which just writes status changes out to the console, and a WinForms project (which runs in mono) for full interaction.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killswtch.net/2008/08/23/source-code-for-the-vams-0808-serial-interface/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Whole House Audio system: version 1 is complete</title>
		<link>http://www.killswtch.net/2008/07/14/whole-house-audio-system-version-1-is-complete/</link>
		<comments>http://www.killswtch.net/2008/07/14/whole-house-audio-system-version-1-is-complete/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 18:11:52 +0000</pubDate>
		<dc:creator>killswtch</dc:creator>
				<category><![CDATA[A/V]]></category>
		<category><![CDATA[Geeky]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.killswtch.net/?p=303</guid>
		<description><![CDATA[
Over a year after it began, the whole-house-audio project is complete. 4 rooms around the house can now be filled with the sound of any of (currently) 4 audio devices thanks to a mixture of hardware and software.
The project had a slightly rocky start, with a prototype not functioning at all and partly destroyed amplifier [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.killswtch.net/wp-content/uploads/img_2717.jpg" ><img class="alignnone size-medium wp-image-304" title="Audio sources" src="http://www.killswtch.net/wp-content/uploads/img_2717-420x315.jpg" alt="" width="420" height="315" /></a></p>
<p>Over a year after it began, the whole-house-audio project is complete. 4 rooms around the house can now be filled with the sound of any of (currently) 4 audio devices thanks to a mixture of hardware and software.</p>
<p><span id="more-303"></span>The project had a slightly rocky start, with a <a href="http://www.killswtch.net/2007/11/27/audio-distribution-system-phase-1-the-prototype/" >prototype</a> not functioning at all and <a href="http://www.killswtch.net/2007/12/02/back-to-the-drawing-board/" >partly destroyed amplifier</a> (which was thankfully <a href="http://www.killswtch.net/2007/12/08/resurrecting-a-dead-amplifier/" >fixable</a> by replacing a <a href="http://www.killswtch.net/2008/01/15/resurrecting-a-dead-amplifier-the-continuation/" >couple of components</a>). A <a href="http://www.killswtch.net/2007/12/06/software-based-matrix-switcher/" >software alternative</a> was considered at one point, to avoid too much expensive hardware. The hardware solution proved to be less complex and more likely to work.</p>
<p><a href="http://www.killswtch.net/wp-content/uploads/img_23291.jpg" ><img class="alignnone size-medium wp-image-305" title="Dining room speakers" src="http://www.killswtch.net/wp-content/uploads/img_23291-420x315.jpg" alt="" width="420" height="315" /></a></p>
<p>The living room, <a href="http://www.killswtch.net/2008/06/18/dining-room-speakers/" >dining room</a>, <a href="http://www.killswtch.net/2008/06/15/kitchen-speakers/" >kitchen</a> and master bedroom are host to a pair of speakers each, connected to matching <a href="http://www.killswtch.net/2008/06/15/last-of-the-amplifiers/" >240W rack-mounted amplifiers</a> housed in my <a href="http://www.killswtch.net/2007/11/11/my-diy-19-rack/" >home-made full-height 19&#8243; rack cabinet</a>. The cables that carry the audio signals to the speakers were <a href="http://www.killswtch.net/2007/11/28/wiring-the-house/" >installed</a> along with 24 runs of CAT5 before moving into the house.</p>
<p><a href="http://www.killswtch.net/wp-content/uploads/dscf0050.jpg" ><img class="alignnone size-medium wp-image-310" title="Cabling" src="http://www.killswtch.net/wp-content/uploads/dscf0050-420x315.jpg" alt="" width="420" height="315" /></a></p>
<p><a href="http://www.killswtch.net/wp-content/uploads/img_22201.jpg" ><img class="alignnone size-medium wp-image-311" title="Amplifiers" src="http://www.killswtch.net/wp-content/uploads/img_22201-420x315.jpg" alt="" width="420" height="315" /></a></p>
<p>The audio is routed to the amplifiers via an 8&#215;8 <a href="http://www.killswtch.net/2008/02/17/the-vams-0808-matrix-switcher-and-determining-its-protocol/" >VAMS-0808 AV matrix switcher</a>, which allows the 8 outputs to take their inputs from any of the 8 available sources. Only 4 of each are currently in use, so there&#8217;s plenty of room for expansion.</p>
<p><a href="http://www.killswtch.net/wp-content/uploads/img_1737.jpg" ><img class="alignnone size-medium wp-image-308" title="Matrix switcher status display" src="http://www.killswtch.net/wp-content/uploads/img_1737-420x315.jpg" alt="" width="420" height="315" /></a></p>
<p><a href="http://www.killswtch.net/wp-content/uploads/img_1738.jpg" ><img class="alignnone size-medium wp-image-309" title="Matrix switcher control panel" src="http://www.killswtch.net/wp-content/uploads/img_1738-420x315.jpg" alt="" width="420" height="315" /></a></p>
<p>4 audio sources are connected via simple <a href="http://www.killswtch.net/2008/05/07/successful-test-of-audio-over-cat5/" >custom-altered CAT5 cables</a>, which simply transmit line-level signals over the <a href="http://www.killswtch.net/2008/05/05/completing-the-data-wiring/" >existing twisted pair infrastructure</a> installed in the house. These sources are currently the DAB radio in the kitchen, the TV in the living room, the computer in the dining room (for playing CDs) and a second DAB radio in the master bedroom.</p>
<p><a href="http://www.killswtch.net/wp-content/uploads/img_2699.jpg" ><img class="alignnone size-medium wp-image-306" title="Green cables for audio" src="http://www.killswtch.net/wp-content/uploads/img_2699-420x315.jpg" alt="" width="420" height="315" /></a></p>
<p><a href="http://www.killswtch.net/wp-content/uploads/img_2369.jpg" ><img class="alignnone size-medium wp-image-307" title="Stereo jack to RJ45" src="http://www.killswtch.net/wp-content/uploads/img_2369-420x315.jpg" alt="" width="420" height="315" /></a></p>
<p>I&#8217;ve written the software to control it all using .Net (C# of course), running on <a href="http://www.mono-project.com/" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/www.mono-project.com');">mono</a> on linux. There are four components to this:</p>
<ol>
<li>To control the matrix switcher, I have written a library which communicates with the <a href="http://www.killswtch.net/2008/03/15/the-vams-0808-matrix-switcher-and-determining-its-protocol-part-2/" >VAMS-0808 via an RS232 serial connection</a>. The software can perform any of the operations that can be performed via the front panel of the device, apart from switching power on and off.</li>
<li>The amplifiers are connected to an APC AP9212 MasterSwitch Power Distribution Unit which was bought with this project in mind. Controlling this is slightly less straightforward and not quite as elegant. The library that I&#8217;ve written for this communicates through the telnet interface of the MasterSwitch to turn devices on and off.</li>
<li>Combining these two libraries is a simple web server which presents an equally simple XML-based web service. The service allows room inputs to be changed and switches the amplifiers on and off as necessary. This runs on a low-power disk-less computer running <a href="http://www.ubuntu.com/" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/www.ubuntu.com');">Ubuntu</a>, hidden within the rack cabinet.</li>
<li>A touchscreen web interface acts as a front-end to the entire system. The simple menu system uses iUi for a clean touchscreen-friendly design. As with the web server this runs on a <a href="http://www.killswtch.net/2008/07/10/sff-pcs/" >low-power machine</a>, although this one has a small hard disk and runs Windows due to technical issues with the touchscreen.</li>
</ol>
<p>There is currently just the one controller front-end, located in the dining room. To listen to the kitchen radio, for example, all that is necessary is to select the &#8216;Kitchen DAB Radio&#8217; option from the main menu, then select which of the 4 rooms to play it through &#8211; or all of them if you are going to be wondering around most of the house.</p>
<h2>Future extensions</h2>
<p>Thanks to building the web interface with <a href="http://code.google.com/p/iui/" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/code.google.com');">iUi</a>, the system is compatible with the <a href="http://www.killswtch.net/2007/12/09/ipod-remote-control-interface-mockups/" >iPod Touch and iPhone</a>, so they can instantly act as <a href="http://www.killswtch.net/2007/12/06/using-an-ipod-as-a-remote/" >frontends</a> for audio control. A second fixed controller may be added in the master bedroom in time, if there&#8217;s enough money available. Each front-end costs about Â£200 in hardware, depending on what bargains can be found on eBay.</p>
<p>The matrix switcher supports both audio and video. Only the audio channels are used at the moment, so there is the very real possibility of using the remaining 4 output zones to connect to TVs around the house and adding some AV sources. This way it&#8217;s instantly converted into a whole-house-AV system. The video signals can be carried over the twisted pair CAT5 cables like the audio, but will require a little more hardware to preserve quality. This <a href="http://www.kat5.tv/products.html" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/www.kat5.tv');">hardware</a> is <a href="http://www.keene.co.uk/electronics/multi.php?mycode=C5QDA" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/www.keene.co.uk');">relatively expensive</a>, although savings can be made by building the equivalents by hand. Following the tradition of this project, that&#8217;s probably what I&#8217;ll do. I have done it before while I was at university and it works beautifully.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killswtch.net/2008/07/14/whole-house-audio-system-version-1-is-complete/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>SFF PCs</title>
		<link>http://www.killswtch.net/2008/07/10/sff-pcs/</link>
		<comments>http://www.killswtch.net/2008/07/10/sff-pcs/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 19:06:06 +0000</pubDate>
		<dc:creator>killswtch</dc:creator>
				<category><![CDATA[A/V]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.killswtch.net/?p=258</guid>
		<description><![CDATA[
The audio system that I&#8217;m building requires 2 low-power computers: 1 for the touchscreen controller (not using an iPod Touch for the moment) and 1 to act as a webserver and serial-console server.
Once again eBay has come to the rescue, and by searching for &#8216;geode&#8217; &#8211; a low-power processor for Thin Clients &#38; Small Form [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.killswtch.net/wp-content/uploads/img_2380.jpg" ><img class="alignnone size-medium wp-image-259" title="SFF PCs" src="http://www.killswtch.net/wp-content/uploads/img_2380-420x315.jpg" alt="" width="420" height="315" /></a></p>
<p>The audio system that I&#8217;m building requires 2 low-power computers: 1 for the touchscreen controller (not using an iPod Touch for the moment) and 1 to act as a webserver and serial-console server.</p>
<p>Once again eBay has come to the rescue, and by searching for &#8216;geode&#8217; &#8211; a low-power processor for Thin Clients &amp; Small Form Factor (SFF) PCs &#8211; I found the 2 machines that I needed. These are the specs:</p>
<p><strong>magnesium </strong>(the black one)<strong><br />
</strong></p>
<ul>
<li>800 MHz Geode</li>
<li>256 MB RAM</li>
<li>6 GB CF drive</li>
<li>Onboard graphics, audio, serial, parallel, USB &amp; 10/100 ethernet</li>
</ul>
<p>£70 + P&amp;P</p>
<p><strong>potassium </strong>(the grey one)<strong><br />
</strong></p>
<ul>
<li>300 MHz Geode</li>
<li>256 MB RAM</li>
<li>6 GB 2.5&#8243; IDE drive</li>
<li>Onboard graphics, audio, serial x2, parallel, USB &amp; 10/100 ethernet</li>
</ul>
<p>£35 + P&amp;P</p>
<p><span id="more-258"></span>Magnesium is used as the client machine, and potassium runs a custom-made webserver and the control software for the <a href="http://www.killswtch.net/2008/03/15/the-vams-0808-matrix-switcher-and-determining-its-protocol-part-2/" >VAMS-0808 Matrix Switcher</a>.</p>
<p><a href="http://www.killswtch.net/wp-content/uploads/img_2382.jpg" ><img class="alignnone size-medium wp-image-260" title="Puppy linux" src="http://www.killswtch.net/wp-content/uploads/img_2382-420x315.jpg" alt="" width="420" height="315" /></a></p>
<p>Both came pre-installed with <a href="http://www.puppylinux.org/" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/www.puppylinux.org');">Puppy Linux</a>, a lightweight distribution designed for low-power machines such as these. It runs surprisingly quickly, but to make it easier for me to maintain I decided to install Ubuntu.</p>
<p><a href="http://www.killswtch.net/wp-content/uploads/img_2385.jpg" ><img class="alignnone size-medium wp-image-261" title="Installing Ubuntu" src="http://www.killswtch.net/wp-content/uploads/img_2385-420x315.jpg" alt="" width="420" height="315" /></a></p>
<p>On such slow computers it took many hours to get Ubuntu installed on magnesium alone. I initially installed to the CF drive that came with the machine. However I found it to be quite slow, so I followed <a href="http://developer.novell.com/wiki/index.php/HOWTO:_Convert_Ubuntu_to_Diskless" target="_blank" onclick="javascript:urchinTracker ('/outbound/article/developer.novell.com');">a guide for running Ubuntu via network boot</a> and removed the CF disk. I did the same for potassium. Both booted off of the fileserver, boron.</p>
<p><a href="http://www.killswtch.net/wp-content/uploads/img_2387.jpg" ><img class="alignnone size-medium wp-image-262" title="Crash" src="http://www.killswtch.net/wp-content/uploads/img_2387-420x315.jpg" alt="" width="420" height="315" /></a></p>
<p><a href="http://www.killswtch.net/wp-content/uploads/img_2390.jpg" ><img class="alignnone size-medium wp-image-263" title="Inside potassium" src="http://www.killswtch.net/wp-content/uploads/img_2390-420x315.jpg" alt="" width="420" height="315" /></a></p>
<p><a href="http://www.killswtch.net/wp-content/uploads/img_2492.jpg" ><img class="alignnone size-medium wp-image-265" title="Blower inside magnesium" src="http://www.killswtch.net/wp-content/uploads/img_2492-420x315.jpg" alt="" width="420" height="315" /></a></p>
<p>Unfortunately during installation, I found that the slower of the machines has a tendancy to overheat causing the machine to hang. To get Ubuntu installed I had to remove the case. This has now been rectified by installing a blower to get at least some air circulating. This is the only fan in either of the machines. Magnesium gets quite hot but has never crashed because of it. It also sits in a cooler environment, and is much better engineered.</p>
<p><a href="http://www.killswtch.net/wp-content/uploads/img_2397.jpg" ><img class="alignnone size-medium wp-image-264" title="Inside magnesium" src="http://www.killswtch.net/wp-content/uploads/img_2397-420x315.jpg" alt="" width="420" height="315" /></a></p>
<p>Sadly I&#8217;ve been forced to install Windows XP on magnesium purely because I couldn&#8217;t get the touchscreen to work under linux despite spending more than a day trying to. While it was detected, and it detected touches, the calibration was completely off and there was no way to configure it. Rather than waste any more time I decided to switch to Windows and everything has worked beautifuly since then. To accomplish this I&#8217;ve had to reinstall the CF disk since as far as I know XP Pro can&#8217;t do diskless booting.</p>
<p>Shots of these computers in use and more information on their roles to come soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killswtch.net/2008/07/10/sff-pcs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Almost there with the audio system</title>
		<link>http://www.killswtch.net/2008/06/18/almost-there-with-the-audio-system/</link>
		<comments>http://www.killswtch.net/2008/06/18/almost-there-with-the-audio-system/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 19:23:15 +0000</pubDate>
		<dc:creator>killswtch</dc:creator>
				<category><![CDATA[A/V]]></category>
		<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.killswtch.net/?p=237</guid>
		<description><![CDATA[
Yesterday I completed and successfully tested the control software for the audio system. The software works with the matrix switcher and the APC MasterSwitch remote control PDU to allow the audio output devices around the house (TV, radio, CD player etc.) to route their sound to any of the 4 audio zones.
I&#8217;m now waiting on [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="size-full wp-image-242" title="Audio control screenshot" src="http://www.killswtch.net/wp-content/uploads/audio-system-control.png" alt="" width="327" height="288" /></p>
<p>Yesterday I completed and successfully tested the control software for the audio system. The software works with the matrix switcher and the APC MasterSwitch remote control PDU to allow the audio output devices around the house (TV, radio, CD player etc.) to route their sound to any of the 4 audio zones.</p>
<p>I&#8217;m now waiting on some more purchases from eBay to arrive before I can finish the system off. On the way is a small touch-screen monitor and a low-power mini ITX computer to connect it to. This will function as the controller and will probably sit in the dining room at the centre of the house. I&#8217;ve not gone for an iPod just yet, since a small mobile device has the possibility of getting lost or damaged more readily than a fixed controller. I&#8217;m looking out for a cheap 2nd hand one on eBay though.</p>
<p>Although I had got the software working yesterday, I foolishly installed some updates for Ubuntu and now the serial ports have disappeared again. Rather than battle to get the ports to show up and behave I&#8217;ve gone a little more eBay crazy and bought a second thin-client-like low power PC which will run the matrix control software and possibly the web server for the front-end control interface.</p>
<p>The other remaining tasks include creating some more cables and positioning and attaching the speakers for zone 4, the master bedroom.</p>
<p>Full details of the setup, with a video, will hopefully be posted in the next few weeks.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killswtch.net/2008/06/18/almost-there-with-the-audio-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Serial port problem solved</title>
		<link>http://www.killswtch.net/2008/06/12/serial-port-problem-solved/</link>
		<comments>http://www.killswtch.net/2008/06/12/serial-port-problem-solved/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 19:41:18 +0000</pubDate>
		<dc:creator>killswtch</dc:creator>
				<category><![CDATA[A/V]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.killswtch.net/?p=208</guid>
		<description><![CDATA[
Thanks to the chip manufacturer of the cheap serial port card, I&#8217;ve managed to get some extra serial ports working. If you can&#8217;t figure out how to get additional serial ports working, I recommend this guide [ZIP, 792KB] available from the Moschip driver download page. It should be valid for most models of serial cards, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.killswtch.net/wp-content/uploads/img_2251.jpg" ><img class="alignnone size-full wp-image-209" title="Serial card" src="http://www.killswtch.net/wp-content/uploads/img_2251.jpg" alt="" width="420" height="315" /></a></p>
<p>Thanks to the chip manufacturer of the cheap serial port card, I&#8217;ve managed to get some extra serial ports working. If you can&#8217;t figure out how to get additional serial ports working, I recommend <a href="http://www.moschip.com/data/products/NM/linux.zip" onclick="javascript:urchinTracker ('/outbound/article/www.moschip.com');">this guide</a> [ZIP, 792KB] available from the <a href="http://www.moschip.com/html/download_drivers.html" onclick="javascript:urchinTracker ('/outbound/article/www.moschip.com');">Moschip driver download page</a>. It should be valid for most models of serial cards, and explains how to add more than the standard 4 ports that most linux installs have.</p>
<p>Now that this problem is out of the way I can continue with writing the remote control software for the audio system.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killswtch.net/2008/06/12/serial-port-problem-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Serial port problem part-way resolved</title>
		<link>http://www.killswtch.net/2008/05/11/serial-port-problem-part-way-resolved/</link>
		<comments>http://www.killswtch.net/2008/05/11/serial-port-problem-part-way-resolved/#comments</comments>
		<pubDate>Sun, 11 May 2008 13:04:27 +0000</pubDate>
		<dc:creator>killswtch</dc:creator>
				<category><![CDATA[A/V]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.killswtch.net/?p=207</guid>
		<description><![CDATA[Having put the 4 port serial card back into boron, the onboard port now works again, so I&#8217;ll probably continue with developing the software. The expansion card still doesn&#8217;t work though, so I&#8217;ve ordered a cheap 2-port card from eBay in the hope that a different card will work.
Before reinstalling the card I upgraded Ubuntu [...]]]></description>
			<content:encoded><![CDATA[<p>Having put the 4 port serial card back into <em>boron</em>, the onboard port now works again, so I&#8217;ll probably continue with developing the software. The expansion card still doesn&#8217;t work though, so I&#8217;ve ordered a cheap 2-port card from eBay in the hope that a different card will work.</p>
<p>Before reinstalling the card I upgraded Ubuntu to see if that would help (it didn&#8217;t) which brought its own scary moment of the 1TB RAID volume being dead. That too is solved now &#8211; the drive letter assignments had changed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killswtch.net/2008/05/11/serial-port-problem-part-way-resolved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hitch with the audio system</title>
		<link>http://www.killswtch.net/2008/05/10/hitch-with-the-audio-system/</link>
		<comments>http://www.killswtch.net/2008/05/10/hitch-with-the-audio-system/#comments</comments>
		<pubDate>Sat, 10 May 2008 19:21:58 +0000</pubDate>
		<dc:creator>killswtch</dc:creator>
				<category><![CDATA[A/V]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.killswtch.net/?p=206</guid>
		<description><![CDATA[Today I started development of the software to control the whole-house audio system. It&#8217;s written in C# and based on the MiniHttpd project &#8211; a small but powerful implementation of a web server in C#.
However, when it came to testing the first bits of code, I&#8217;ve envountered a problem. A while ago I bought a [...]]]></description>
			<content:encoded><![CDATA[<p>Today I started development of the software to control the whole-house audio system. It&#8217;s written in C# and based on <a href="http://sourceforge.net/projects/minihttpd/" onclick="javascript:urchinTracker ('/outbound/article/sourceforge.net');">the MiniHttpd project</a> &#8211; a small but powerful implementation of a web server in C#.</p>
<p>However, when it came to testing the first bits of code, I&#8217;ve envountered a problem. A while ago I bought a 4 port RS232 serial card to go into <em>boron</em>, because the motherboard only has 1 onboard port which isn&#8217;t enough for the UPS, the matrix switcher and probably some other things such as connections to network switches.</p>
<p>The new card shows up fine in <em>lspci</em>, seems to be ok when running <em>setserial -gb</em>, but when trying to send or receive data nothing happens. Thinking it might be a conflict with the onboard port, I went into the BIOS and disabled it. Still nothing. So I swapped the card into another machine and re-enabled the onboard port in <em>boron</em>&#8217;s BIOS. Now the onboard port doesn&#8217;t work either.</p>
<p>I&#8217;m going to contact the manufacturer of the card for some help. But for the onboard port I&#8217;m completely stumped. It too shows up in <em>lspci</em> and <em>setserial -gb</em> (though only when running using <em>sudo</em>, which wasn&#8217;t necessary before) but any attempts to use the port result in various I/O error messages. I was worried that the new card may have killed the serial communication capabilities of the matrix switcher and the UPS, but I&#8217;ve confirmed that at least the matrix switcher still works by connecting it to my test machine, <em>iron</em>.</p>
<p>If anyone thinks they might know what&#8217;s getting on, please get in contact via the comments for this post &#8211; I would be very greatful for any help.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killswtch.net/2008/05/10/hitch-with-the-audio-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monitoring power via my UPS</title>
		<link>http://www.killswtch.net/2008/04/27/monitoring-power-via-my-ups/</link>
		<comments>http://www.killswtch.net/2008/04/27/monitoring-power-via-my-ups/#comments</comments>
		<pubDate>Sun, 27 Apr 2008 12:05:40 +0000</pubDate>
		<dc:creator>killswtch</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.killswtch.net/2008/04/27/monitoring-power-via-my-ups/</guid>
		<description><![CDATA[I&#8217;ve set up a few MRTG config files and some simple shell scripts to graph the available data from my Compaq UPS via Nut. This will give a basic way to monitor the combined power consumption of everything that&#8217;s connected to the UPS. Currently this is everything in the rack plus the computer under my [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve set up a few <a href="http://oss.oetiker.ch/mrtg/"target="_blank"  onclick="javascript:urchinTracker ('/outbound/article/oss.oetiker.ch');">MRTG</a> config files and some simple shell scripts to graph the available data from <a href="http://www.killswtch.net/2008/04/06/getting-nut-working-with-a-compaq-t2400h/" >my Compaq UPS</a> via <a href="http://www.networkupstools.org/"target="_blank"  onclick="javascript:urchinTracker ('/outbound/article/www.networkupstools.org');">Nut</a>. This will give a basic way to monitor the combined power consumption of everything that&#8217;s connected to the UPS. Currently this is everything in the rack plus the computer under my desk (and the peripherals on top). If you like graphs, <a href="http://mrtg.killswtch.net/" >you can see them on this site</a>.</p>
<p>In addition to this method, I also have a plug-in power meter that can be used on individual items. It&#8217;s currently plugged into the incoming side of the UPS. For whole house power monitoring, the <a href="http://www.electricity-monitor.com/wattson-c-31.html" onclick="javascript:urchinTracker ('/outbound/article/www.electricity-monitor.com');">Wattson</a> looks pretty good, but it&#8217;s not exactly cheap.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killswtch.net/2008/04/27/monitoring-power-via-my-ups/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>MythTV interface for the iPhone</title>
		<link>http://www.killswtch.net/2008/04/23/mythtv-interface-for-the-iphone/</link>
		<comments>http://www.killswtch.net/2008/04/23/mythtv-interface-for-the-iphone/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 17:31:28 +0000</pubDate>
		<dc:creator>killswtch</dc:creator>
				<category><![CDATA[MythTV]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.killswtch.net/2008/04/23/mythtv-interface-for-the-iphone/</guid>
		<description><![CDATA[An interface for MythTv on the iPhone (and presumably the iPod Touch too) has been developed by Chris Carey. It looks pretty darn cool. This saves me from having to write my own as part of the iPod Touch remote control project that&#8217;s planned. [Via Automated Home]
]]></description>
			<content:encoded><![CDATA[<p>An <a href="http://chriscarey.com/projects/mythtv/iphone/"target="_blank"  onclick="javascript:urchinTracker ('/outbound/article/chriscarey.com');">interface for MythTv on the iPhone</a> (and presumably the iPod Touch too) has been developed by Chris Carey. It looks pretty darn cool. This saves me from having to write my own as part of the <a href="http://www.killswtch.net/2007/12/06/using-an-ipod-as-a-remote/" >iPod Touch remote control</a> project that&#8217;s planned. [Via <a href="http://www.automatedhome.co.uk/New-Products/MythTV-for-iPhone.html"target="_blank"  onclick="javascript:urchinTracker ('/outbound/article/www.automatedhome.co.uk');">Automated Home</a>]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.killswtch.net/2008/04/23/mythtv-interface-for-the-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
