Exploring Home Automation / IoT

The term IoT has seemingly sprung up out of nowhere recently. It stands for Internet of Things, and from everything I hear it is going to be big – both in the enterprise and for individuals / households. In the last year I’ve been drawn into this as a hobby, exploring how I can improve my home to (possibly) improve my life. Now that I have an understanding and have completed a few projects, I thought I would blog about them to detail my experiences.

In short, I’ve been doing a bit of electronics and a lot of coding, and now my house is smarter than it was. The thing is, once you start linking parts of your house together, you start thinking of even more things you can do…..if only you did a little more coding or wiring! ๐Ÿ™‚ So, this blog post covers where I am right now, and I’ll also try to cover some of the ideas I have for future projects (when time permits).

I must warn you – this is a long post! I decided against splitting it up into multiple posts, instead deciding to rely on you, the reader, to bite off chunks of the post as your precious time permits ๐Ÿ™‚


I think the project that really tempted me into home automation / IoT is the openHAB project. I was at Devoxx in Antwerp, Belgium in 2012 and attended a session presented by Kai and Thomas on the openHAB project, and could instantly see the value of their work. In short, openHAB is an event bus over which home automation events are sent. These events are created by items around the home. To link these items into openHAB you use bindings, and as of now openHAB ships with well in excess of 40 bindings, for all kinds of things (like Philips Hue light bulbs, XBMC, KNX, ZWave, Tivo, etc, etc, etc). In other words, lots of things! Bindings are relatively trivial to write (assuming the hardware they talk to exposes a means of communication), and there is a community of developers constantly improving and adding new bindings – I even developed two (one for the OpenSprinkler system, and another for Tivo devices).

The other nice thing about openHAB is that it has a rules system, so you can have openHAB respond to events by doing things or firing additional events based upon conditions being met. I have written a lot of rules, and will talk about some of them below! ๐Ÿ™‚

Initially, I explored using openHAB on a Raspberry Pi device, but even after fixing a few memory leaks in openHAB (thank goodness for open source!) I found it was just not responsive enough for my liking (especially when attempting to communicate with openHAB via its Android application). For people starting out with openHAB , if you have a Pi lying around, there is no harm starting there – it is trivial to move to another device at a later stage. What I moved to was a small, low-power PC I had lying around. This provided way more CPU and memory and openHAB was significantly more responsive.

First project: water tank filling

My house is not connected to a city water supply, which means all water comes via whatever is collected on the roof, and stored in an underground tank. Well, that is not entirely true: there are four taps scattered around my property that have very low-pressure water that comes from an external water source. In times of desperation (e.g. during the summer droughts) we have used this water supply to top up our water tank, and it has been a life saver (not to mention the savings to my bank balance – last year others around us had to bring in 5-10 truckloads of water to keep the water flowing over the summer dry spell)! Not wanting to be wasteful of this wonderful resource we have, we were always conscious to turn the tap off as soon as we thought the tank was full, but we could never be certain, and almost certainly we occasionally wasted water by leaving it running over night one too many nights in a row.

My idea was simple: run a water pipe under ground from the nearest tap and into the water tank. I could use a 24VAC solenoid water valve to remotely open and close the flow of water into the tank, and I could mount an ultrasonic sensor at the top of the water tank to measure how full it was. My current progress on this project is that I have done the first half (underground hose into tank with water valve), but the ultrasonic sensor is still a work in progress (I need to find time to get back under my house and run another cable).

To achieve this, I purchased the previously-mentioned OpenSprinkler Pi, and run a cable from my Pi (in my server closet) to a water valve (located under my house and near to the water tank). I also drilled a hole into the side of the tank (above the max water level, obviously!) and run a pipe from the valve into the tank. I then wrote the OpenSprinkler binding (there is a video I made that demonstrates this binding in action – beware of the Kiwi accent!) for openHAB, and configured my openHAB instance to make use of this binding. This allows me to open and close the water valve from my phone, which is good, but isn’t much better than what we had previously (except I guess the plumbing is now entirely hidden under ground and under the house).

This will improve, however, once the ultrasonic sensor is mounted at the top of my water tank. Once that goes in I can trivially write rules to open the valve when the tank level reaches 50%, and to stop filling once it reaches 80% (or whatever criteria I want – my main goal is to minimise wear and tear on the valve related to switching state). This means that the tank will remain full all year round without ever needing intervention from me! It will also warn me when someone forgets to turn a hose off and uses up all the water (this has happened once or twice when we were painting the house last summer – it was not a good thing!) ๐Ÿ™‚

