<?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>Ian Mercer</title>
	<atom:link href="http://blog.abodit.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.abodit.com</link>
	<description>Living in the World&#039;s Smartest House</description>
	<lastBuildDate>Fri, 30 Jul 2010 20:42:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>GDI+ Image.FromFile has a problem &#8211; here&#8217;s how to fix it</title>
		<link>http://blog.abodit.com/2010/07/gdi-image-fromfile-problem/</link>
		<comments>http://blog.abodit.com/2010/07/gdi-image-fromfile-problem/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 20:38:49 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[GDI+]]></category>

		<guid isPermaLink="false">http://blog.abodit.com/?p=1081</guid>
		<description><![CDATA[In GDI+ you can call Image.FromFile to load an image from a file. BUT there are several issues with this call, the biggest being that GDI+ will keep the file open long after you are done with it. Here is an image loader that gets around this issue. If you are running a high volume <a href="http://blog.abodit.com/2010/07/gdi-image-fromfile-problem/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>In GDI+ you can call Image.FromFile to load an image from a file.  BUT there are several issues with this call, the biggest being that GDI+ will keep the file open long after you are done with it.  Here is an image loader that gets around this issue.</p>
<p>If you are running a high volume web site, and your images are on a SAN you&#8217;ll find this technique necessary to prevent an eventual exhaustion of filehandles.</p>
<pre class="brush: csharp;">
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.IO;
using System.Data;

namespace Utility
{
public static class ImageLoader
{
// This isn’t going to help much – you’ll run out of memory anyway on very large images – but if you are keeping several in memory it might …
public const int MaximumImageDimension = 10000;

///
/// Method to safely load an image from a file without leaving the file open,
/// also gets the size down to a manageable size in the case of HUGE images
///
/// An Image – don’t forget to dispose of it later
public static Image LoadImage (string filePath)
{
try
{
FileInfo fi = new FileInfo(filePath);

if (!fi.Exists) throw new FileNotFoundException(“Cannot find image”);
if (fi.Length == 0) throw new FileNotFoundException(“Zero length image file “);

// Image.FromFile is known to leave files open, so we use a stream instead to read it
using (FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read))
{
if (!fs.CanRead) throw new FileLoadException (“Cannot read file stream”);

if (fs.Length == 0) throw new FileLoadException(“File stream zero length”);

using (Image original = Image.FromStream(fs))
{
// Make a copy of the file in memory, then release the one GDI+ gave us
// thus ensuring that all file handles are closed properly (which GDI+ doesn’t do for us in a timely fashion)
int width = original.Width;
int height = original.Height;
if (width == 0) throw new DataException(“Bad image dimension width=0″);
if (height == 0) throw new DataException(“Bad image dimension height=0″);

// Now shrink it to Max size to control memory consumption
if (width &gt; MaximumImageDimension)
{
height = height * MaximumImageDimension / width;
width = MaximumImageDimension;
}
if (height &gt; MaximumImageDimension)
{
width = width * MaximumImageDimension / height;
height = MaximumImageDimension;
}

Bitmap copy = new Bitmap(width, height);
using (Graphics graphics = Graphics.FromImage(copy))
{
graphics.DrawImage(original, 0, 0, copy.Width, copy.Height);
}
return copy;
}
}
}
catch (Exception ex)
{
ex.Data.Add(“FileName”, filePath);
throw;
}
}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.abodit.com/2010/07/gdi-image-fromfile-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Passive Air Conditioning to reduce Energy Consumption</title>
		<link>http://blog.abodit.com/2010/07/passive-air-conditioning/</link>
		<comments>http://blog.abodit.com/2010/07/passive-air-conditioning/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 22:28:24 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Environment / Green]]></category>
		<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[Smartest House]]></category>

		<guid isPermaLink="false">http://blog.abodit.com/?p=1063</guid>
		<description><![CDATA[photo credit: dynamosquito Technology to heat or cool buildings naturally and without expending huge quantities of energy has existed for thousands of years.  In Iran this &#8216;badgir&#8217; has a natural cooling system made with mud bricks and Adobe. It uses the air circulation between two towers passing through a dome refreshed by the flow of <a href="http://blog.abodit.com/2010/07/passive-air-conditioning/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p><a title="Badgir" href="http://www.flickr.com/photos/25182210@N07/4265775174/" target="_blank"><img src="http://farm5.static.flickr.com/4031/4265775174_d8e269ca64.jpg" border="0" alt="Badgir" /></a><br />
<small><a title="Attribution-ShareAlike License" href="http://creativecommons.org/licenses/by-sa/2.0/" target="_blank"><img src="http://blog.abodit.com/wp-content/plugins/photo-dropper/images/cc.png" border="0" alt="Creative Commons License" width="16" height="16" align="absmiddle" /></a> <a href="http://www.photodropper.com/photos/" target="_blank">photo</a> credit: <a title="dynamosquito" href="http://www.flickr.com/photos/25182210@N07/4265775174/" target="_blank">dynamosquito</a></small></p>
<p>Technology to heat or cool buildings naturally and without expending huge quantities of energy has existed for thousands of years.  In Iran this &#8216;badgir&#8217; has a natural cooling system made with mud bricks and Adobe. It uses the air circulation between two towers passing through a dome refreshed by the flow of water into an underground channel named Qanat.</p>
<p>By contrast, typical American home construction affords few opportunities to use nature to help heat or cool the spaces we live in.  Homes here are built with thin walls making them poor insulators and although modern homes are well insulated with fiberglass insulation in the walls and roof spaces that is done primarily to keep the heat in; it provides little thermal inertia and has the unintended consequence of trapping heat in the house during summer months when there is plenty of sunlight streaming through large windows but no way out.  Worse still, in modern construction, windows and doors are kept tightly closed and the building itself is built so tight that it needs a fan to bring in outside air regularly to improve the air quality in the building.  That fan uses energy and runs on a dumb timer, sucking in potentially cold air in winter and hot air in the summer.</p>
<p>Having already reduced my total electricity consumption by over 40% and made inroads in how much gas we use for heating I&#8217;ve recently begun to look at how we can reduce the amount of cooling needed to keep our house comfortable in the summer.</p>
<p><a href="http://blog.abodit.com/wp-content/uploads/2010/07/TemperatureVariationNearSeattle.png"><img class="alignright size-medium wp-image-1065" title="Temperature Variation Near Seattle" src="http://blog.abodit.com/wp-content/uploads/2010/07/TemperatureVariationNearSeattle-300x200.png" alt="Temperature Variation Near Seattle" width="300" height="200" /></a> In a location where there is a significant variation between daytime and night time temperatures there ought to be an opportunity to heat or cool a house naturally using free energy from the environment.  Here near Seattle for several months each year we have just such an environment as you can see on the graph to the right (click to enlarge).  The nighttime lows are currently below 70°F and the daytime highs are well above 70°F.</p>
<p>Since we already have a fan connected up that&#8217;s forcing external air into the house why not connect that fan to the home automation system and dispense with the dumb timer that was driving it.  Now the house has control of that fan it can change the time of day when fresh air is brought into the house to use warmer air in winter (around 3PM) and cooler air in summer (around 3AM).  It can also use this fan in conjunction with the air conditioning system.  For example, it knows you are upstairs and that it&#8217;s too warm up there tonight, the air conditioning has been running but it&#8217;s now past midnight and although it&#8217;s still 72 inside it&#8217;s dropped below 70 outside.  In this situation it can simply open the external damper, turn on the fan and turn off the air conditioning.  Cool air flows in and the compressor is idle.</p>
<p>All this seems like a good theory but because I&#8217;ve only had it installed for a few days it&#8217;s too early to say how well it will work.</p>
<p><a href="http://blog.abodit.com/wp-content/uploads/2010/07/PassiveCoolingOpenTheDoors.png"><img class="alignright size-medium wp-image-1068" title="Passive Cooling - Open The Doors" src="http://blog.abodit.com/wp-content/uploads/2010/07/PassiveCoolingOpenTheDoors-300x214.png" alt="Passive Cooling - Open The Doors" width="300" height="214" /></a></p>
<p>But what about houses with no circulation fan?  Could we simply use doors and windows to improve comfort and reduce costs by telling the occupants when to open and close them?  Today for example I was up early and it was cool outside so I opened up all the doors to the deck.  The graph below shows what happened: a much bigger temperature drop than the day before even though it&#8217;s a much warmer day today overall.  What I failed to do today, however, was to close them at the right time so the early gains in &#8216;coolness&#8217; were soon offset by the rapidly rising outdoor temperature and before lunch it was already warmer inside than the day before.  But what if the house calculated what to do and told you so that you could do an optimum adjustment to doors and windows to achieve free cooling?</p>
<blockquote><p>My home automation system tracks the temperature in each zone in the house using an Aprilaire communicating thermostat with RS485.  It can display graphs for any variable or collection of variables using the ASP.NET charting control.  These graphs and experiments like the one this morning are helping me understand the dynamics of our house and figure out the best ways to achieve passive cooling (or heating).
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.abodit.com/2010/07/passive-air-conditioning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weather Forecasting for Home Automation</title>
		<link>http://blog.abodit.com/2010/07/weather-forecasting-for-home-automation/</link>
		<comments>http://blog.abodit.com/2010/07/weather-forecasting-for-home-automation/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 03:38:20 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[Smartest House]]></category>
		<category><![CDATA[Chart control]]></category>
		<category><![CDATA[Weather forecast]]></category>

		<guid isPermaLink="false">http://blog.abodit.com/?p=1043</guid>
		<description><![CDATA[In the USA we are lucky to have the NOAA and their excellent web service that can provide a detailed weather forecast for any location (specified by latitude and longitude). Using this service my home automation system maintains a detailed, regularly updated local weather forecast object which can be queried easily by any other object <a href="http://blog.abodit.com/2010/07/weather-forecasting-for-home-automation/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>In the USA we are lucky to have the <a href="http://www.nws.noaa.gov/xml/">NOAA and their excellent web service</a> that can provide a detailed weather forecast for any location (specified by latitude and longitude).  Using this service my home automation system maintains a detailed, regularly updated local weather forecast object which can be queried easily by any other object in the home.  </p>
<div id="attachment_1042" class="wp-caption alignright" style="width: 310px"><a href="http://blog.abodit.com/wp-content/uploads/2010/07/HomeAutomationWeather2.png"><img src="http://blog.abodit.com/wp-content/uploads/2010/07/HomeAutomationWeather2-300x170.png" alt="Home Automation Weather Forecasting" title="Home Automation Weather Forecasting" width="300" height="170" class="size-medium wp-image-1042" /></a><p class="wp-caption-text">Click to enlarge</p></div>
<p>On the weather page you can view all of the forecast information it collects.  Of interest the graph in the lower right compares the forecast from NOAA with the actual recorded temperature.  In this case you can see just how accurate the forecast has been for the last 24 hours.  Normally it runs almost this close but with occasionally there is a significant discrepancy caused by the bizarre &#8216;convergence zone&#8217; we live in where Pacific weather patterns split around the Olympic mountains and then recombine over Seattle in somewhat unpredictable ways.</p>
<p>Unlike most home automation systems that have fairly limited if-the-else or table-driven approaches to defining the home logic (often limited to only the current value of any variable), my system has control structures that include statistical functions over temporal data allowing analysis of past data (e.g. average temperature in the last day), or in the case of the weather forecast, future values, e.g. expected temperature one hour from now found using interpolation. </p>
<pre class="brush: csharp;">
                var oneHourForNow = DateTime.Now.AddHours(1);
                double outsideForecastOneHourFromNow = weatherService.ApparentTemperatureHourly.ValueAtTimeWithLinearInterpolation(oneHourForNow);
</pre>
<p>This forward looking view at the weather allows for features like garden sprinklers that don&#8217;t turn on when it&#8217;s going to rain or HVAC that skips heating cycles when the forecast predicts warm weather later today.  </p>
<p>In addition the house is able to issue a detailed local forecast over the speakers when it wakes you up in the morning.  Somewhat uniquely the forecast it generates is a <em>relative weather forecast</em> comparing yesterday with today, or today with tomorrow.  It might for example say &#8220;Today will be much warmer that yesterday&#8221; which is a whole lot less words than a normal weather forecast!</p>
<p>The house also has Natural Language Generation (NLG) features which are able to summarize a group of temporal series into distinct ranges allowing it for instance to highlight which the best times of the day are to be outside:-</p>
<blockquote><p>Monday : excellent from dawn at 5:34 AM until 11:36 AM; hot from 11:36 AM to 2:00 PM; too hot from 2:00 PM to 7:00 PM; hot until sunset at 8:53 PM.
</p></blockquote>
<h4>ASP.NET Charts</h4>
<p>Incidentally, all of the graphs are rendered using the <a href="http://weblogs.asp.net/scottgu/archive/2008/11/24/new-asp-net-charting-control-lt-asp-chart-runat-quot-server-quot-gt.aspx">.NET Charting Control</a>.  The graph object is instantiated on the server, all the lines and axes are added to it, then it is serialized and sent over TCP to the web server using WCF.  On the web server it is rendered as a PNG file using an Action method that takes size parameters allowing any size graph to be shown on any page.  Here&#8217;s the MVC code that takes the stream from WCF, loads the Chart and then delivers it as a PNG.</p>
<pre class="brush: csharp;">
            Chart chart = new Chart();
            chart.Serializer.Load(ms);

            MemoryStream ms2 = new MemoryStream();
            chart.SaveImage(ms2);

            return File(ms2.GetBuffer(), @&quot;image/png&quot;);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.abodit.com/2010/07/weather-forecasting-for-home-automation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sequential Logic Blocks &#8211; compared to the Reactive Framework</title>
		<link>http://blog.abodit.com/2010/07/sequential-logic-blocks-my-answer-to-the-reactive-framework/</link>
		<comments>http://blog.abodit.com/2010/07/sequential-logic-blocks-my-answer-to-the-reactive-framework/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 01:22:48 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Logic blocks]]></category>
		<category><![CDATA[Reactive framework]]></category>

		<guid isPermaLink="false">http://blog.abodit.com/?p=1031</guid>
		<description><![CDATA[One of the features of my home automation system is extensions to the C# language that make it easy to define complex logical and temporal behaviors. These behave somewhat like the new Reactive Extensions in .NET but with some key differences which I will explain below. I developed these extensions before Reactive Framework was released <a href="http://blog.abodit.com/2010/07/sequential-logic-blocks-my-answer-to-the-reactive-framework/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>One of the features of my home automation system is extensions to the C# language that make it easy to define complex logical and temporal behaviors.  These behave somewhat like the new <a href="http://msdn.microsoft.com/en-us/devlabs/ee794896.aspx">Reactive Extensions in .NET</a> but with some key differences which I will explain below.  I developed these extensions before Reactive Framework was released and have recently been looking at Rx to see if I could combine my ideas with Rx but because of the differences explained below I haven&#8217;t been able to do that.</p>
<p>But, before explaining why, let&#8217;s first look at an example:-</p>
<pre class="brush: csharp;">
            FirstFloor.Kitchen.GoesOff.Provided((dt) =&gt; Entrance.VisitorCountThisEvening.Count &lt; 2).TurnOff(Aquarium.Light);
</pre>
<p>This means that if the kitchen goes not occupied (off) provided we have less than two visitors this evening, then turn off the aquarium lights.</p>
<p>Here&#8217;s a more complex example where we create an intermediate logic element called &#8216;activityInKitchen&#8217; using the <strong>.Or</strong> method, and then based on that activity we decide whether to announce that the fish have not been fed.  The decision uses a combination of pulse stretching, repeats (Every) and <strong>Then</strong> which fires only if a particular sequence is followed within a given time window.  Finally it uses the <strong>Do</strong> method which fires off an <strong>Action</strong>.</p>
<pre class="brush: csharp;">
            SensorDevice activityInKitchen =
                Kitchen.KitchenFloor.Or(Kitchen.MotionSensor, Kitchen.BackDoorToGarage, Kitchen.BreakfastBarFloor, Kitchen.Phone);

            activityInKitchen
                .ProvidedNot(Home.DinnerGuests)
                .PulseStretch(16 * 60)       // Make it continuous
                .Every(60 * 60)              // Once every 1 hour
                .Then(activityInKitchen, 15*60)
                .Do(&quot;Announce fish are hungry&quot;, (sender) =&gt;
                {
                    Kitchen.Aquarium.AnnounceFishHungry(Kitchen.MediaZone);
                });
</pre>
<p>As you can see the use of a fluent syntax allows for a very natural, almost english-like definition of complex temporal expressions.  But that&#8217;s not all it allows&#8230;</p>
<p>The sequential logic blocks created when you call one of the many methods like .Then, .Or, .Every, &#8230; are actual objects created within the hierarchical structure of the house and the objects used to represent it.  This means that they take part (automatically) in all of the features provided by a base house object including logging, browsing, and most importantly persistence.</p>
<p>Because these sequential logic blocks are persistent you can have very long running events like <strong>.EveryDays(2)</strong> and even if the entire system is shut down and restarted it will come back in the correct state and all the necessary delays and timers will still be working.</p>
<p>Another key benefit of these sequential logic blocks compared to, say, the .NET Reactive Framwork is that they form a chain that can be traversed in either direction: forward as an event propagates through, or in reverse to determine <i>why</i> a particular action was taken.  This means that my home automation system is able to explain <i>why</i> it turned the lights on or off.  Currently all of these decisions are logged on the per-object logging system which means you can inspect any room, appliance, light, etc. and see everything that happened to it and the reasons why.</p>
<blockquote><p>
                          Hallway became occupied, caused by Motion sensor<br />
                          Set brightness on Aisle lights in Kitchen to 20% because Leaving office late at night
</p></blockquote>
<p>Compare this to other home automation systems from major vendors.  They contain fairly simple logic, often expressed in a tabular or grid format with limited if-the-else type logic and when something happens there is often no record as to what happened and, worse, there is absolutely no record as to why it happened.</p>
<p>Any sufficiently complex system will have unexpected behavior, the difference here is that when it does something odd I can easily look at the logging and see the explanation as to why it happened.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.abodit.com/2010/07/sequential-logic-blocks-my-answer-to-the-reactive-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Canon Powershot D10 Underwater Camera</title>
		<link>http://blog.abodit.com/2010/07/canon-powershot-d10-underwater-camera/</link>
		<comments>http://blog.abodit.com/2010/07/canon-powershot-d10-underwater-camera/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 07:10:17 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[Canon]]></category>
		<category><![CDATA[Underwater]]></category>

		<guid isPermaLink="false">http://blog.abodit.com/?p=1004</guid>
		<description><![CDATA[I purchased a Canon Powershot D10 Underwater Camera recently and I love it! It&#8217;s a great little underwater camera costing less than many underwater housings. It shoots great shots both underwater and above water and I&#8217;m constantly surprised by just how good many of the shots look even when compared to my 70-200 f2.8 IS <a href="http://blog.abodit.com/2010/07/canon-powershot-d10-underwater-camera/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>I purchased a Canon Powershot D10 Underwater Camera recently and I love it!  It&#8217;s a great little underwater camera costing less than many underwater housings.  It shoots great shots both underwater and above water and I&#8217;m constantly surprised by just how good many of the shots look even when compared to my 70-200 f2.8 IS lens.</p>
<p>It&#8217;s a fun camera to have around because it can literally go anywhere: you can take shots above the water, underwater, or just close to water without any worries about your equipment getting wet.  These pictures were all taken using my Powershot D10 over the last month, from Australia to North America.  Click to enlarge any of them.</p>
<p><iframe align="right" src="http://rcm.amazon.com/e/cm?lt1=_blank&#038;bc1=000000&#038;IS2=1&#038;bg1=FFFFFF&#038;fc1=000000&#038;lc1=0000FF&#038;t=abodit-20&#038;o=1&#038;p=8&#038;l=as1&#038;m=amazon&#038;f=ifr&#038;md=10FE9736YVPPT7A0FBG2&#038;asins=B001SER460" style="width:120px;height:240px;padding-left:40px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe><a href="http://blog.abodit.com/wp-content/uploads/2010/07/IMG_2415.jpg"><img src="http://blog.abodit.com/wp-content/uploads/2010/07/IMG_2415-225x300.jpg" alt="Canon Powershot D10 Underwater - Faces" title="Canon Powershot D10 Underwater - Faces" width="225" height="300" class="alignleft size-medium wp-image-999" /></a><a href="http://blog.abodit.com/wp-content/uploads/2010/07/IMG_1946.jpg"><img src="http://blog.abodit.com/wp-content/uploads/2010/07/IMG_1946-225x300.jpg" alt="Canon Powershot D10 Underwater Camera - San Juans, WA" title="Canon Powershot D10 Underwater Camera - San Juans, WA" width="225" height="300" class="alignleft size-medium wp-image-1001" /></a></p>
<p><a href="http://blog.abodit.com/wp-content/uploads/2010/07/IMG_0997.jpg"><img src="http://blog.abodit.com/wp-content/uploads/2010/07/IMG_0997-300x199.jpg" alt="Canon Powershot D10 Underwater Camera - Heron Island, Great Barrier Reef" title="Canon Powershot D10 Underwater Camera - Heron Island, Great Barrier Reef" width="300" height="199" class="alignleft size-medium wp-image-1002" /></a><a href="http://blog.abodit.com/wp-content/uploads/2010/07/IMG_1111.jpg"><img src="http://blog.abodit.com/wp-content/uploads/2010/07/IMG_1111-300x225.jpg" alt="Canon Powershot D10 Underwater Camera - Heron Island, Great Barrier Reef" title="Canon Powershot D10 Underwater Camera - Heron Island, Great Barrier Reef" width="300" height="225" class="alignright size-medium wp-image-1003" /></a></p>
<p><a href="http://blog.abodit.com/wp-content/uploads/2010/07/IMG_2139.jpg"><img src="http://blog.abodit.com/wp-content/uploads/2010/07/IMG_2139-300x225.jpg" alt="Canon Powershot D10 Underwater Camera - Close to water" title="Canon Powershot D10 Underwater Camera - Close to water" width="300" height="225" class="alignright size-medium wp-image-1000" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.abodit.com/2010/07/canon-powershot-d10-underwater-camera/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A better way to share photos &#8230; wonder if PhotoRocket will be anything like this</title>
		<link>http://blog.abodit.com/2010/07/a-better-way-to-share-photos-photorocket-news/</link>
		<comments>http://blog.abodit.com/2010/07/a-better-way-to-share-photos-photorocket-news/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 06:02:55 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Commentary]]></category>
		<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://blog.abodit.com/?p=994</guid>
		<description><![CDATA[I take and share hundreds of photos a week. They are all loaded onto the Mac, edited and then distributed using Facebook, email, Twitter, Flickr, various web sites and occasionally on CD-ROM. I also frequently get requests from people to send them the original. All this takes time and there&#8217;s no easy record of what <a href="http://blog.abodit.com/2010/07/a-better-way-to-share-photos-photorocket-news/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>I take and share hundreds of photos a week.  They are all loaded onto the Mac, edited and then distributed using Facebook, email, Twitter, Flickr, various web sites and occasionally on CD-ROM.  I also frequently get requests from people to send them the original.  All this takes time and there&#8217;s no easy record of what has been shared with whom.  So over the past couple of years I&#8217;ve been thinking about creating a new way to share photos that would be easier for my situation and here&#8217;s my concept:-</p>
<blockquote><p>In iPhoto (or any other photo management application) simply tag the photo with the email address (or group name) of the people you want to share it with!
</p></blockquote>
<p>Yes, that&#8217;s it!  That&#8217;s all you would need to do to share an image with someone.  </p>
<p>What happens behind the scenes is more interesting &#8230;</p>
<p>The sharing software makes a regular sweep over the iPhoto library and finds any newly tagged photos with email addresses or group names on them.  If then looks up each individual and your preferred method of reaching them (email, Facebook, &#8230;) and it delivers the pictures to them.  A management screen allows you to define groups and to manage the list of people with whom you share photos.  For each person or group you can define how to reach them (Facebook, Twitter, email, Flickr, web site, CD-ROM, &#8230;) and you can also set a limit on how large a photo to send them and a limit on how many to send per day.  Thus for a friend on a slow connection you might chose to only email them a medium sized version and limit it to one per day.  They would thus get a daily email from you every day until all the photos tagged with their name (or a group that they belong to) have been delivered to them.  It would also enable you to easily set up a photo of the week post to Facebook and to queue up images for future picture of the week posts.</p>
<p>I think this approach would be much easier than my current photo sharing process.  Thoughts? Comments?</p>
<p>I also see that a local startup <a href="http://photorocket.com/">PhotoRocket</a> has announced plans to revolutionize how we share photos.  I wonder if there are any similarities between my ideas and what they are planning &#8230; we shall see soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.abodit.com/2010/07/a-better-way-to-share-photos-photorocket-news/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Home Automation Heating and Cooling (HVAC) Features</title>
		<link>http://blog.abodit.com/2010/07/home-automation-heating-and-cooling-features/</link>
		<comments>http://blog.abodit.com/2010/07/home-automation-heating-and-cooling-features/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 07:02:48 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Environment / Green]]></category>
		<category><![CDATA[Home Automation]]></category>

		<guid isPermaLink="false">http://blog.abodit.com/?p=985</guid>
		<description><![CDATA[Now that summer is finally upon us in this part of the world I thought I might make a list of the many ways in which my home automation system monitors and controls the heating and cooling systems (HVAC) in our house.  It does this to reduce energy consumption and to provide a more comfortable <a href="http://blog.abodit.com/2010/07/home-automation-heating-and-cooling-features/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>Now that summer is finally upon us in this part of the world I thought I might make a list of the many ways in which my home automation system monitors and controls the heating and cooling systems (HVAC) in our house.  It does this to reduce energy consumption and to provide a more comfortable environment for the occupants.</p>
<p><strong>1. Reduced heating/cooling when the house isn&#8217;t occupied</strong><br />
The house automatically drops back to a lower (or higher in the case of the air-conditioning set-point) setting whenever a zone in the house is unoccupied for a set period.</p>
<p><strong>2. Further reduction in heating/cooling when the house isn&#8217;t occupied in the case of a vacation</strong></p>
<p>If the house is totally unoccupied for the majority of the day (i.e. excluding brief visits from cleaners and pet sitters) it will automatically flip into an even lower power consumption mode using less heating and no cooling at all.</p>
<p><a href="http://blog.abodit.com/wp-content/uploads/2010/07/CoolingGraph.png"><img src="http://blog.abodit.com/wp-content/uploads/2010/07/CoolingGraph-300x214.png" alt="HVAC Cooling Graph" title="HVAC Cooling Graph" width="300" height="214" class="alignright size-medium wp-image-1040" /></a></p>
<p><strong>3. Heat-point / cool-point variation by time of day (for each zone)</strong></p>
<p>Instead of aiming for a single fixed temperature for a 24 hour period the house has target temperatures for different times of day &#8211; at night for example it lowers the heat-point substantially, during the evening it lowers it subtly in preparation for nighttime (except if we have visitors (which it knows)).  On hot summer evenings it will cool the bedrooms in advance of bedtime (as shown in the graph here) but during the night it will allow the temperature to creep up slightly.  Each zone has it&#8217;s own target temperatures curve because what&#8217;s right for the bedrooms isn&#8217;t right for the kitchen.</p>
<p><strong>4. Optimum start in the morning</strong></p>
<p>A traditional thermostat with a timer typically simply slams the thermostat up to 68F at, say, 5AM every morning to get the house to the right temperature by the time we wake up.  My smart house instead follows an &#8216;optimum start&#8217; routine whereby it gradually increases the set-point every five minutes along a predefined curve that matches the house&#8217;s thermal characteristics for heating (which varies according to the outside temperature).  This means it heats the house for the absolute minimum duration necessary to arrive at the correct temperature by the desired time of day.  A traditional thermostat by contrast may have been holding the house at 68 for an hour or more before it was really necessary.</p>
<p><strong>5. No heating of cooling at all if the weather forecast says it&#8217;s not needed</strong></p>
<p>If the house is going to get warm all on its own today because it&#8217;s forecast to be a hot sunny day then the house will automatically skip all heating in the morning even if it means the house will be a few degrees cooler than desired for an hour or so in the morning.  When it&#8217;s sunny and the forecast is for a hot day there&#8217;s no point heating just to increase comfort for such a short period and besides when it&#8217;s sunny outside people don&#8217;t feel as cold anyway.  This also means that the house will not need as much cooling later should it be a really hot day.</p>
<p>Another example of this can be seen in the graph above where the house decided to stop cooling the upper floor because the forecast indicated that it would soon be cool enough outside to not require any A/C and it would be cheaper and more effective to just suck in air from outside.</p>
<p><strong>6. Manual override and the subtle shift back to computer control</strong></p>
<p>There are unfortunately many people in the world who don&#8217;t understand thermostats let alone thermodynamics.  For some there is a perception that the higher you set it, the faster it will get warm.  Rather than try to reason with such people, or offend them with rude alerts or announcements over the speakers to explain how thermostats work, my home takes a more subtle approach: you can set the thermostat to whatever value you like but within an hour it will have taken back control and the set point will be back to where it should be.</p>
<p><strong>7. Thermostats are part of the occupancy sensing network in the house</strong></p>
<p>If you adjust a thermostat that counts as an occupancy trigger in the room in which the thermostat is located.  In order to have the densest possible network of occupancy sensors any device that receives input is treated as an occupancy sensor, so thermostats, light switches, TV remotes all act as occupancy sensors just like the more traditional door sensors, motion sensors, floor sensors etc.</p>
<p><strong>8. The house refuses to attempt to cool the entire world &#8211; Close the doors!</strong></p>
<p>If the house is in cooling mode and external doors are left open it will wait for 5 minutes, then issue a verbal warning over the speakers, and then if the doors are still left open it will simply stop trying to cool that zone until the doors are closed.</p>
<p><strong>9. The house logs what happened in each zone and can explain why it made changes</strong></p>
<p>Any complex system will have unexpected behaviors, but unlike other home automation systems this one keeps a detailed individual log for each zone and in that log you can see what happened and equally importantly why it happened because the house leaves a trail including explanations as to what it was doing and why.</p>
<table>
<tbody>
<tr>
<td>yesterday at 12:00 AM</td>
<td>14.04% on today</td>
</tr>
<tr>
<td>last Monday at 9:16 PM</td>
<td>Temperature 67°F [64°F &lt; |65.3°F| &lt; 68°F]</td>
</tr>
<tr>
<td>last Monday at 7:05 PM</td>
<td>Heatpoint changed to 55 because warm outside (Outside ave=57.2°F now=65.0°F</td>
</tr>
<tr>
<td>last Monday at 6:38 PM</td>
<td>Temperature 68°F [64°F &lt; |65.0°F| &lt; 68°F]</td>
</tr>
<tr>
<td>last Monday at 3:01 PM</td>
<td>Heatpoint changed at thermostat to 66°F</td>
</tr>
<tr>
<td>last Monday at 3:01 PM</td>
<td>Heating (Off)</td>
</tr>
</tbody>
</table>
<p><img class="alignright size-medium wp-image-992" title="Home Automation Thermostat Graph" src="http://blog.abodit.com/wp-content/uploads/2010/07/ThermostatGraph-300x213.png" alt="Home Automation Thermostat Graph" width="300" height="213" /></p>
<p><strong>10. The house makes graphs for each zone</strong></p>
<p>These graphs show how the temperature varied and what changes it was making to the set points during the course of the day</p>
<p>These cooling and heating features together with all of the other home automation features directed at energy saving mean that our total electricity consumption is down 40% from where it was five years ago and comfort has if anything improved along with convenience &#8211; it&#8217;s very rare now that we ever need to adjust a thermostat.</p>
<p><strong>11. Future improvements</strong></p>
<p>Although the house can tell if we are home or away, or if we have visitors for the evening or visitors stopping over all without being told, it still can&#8217;t figure out when we will get home.  But that&#8217;s about to change, the house now knows where we are when we aren&#8217;t at home (more about that later) and it will soon be able to predict a return time.  Armed with that I hope to improve it so it can have the house ready for our return after we&#8217;ve been away without having to explicitly tell it anything!</p>
<p><a href="http://blog.abodit.com/wp-content/uploads/2010/07/HVACDetail1.png"><img src="http://blog.abodit.com/wp-content/uploads/2010/07/HVACDetail1-300x214.png" alt="Home Automation HVAC" title="Home Automation HVAC" width="300" height="214" class="alignright size-medium wp-image-1058" /></a></p>
<p><strong>12. A more detailed example</strong><br />
Click the image on the right to enlarge it.  You&#8217;ll see a detailed example of how the house manages the cool point to achieve optimum comfort with minimal energy consumption.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.abodit.com/2010/07/home-automation-heating-and-cooling-features/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tidy Up! for Mac, a short review, clean up missing thumbnails in iPhoto??</title>
		<link>http://blog.abodit.com/2010/07/tidy-up-for-mac-a-short-review-clean-up-missing-thumbnails-in-iphoto/</link>
		<comments>http://blog.abodit.com/2010/07/tidy-up-for-mac-a-short-review-clean-up-missing-thumbnails-in-iphoto/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 05:04:15 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[Commentary]]></category>

		<guid isPermaLink="false">http://blog.abodit.com/?p=983</guid>
		<description><![CDATA[Recently I accidentally imported a batch of photos into iPhoto twice. With over 1,000 duplicates to clean up I went looking for an application that could do the job. I found Tidy Up! which looked like exactly what I needed. It had a professional looking UI and I was in a rush and so I <a href="http://blog.abodit.com/2010/07/tidy-up-for-mac-a-short-review-clean-up-missing-thumbnails-in-iphoto/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>Recently I accidentally imported a batch of photos into iPhoto twice.  With over 1,000 duplicates to clean up I went looking for an application that could do the job.  I found Tidy Up! which looked like exactly what I needed.  It had a professional looking UI and I was in a rush and so I skipped my normal due diligence on reviews, forums and tests and paid $33 to unlock it.  $33 and countless hours of frustration later I have to conclude that it simply doesn&#8217;t work as advertised.  </p>
<p>The UI is complex and despite numerous attempts with different options it still wasn&#8217;t finding the duplicates &#8211; sometimes it would spin for minutes and then declare no duplicates, sometimes it would find some but not all.  I finally found a setting that seemed to find all my duplicates and I launched it into deleting them.  iPhoto began flickering wildly as it did its work but it gave no indication as to how far it had progressed or when it would finish, so I left it running.  In the morning it seemed to have stopped running but iPhoto would not quit.  I reluctantly did a force quit and restarted it.  Disaster &#8211; it had deleted the images but left the thumbnails in iPhoto for each of the duplicates it had found.  Worse still, there were still lots of duplicate images left in my library.  Undeterred I tried the option to find images with thumbnails but no backing files.  It found 1,900 of them so I asked it to delete them all.  That failed so I tried deleting just a few at a time from the list of 1,900 images.  After about 40 operations it claimed they were all gone and my library was clean.  Except it wasn&#8217;t, I still have missing images and I still have duplicates.</p>
<p>Next I tried an option to find photos by similarity in the time they were taken except the developer used the date instead of the date plus time so it lumped all the photos found on a single date and called them duplicates!</p>
<p>At this point I emailed to get my money back.  The developer send me a form which I dutifully filled in, signed, scanned and sent back.  But, oh no, that wasn&#8217;t good enough for him, he wanted me to mail the letter to Italy.  At this point I sent a strongly worded email and contacted Paypal to get a refund which came through.  The developer claimed that because it worked for thousands of other people there was nothing wrong with it and that he shouldn&#8217;t have to refund me, a classic case of &#8220;it works on my machine&#8221;!  It&#8217;s also a lesson that &#8220;because most customers can&#8217;t be bothered to call doesn&#8217;t mean they are happy&#8221;, for $33 most will just write it off as a failed investment.  A quick look at the forum showed just a handful of people using (or attempting to use) the product.</p>
<p>Based on my experience with the developer I would not recommend this product.  If you could try it and then pay if it worked that would be one thing, but having to pay to find out that it doesn&#8217;t work and then having to deal with the hassle of getting a refund makes this not worthwhile.</p>
<p>So now I&#8217;m back to cleaning up iPhoto by hand to remove duplicates and fix the thumbnails that still have no backing photo.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.abodit.com/2010/07/tidy-up-for-mac-a-short-review-clean-up-missing-thumbnails-in-iphoto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lengthening short Urls in C#</title>
		<link>http://blog.abodit.com/2010/07/lengthening-short-urls-in-csharp/</link>
		<comments>http://blog.abodit.com/2010/07/lengthening-short-urls-in-csharp/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 22:08:00 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[URL]]></category>

		<guid isPermaLink="false">http://blog.abodit.com/?p=977</guid>
		<description><![CDATA[If you deal with Twitter APIs, sooner or later, you&#8217;ll probably want to lengthen those short URLs back to long URLs. There&#8217;s a couple of services you can use to do this but it&#8217;s really quite easy so you might as well do it yourself. The code below follows each redirect until it reaches a <a href="http://blog.abodit.com/2010/07/lengthening-short-urls-in-csharp/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>If you deal with Twitter APIs, sooner or later, you&#8217;ll probably want to lengthen those short URLs back to long URLs.  There&#8217;s a couple of services you can use to do this but it&#8217;s really quite easy so you might as well do it yourself.  The code below follows each redirect until it reaches a real page (or an error), it then returns the last URL it finds.  </p>
<pre class="brush: csharp;">
        private string UrlLengthen(string url)
        {
            string newurl = url;

            bool redirecting = true;

            while (redirecting)
            {

                try
                {
                    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(newurl);
                    request.AllowAutoRedirect = false;
                    request.UserAgent = &quot;Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 4.0.20506)&quot;;
                    HttpWebResponse response = (HttpWebResponse)request.GetResponse();
                    if ((int)response.StatusCode == 301 || (int)response.StatusCode == 302)
                    {
                        string uriString = response.Headers[&quot;Location&quot;];
                        Log.Debug(&quot;Redirecting &quot; + newurl + &quot; to &quot; + uriString + &quot; because &quot; + response.StatusCode);
                        newurl = uriString;
                        // and keep going
                    }
                    else
                    {
                        Log.Debug(&quot;Not redirecting &quot; + url + &quot; because &quot; + response.StatusCode);
                        redirecting = false;
                    }
                }
                catch (Exception ex)
                {
                    ex.Data.Add(&quot;url&quot;, newurl);
                    Exceptions.ExceptionRecord.ReportCritical(ex);
                    redirecting = false;
                }
            }
            return newurl;
        }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.abodit.com/2010/07/lengthening-short-urls-in-csharp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lunar Eclipse June 2010</title>
		<link>http://blog.abodit.com/2010/06/lunar-eclipse-june-2010/</link>
		<comments>http://blog.abodit.com/2010/06/lunar-eclipse-june-2010/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 17:20:32 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[My News]]></category>
		<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://blog.abodit.com/?p=968</guid>
		<description><![CDATA[I was fortunate to be in the right place at the right time to capture this sequence of images of the lunar eclipse. Shot from Cooloongatta, Queensland, Australia with a Canon 70-200 f2.8 lens the composite and some of my individual shots were wused by the BBC on their web site here and here.]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.abodit.com/wp-content/uploads/2010/06/EclipseCollage2.jpg"><img src="http://blog.abodit.com/wp-content/uploads/2010/06/EclipseCollage2-300x187.jpg" alt="Lunar Eclipse June 2010 Collage" title="Lunar Eclipse June 2010 Collage" width="300" height="187" class="alignright size-medium wp-image-967" /></a></p>
<p>I was fortunate to be in the right place at the right time to capture this sequence of images of the lunar eclipse.  Shot from Cooloongatta, Queensland, Australia with a Canon 70-200 f2.8 lens the composite and some of my individual shots were wused by the BBC on their web site <a href="http://news.bbc.co.uk/2/hi/10425234.stm">here</a> and <a href="http://news.bbc.co.uk/2/hi/science_and_environment/10414201.stm">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.abodit.com/2010/06/lunar-eclipse-june-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