In writing the OpenSprinkler binding for openHAB, I enabled it to run in two different modes. The first mode I wrote was specifically for the use case where openHAB was running on a Raspberry Pi with the OpenSprinkler Pi attached directly to it. This implementation therefore directly talked over the GPIO pins to OpenSprinkler and toggled the shift register bits to turn watering valves on and off. As noted above, I started with openHAB on a Pi, but switched. Fortunately I had also implemented my OpenSprinkler binding to communicate with the OpenSprinkler via HTTP, and this is the implementation I use today.

Another project I have in the works is to add in a water flow meter (I have one sitting here on my desk) just on the other side of the water valve, so that I can be sure that when the valve is open that water is in fact flowing (with this particular water supply you can never be sure of that!). I was originally planning to use Pinoccio boards to do this (as well as the garage door / gate control later), but given their frequent delays I’ve instead decided I’ll implement this using the same Raspberry Pi that is hooked up to the OpenSprinkler system.

Second project: garden irrigation

Now that I had the OpenSprinkler Pi and openHAB hooked up, it was trivial for me to run some garden irrigation pipe through separate water valves to irrigate other areas of my property. All I needed to do was run a cable from the OpenSprinkler Pi to each valve, and to update openHAB to know about them.

There are two nice things about my garden irrigation implementation:

  1. I specify when the irrigation is run via a Google Calendar that openHAB can access. All I do is create appointments in Google Calendar for the specified time and duration, and in the description field I can input rules that openHAB can interpret. In this case the rules simply turn the irrigation valves on and off, as appropriate.
  2. With openHAB I can write rules like “when the irrigation is running, start filling the water tank”. This just saves me from thinking and worrying (although in the longer term – once the ultrasonic sensor is in place – I will probably remove this rule in lieu of deferring to that).

This project has a high wife acceptance factor as it helps to keep her garden alive during the hot and dry summer.

One project I would like to do here is to download weather information relating to rainfall and to have this guide whether irrigation should be run. I’ve written code to download the information from weather stations around the region, but the data is not real-time and a little ‘lumpy’ for my liking – so I’ll probably have to find a better source of the data.

Third project: home media / telecommunications

My house has two Raspberry Pi devices being used as media centers (both running Raspbmc). One is located under our primary TV in the lounge and the other hooked into our surround sound receiver and projector in the sunroom. Both Pis connect to a NAS where they can access our music, movies, photos, etc. We can already control both Pis using our phones / tablets (using the excellent Yatse Android client), but there was so much more I wanted to do. Here’s a summary of what I’ve achieved so far:

AV Receiver

Our AV receiver fortunately already had a binding written for it (it is an Onkyo receiver). We can therefore do things like turn the receiver on / off, change the volume, mute, change the source inputs, etc from openHAB. Even better, because there is a proper protocol that the Onkyo receiver can talk, we can also receive the state of the receiver (i.e. if it is on or off, what the volumn is, etc).

One thing the wife and I would occasionally do is stop playing music but forget to turn the receiver off. Now that the house knows immediately when the receiver turns on, I have written anย openHAB rule that checks if the receiver is on every three hours (after it was first turned on), and if it is, sends me an XMPP message to my phone / computer letting me know that it is still on, and once it is turned off again it stops checking. This is good piece of mind so we aren’t unnecessarily wasting power.

Home Router

My home router also fortunately had a binding written for it (it is a Fritz!box VDSL router). Because our phone line comes in through this router, openHAB can be informed of when the phone is ringing and what the caller number is. When a call comes in, openHAB can do a number of useful things (which I’ll mention elsewhere in this post). One example is that I have openHAB configured to send me an XMPP message (which is received on my phone). This is useful because most people I know don’t bother to leave messages, and I can call them back whilst I’m away from home.


The second binding I have written for openHAB is a Tivo binding that emulates a remote control for a Tivo over a network socket connection (unfortunately that is all that the Tivo offers – it is not possible for me to read the state of the Tivo – for example, if it is playing or paused). The wife and I primarily watch TV via our Tivo device. My primary use case is to pause playback when the phone rings – and this is very handy as it saves us from having to find the remote and pause the TV whenever the phone rings! ๐Ÿ™‚

If we are watching media on our XBMC clients, a popup message appears in the lower-right corner of the screen informing us of the callers number. Whilst the XBMC binding doesn’t support it quite yet, my intention is to do the same as the Tivo binding and pause playback whilst the call is underway.

With our standardisation on XBMC, I’ve also been able to get rid of one other thing that always used to annoy me – having to turn the receiver on when I started playing music out of the XBMC machine. Now all I do is load up Yatse on my phone and start playing music – openHAB sees that XBMC is now playing music, and starts the receiver up. If I stop playing music, it turns the receiver off again. Handy! ๐Ÿ™‚

Fourth project: home lighting

Of all my projects, being able to control lights in my house was the least likely to be beneficial, but I wanted to explore the technology a little, and I thought if I did it right, I could at least get some security benefits. My main criteria was that I didn’t want to replace the light switches in my house (as I had just replaced all the switches last year when I renovated), and I didn’t want to have to do any major rewiring. Fortunately, I stumbled upon Z-wave in-wall micro relays sold by companies like Fibaro. After a bunch of research into Z-wave (and a lot of cringing at the relatively high price for Z-wave devices), I ended up buying one Z-stick (to broadcast the Z-Wave signal from my openHAB machine), and two Fibaro 2×1.5KW relays. These devices go in the wall behind the light switch, and each one can control two light switches (meaning I was able to control four light switches in my house).

I decided to control the lights both inside and outside my front door (controlled by two separate switches), and my main kitchen and dining room lights (again, controlled by two separate switches). My ideas:

  1. Automatically turn on some of the inside lights some time before the sun sets.
  2. Because I live in the country and our house is visible from the road, I worry that having outside lights on at night just advertises the fact that no one is home. My idea was to allow me to set rules about when we go out of the house – for example, have the outside lights all off and the inside lights randomly alternating every few hours. As noted later on, I also have ideas around turning lights on automatically when the house is informed that we are returning home.

At present I have implemented the first idea – it was relatively trivial – I simply added code to openHAB to download the time of day that the sun sets, and to turn the relevant light on an hour before this. This is quite cool – it’s always nice to see the house thinking for itself ๐Ÿ™‚ I have not yet had the time to do the second idea, but it is high on my list when time permits.

Fifth project: garage door / gate control

Having done the Z-wave, I wanted to basically build my own version of the Fibaro relay device…..so I did. I used a Raspberry Pi, a magnetic reed switch, a cheap 4-relay board I purchased from Amazon a year or so back, and a small breadboard to wire it all together. I decided that I would use this contraption to control my garage door opener (using the relay and some cabling running up to the back of the garage door opener), and of course I placed one half of the magnetic reed switch on the garage door and the other on the frame to allow me to determine whether the garage door is open or not.

For me, the wiring took a short while to work out (I’m generally anti magic smoke), but I threw together the control software quite quickly. I built a Java-based server based on Jetty and Jersey. This allowed for me to have nice URLs that when accessed caused code on the Pi to do smart stuff out the GPIO pins – all written in Java (making use of the Pi4J project). In this case, I created REST endpoints for toggling the garage door, and reading whether it is open or not.

As with the water tank stuff, I had originally planned to do this with Pinoccio boards, but now that I was thinking with Pi, I realised that there was another benefit I could bring out of this Pi, given its location at the very end of my garage (and the fact there is no wifi reception from the house out there – but I do have a network cable going to it). The idea is simple: with my son on his way (and having been born on December 25th 2013), a few months ago I decided to renovate the back of my garage into a home office / sleep out. This would provide the necessary quiet zone to get work done. The downside is, as mentioned, I didn’t have wifi out there, only wired connections. I was going to put in a spare wifi router and have it act as an access point, but given the Pi is right through the wall in my garage, I decided to buy a cheap USB wifi adapter and have my Raspberry Pi act as a wireless bridge to broadcast out the wired network over the wifi adapter. This works really well! Soon as I get to my office my phone switches to the new wireless network! A good win – although it was finicky to get the Pi to bridge the network connection without losing its ability to be remotely accessed over SSH.

Around this time I got a few NFC stickers, and so far I’m using just one of them – I stuck it to the side of piece of furniture by our back door so that when I wave my phone past it the garage door opens. Handy ๐Ÿ™‚

Sixth project: location awareness

I’m only just starting to explore this aspect of home automation. The obvious use case is for the house to know whether its regular occupants are home or away. My current thinking is to use software called Mqttitude (basically a decentralised Google Latitude), which is basically an app that runs on iOS and Android and can report the devices current location to an MQTT broker (which I talk about more later on). Mqttitude is being actively developed and just recently added support for geofences, so you can specify important locations. I’ve been testing this out recently, and it works quite well. The next thing I’m yet to do is wire this into openHAB (no surprises there are MQTT and Mqttitude bindings for openHAB!). I’ll be sure to blog about this more in the future, but my current use cases include:

  • Turning on the house lights at night when we drive up to the house.
  • Open the driveway gate as we approach (and possibly close it when we leave).


This blog post turned out to be a mission to write, as I could write a whole heap more, and it turned out to be a bit of a brain dump! For those of you still reading, feel free to ask questions and I will try to respond directly or via a follow-up blog post. Before I finish this post, I thought I’d go into a bit more detail about some of my work and current thinking on how things will proceed, as well as ideas I have for software that should be written.


I’ve found theย Jetty+Jersey architecture I created for the GaragePi to be really useful. In fact, I developed additional REST endpoints to give openHAB more data so that openHAB could do more intelligent reporting for me. For example, I brought in some of my other side projects like my stock market tracker and foreign exchange code so that they can be easily accessed from a URL (rather as standalone desktop apps). Because openHAB has an HTTP binding, it can simply connect to these REST endpoints to download useful information that can be displayed and graphed inside openHAB. I’m thinking that I’ll eventually open source the architecture (although there is actually no special sauce there, just a bit of tedious setup).

Another thing I’ve been thinking of doing is improving this software to make it possible to request that updates get fired automatically to MQTT topics, to essentially switch the server from being pull-based to push-based. This would be opt-in, but would be nicer than having to frequently poll the server as we do now. The only way this would be beneficial (presently) is if I am able to register callbacks (or just poll) the GPIO pins on the Raspberry Pi – which I am sure would be lower overhead than doing frequent HTTP queries followed by GPIO queries that I do currently. I haven’t had a chance to look into Pi4J to see if this callback approach is supported, but I imagine it should be (and in fact, I just looked – it is possible).


In general MQTT intrigues me – but I feel like I still need to investigate it further. I have a feeling I will almost make it a duplicate event bus that runs in parallel to openHAB (and in fact, I see no reason why openHAB should have its own event bus when it could just use MQTT). By doing this, I can very easily interact with events happening inside openHAB (by seeing them on the MQTT ‘bus’), and also be able to interact with openHAB (by publishing on to the MQTT bus).

One piece of software I would dearly love to have (and I’ve been tempted to write in JavaFX) is basically an MQTT communicator. Imagine it like an email client – you can subscribe to topics (or just all topics), and receive notifications when they arrive. You could have rules to respond to different topics in different ways (for example, popup notifications, or have different actions fire on the computer, etc). With this software you could also easily push messages onto the MQTT bus, both on a whim and in reaction to incoming events. The only thing holding me back from starting on this is that there aren’t more hours in the day!


I’m having a blast playing with home automation. I realise that sometimes it can seem trivial and pointless, but from a mental exercise perspective it is a great challenge. I also realise that home automation would be a lot easier if I was willing to pay thousands of dollars for turnkey systems (like what Fibaro and others offer), but the beauty of the approach I’m taking is that it is cheap and I am intimately aware of the software stack from Linux up. It’s a point of pride in how little my home automation has cost in terms of money (and of course, assuming my time is free!) ๐Ÿ™‚

If you are interested in exploring this domain, I highly recommend looking into openHAB – they have a good mailing list, and an active community.

Finally – I hoped you enjoyed some original content on my blog for once! ๐Ÿ™‚

Scheduled backups for Raspberry Pi to a NAS

Because I have a few Raspberry Pi’s at my place, and I may get more in the future, and because I have a Network-Attached Storage (NAS) device, I figured I really should get around to backing up my Pi’s to prevent them from dying (as SD cards are apparently prone to do) and taking my data / configuration with them. To this end, I developed a really, really simple process that automates this and gives me a collection of gzipped SD card images, ready to recreate the state of my Pi. I saw on Twitter that there was some interest in this, so here is what I did.

If there are any questions feel free to post a comment – I’ll update this blog post to ensure it is as detailed as necessary.

Finally, I should note that this approach is based on a blog post by Martin O’Hanlon. The only real difference is that I have the Pi’s gzip the image file prior to sending across the network, and this substantially reduces the amount of space taken up by the images (especially if your Pi is running with a big SD card (e.g. 16GB)). This does of course increase the amount of time it takes to do the backup, and does require more CPU effort, so it is up to you whether you value speed or hard disk space more.

Steps to back up your Raspberry Pi to a home NAS device

1) Mount your NAS
I created a directory /home/pi/nas/backups. This directory will map to a ‘backups’ directory on my NAS. With this directory created I run sudo nano /etc/fstab to edit the Raspberry Pi file system list. I added the following line so that my NAS was automatically mounted at startup:

[code]//diskstation/backups /home/pi/nas/backups cifs username=pi,password=raspberry,workgroup=workgroup,users,auto,user_xattr 0 0[/code]

Note that this works because my home NAS has the name ‘diskstation’, and I’ve created a limited user account on there with username/password combination pi/raspberry (note that this isn’t the real username/password combination – please don’t try to hack my house) ๐Ÿ™‚

2) Create backup script
I created a really simple backup script. This script is located on the NAS in the backups directory. This means that it is accessible on the Pi via /home/pi/nas/backups, but my recommendation is to copy the file onto the Pi itself (on my Pi’s I copy it into /home/pi). I call this file ‘runSDCardBackup.sh’, and you’ll note it expects one argument, which is the name of the file it will write to. Here’s the entirety of the script:
# Script to backup the SD card of a Pi to the nas.
# This should be copied to the /home/pi directory on each Pi and then
# set in the crontab to run automatically on a set schedule.
# Be sure to pass in a single argument to name the backup file
# (e.g. homePiBackup or mediaPiBackup)
# Refer here for the original information:
# http://www.stuffaboutcode.com/2012/08/raspberry-pi-auto-backups.html
sudo bash -c "dd if=/dev/mmcblk0 | sudo gzip > /home/pi/nas/backups/$1.gz"

You may need to set this shell script to be executable. To do this, simply type the following: sudo chmod +x runSDCardBackup.sh

3) Set up the script to run on a schedule
Run sudo crontab -e to edit the crontab file. I set the script to run at 2:30am every Monday morning. Because I have multiple Pis at my house, I set the time to be different for each Pi so that the network doesn’t get flooded with SD card images flying over it. Here’s the line I added to the crontab file:

[code]30 2ย  *ย ย  *ย ย  1ย ย ย ย  /home/pi/runSDCardBackup.sh homePiBackup > /home/pi/nas/backups/homePiBackup.log 2>&1[/code]

You’ll note that I pass in ‘homePiBackup’ to the shell script – this is the name that the file will be given on the NAS. On each Pi I obviously use a different name – in my house they have names like homePi (for home automation), mediaPi (for home theatre), etc. You’ll also note that I’m sending the output to a log file on the NAS – again note that you’ll want a different file name for each Pi.

Firefox add-ons you should consider

I’m one of those people that likes to tweak my software to get it to work as well for me as possible. Firefox makes this very easy, as in most cases an add-on exists and it’s a simple matter of downloading it and configuring it. This post outlines some of my most favourite firefox add-ons – hopefully they may also be helpful to you. I’ll spend an inversely proportionate amount of time on each add-on, relative to how likely it is for you to already know about it. I also don’t plan to cover all of them.

Adblock Plus: Blocks annoying ads. Useful, but I’m waiting for people to tell me I’m cheating the Internet.

Blank Your Monitor + Easy Reading: One thing I really don’t like doing is reading white text on a black background (despite it theoretically being better for the planet, e.g. blackle). With this plugin, and a teeny bit of configuration, you can easily toggle any site you come across to use alternative colours, for example the more natural black text on a white background (or any other combination depending on what your eyes like to see).

Download Statusbar: Moves the download progress bars to the south of your web browser, saving you from having to have a separate window stealing focus / space in the taskbar. You can always bring up your old download window by ctrl-J.

Echofon: This is my preferred way of interacting with Twitter, given that it’s always visible in my browser, and doesn’t take up any further system resources. I have tried to use alternative, standalone applications, but I always feel more distracted with them as they pop out of my system tray. At least with Echofon I can ignore it when I’m in my IDE, for example. I imagine this is the exact problem with Echofon for many people, but it works well for me.

FaviconizeTab: Simple Firefox plugin to shrink tabs when double-clicked (or alternatively, but double-click is my preference), such that only the favicon is showing. I find this add-on incredibly useful and constantly have certain tabs set to automatically shrink when loaded. Very highly recommended.

FireFTP: This is all the FTP client I need, and once again it’s one less application I need to have installed on my system.

Read It Later: Want to know how I collect my list of Java desktop / JavaFX links of the week? I just store them all on Read It Later and load them all up each Monday morning. This is a great tool for this purpose, as it’s quick, does what it needs to, and doesn’t get in the way. If you are like me and always coming across interesting sites / articles to read, but don’t have the time to read them right now, just store it in Read It Later and load it up when you have a spare minute.

TabGroups Manager: Often times I have a tonne of tabs open, but they are split between bug reports I’m working on, work stuff, news sites, etc, etc. Often there are logical groups, and this add-on allows for exactly this. You basically get another row of tabs in Firefox, within which you can open other tabs. This allows for you to have a tab for bug reports, a tab for news / time wasting, a tab for work stuff, etc. Whilst it does cost you a few extra pixels of vertical chrome at the top of your Firefox window, I think it pays for itself if you’re anything like me.

My Firefox Chrome
My Firefox Chrome

Tiny Menu: I’ve rearranged my Firefox chrome quite a bit. In fact, you can see what it looks like to the right. You’ll note that rather than have the traditional ‘File’, ‘Edit’, ‘View’, etc, that I instead have collapsed this down into a single ‘Menu’ menu, which when clicked will show all other menus. I justify this simply by realising how infrequently I need to access these menus. Tiny Menu allows for precisely this functionality, and with a bit of toolbar rejigging, you can easily get back the space taken up by the TabGroups Manager. Of course, if you don’t need the TabGroups Manager add-on, you’ve just got a free ~25 pixels of vertical space that can go towards website content, rather than wasteful browser chrome.

Stop-or-Reload Button: You’ll note in the screenshot I don’t have a stop button. This was initially just because I had deleted it from the toolbar entirely, but then I came across this add-on that does the Smart Thing (i.e. what Google Chrome does I believe). This plugin hides the individual stop / reload buttons, and instead has just one button that shows the stop button when the page is loading, and the refresh button when the page has completely loaded. That’s one less button to have on the toolbar.

I thought I would end by mentioning that I make use of the Chromifox theme, which is basically a Google Chrome knock-off, but it looks clean and simple.

Finally, for what it’s worth, you’ll also note in the screenshot above that I’ve done away with buttons that I don’t need from the toolbar as well. You should seriously consider looking into this – you can get to the toolbar options by right-clicking in an empty space and choosing customise. You’ll be surprised what you don’t actually need.

Well, that’s it for now. I hope that this list helps others, and perhaps it’s a bit more useful than the all too common “Top 100 Firefox add-ons that you aren’t using” lists that seem to pop up all the time. Feel free to leave your thoughts in the comments of other add-ons you like.

Dealing with iTunes freezing up in Windows

Righty, fair enough, this post isn’t really along the lines of most of my other ones, but it has to be said that I’ve been particularly faithful to iTunes in the past, and I’m fairly certain I’ve blogged about things that have bugged me which I’ve fixed / resolved in one way or another. Tonight I decided to finally sort out another annoying ‘feature’ of iTunes, whereby it would freeze up every time a new song started playing.

As a quick background on my situation, I’m on a 64-bit Windows 7 install, but I’m fairly certain I’ve been suffering this throughout my time on a 32-bit Vista install as well. Whilst I obviously can’t be completely certain, the following has resolved the issue for me, and at least to me, it makes sense.

I’ve used Google Desktop for some time to index my system to make it searchable. I long resisted using one of these ‘always indexing’ applications, but I gave in a few years back when I got a decent computer, powerful enough that any slowdowns caused by constant indexing are negligible. My opinion now is that it’s a real life saver – and you should certainly consider installing it.

There is a caveat with these indexing tools however, and it’s pretty obvious: it likes touching all your files. Especially the ones you’re currently working with. This leads to frustration when I compile code, test something, and then want to send it off to the Windows equivalent of /dev/null – the files are being indexed by Google Desktop, and Windows packs a sad. When I’m doing a lot of compile/test/delete cycles, I normally turn off Google Desktop for a few hours – it makes life easier.

So, getting onto the iTunes freezeup issue. For whatever reason – I never looked into it – iTunes writes out to an XML file every time a new song plays. I’m sure you can see where this is going: it seems like there is a little bit of a tussle going on between iTunes and Google Desktop, leading to this iTunes freezeup.

Fortunately, the solution is simple: in Google Desktop (or your indexing system of choice), simply go into the preferences, and tell it to not bother indexing the following file:

c:\users\<account name>\appdata\roaming\apple computer\itunes\iTunesPrefs.xml

Of course, replace <account name> with your windows user name.

After doing this, everything works far better for me in iTunes. I probably won’t have another complaint for six months ๐Ÿ™‚

I hope this helps.