Heatmiser PRT-TS Wi-Fi thermostat not working after firmware update

I recently upgraded my PRT-TS Wi-Fi thermostat firmware from 1.2 to 1.6 and found that although it seemed to be working in every other way, it was no longer firing up my boiler when calling for heat.

This is because the Heatmiser hardware contains two relays (presumably so it can be shared with models that also incorporate hot water control), and thermostats shipped prior to 26th January 2012 (which includes mine) are programmed to use the one on the left for central heating, whereas newer thermostats use the one on the right (PDF link – note that although it specifically mentions 1.3 thermostats, mine was a 1.2 and it had the same issue):

To combat this problem, Heatmiser have two sets of firmware – the “A” set for older thermostats and the “B” set for newer thermostats. Unbeknownst to me, I had received version 1.6b when I should have been sent 1.6a.

There are two options to fix this – either have Heatmiser send out a programmer with the 1.6a firmware, which would take a few days, or – as I did – simply rewire the thermostat as per the corrected wiring diagram. Obviously I recommend that you hire a qualified electrician to do this if you’re not proficient yourself.

Unfortunately it’s not possible to determine which firmware you have been sent until you’ve flashed your thermostat with it, so if you decide to upgrade, I recommend you check the label on the rear of your device and check with Heatmiser that they are sending the correct firmware type (A for the top diagram marked with a cross, B for the middle diagram marked with a tick).

How to set up a web interface for a Heatmiser wi-fi thermostat using a Raspberry Pi

My earlier post on the Heatmiser PRT-TS wi-fi thermostat proved very popular and is the most commented article on this blog. When commenter Rich mentioned the heatmiser-wifi project, a set of Perl scripts that can be installed on a PC or Raspberry Pi to provide a full-featured web interface for the Heatmiser, I just had to give it a go.

Although the project site mentions that it has been tested on Raspberry Pi, I just couldn’t get past one of the steps. A little bit of Googling revealed a possible solution, and it worked. Be warned, the process takes a little while but in my opinion the results are definitely worth it.

Installation of Subversion and the heatmiser-wifi software

To get hold of the software, you have to check it out using the Subversion (SVN) source control system. So the first step is to install SVN:

sudo apt-get install subversion

You can then run the following command to download the heatmiser-wifi software:

svn checkout http://heatmiser-wifi.googlecode.com/svn/trunk/ ~/heatmiser-wifi-read-only

This will create a folder called heatmiser-wifi-read-only in your home directory. If you want to specify a different path, edit the command as appropriate.

Install Perl and essential packages

Check that Perl version 5 is installed by running:

perl -v

This should return some output starting with the following (or similar):

This is perl, v5.10.1 (*) built for arm-linux-gnueabi-thread-multi

If not, install Perl using:

sudo apt-get update
sudo apt-get install perl5

Now you need to install the required packages:

curl -L http://cpanmin.us | perl - --sudo App::cpanminus
sudo cpanm CGI Cwd DBI File::HomeDir Getopt::Std IO::Socket JSON LWP::UserAgent Proc::Daemon Proc::PID::File Time::HiRes
sudo apt-get install libxml-simple-perl
sudo cpanm XML::Simple

This takes a long time, so you may want to have a cup of tea, run a bath or go for a walk!

(Note that the original instructions had the CPAN modules listed on one line, omitting the apt-get before XML::Simple, but this didn’t work for me, hence the change. Also I had trouble getting the standard cpan command to work on the Pi due to its limited hardware, hence using cpanminus instead.)

Test the installation

Run the following command, adjusting the path if necessary, replacing 192.168.0.100 with the actual IP address of your Heatmiser and 1234 with the PIN number:

~/heatmiser-wifi-read-only/bin/heatmiser.pl -h 192.168.0.100 -p 1234

You should get some output like this:

Heatmiser PRT version 1.2
Thermostat is ON (heating mode)
Time 2012-07-07 21:45:59
Temperature 23.5 deg C (internal)
Target 17 deg C
Heating is OFF
Feature 01: Temperature format C
Feature 02: Switching differential 1 deg C
Feature 03: Frost protect 1
Feature 04: Frost temperature 15 deg C
Feature 05: Output delay 0 minutes
Feature 06: Comms # n/a
Feature 07: Temperature limit 0 deg C
Feature 08: Sensor selection internal
Feature 09: Floor limit n/a
Feature 10: Optimum start disabled hours
Feature 11: Rate of change 20 minutes / deg C
Feature 12: Program mode 5/2 day
Weekday 1: 07:00 20 deg C
2: 07:30 17 deg C
3: 17:00 20 deg C
4: 21:30 17 deg C
Weekend 1: 09:30 20 deg C
2: 21:30 17 deg C

For the rest of the steps to work, you need to store the IP address and PIN number in a config file. To do this:

sudo nano /etc/heatmiser.conf

Type the following two lines, substituting 192.168.0.100 with your thermostat’s actual IP address, and 1234 with its PIN:

HOST 192.168.0.100
PIN 1234

Press Ctrl+X and type Y to save the file.

You should now be able to run the following command (same as before but without the IP and password, which will now be read from the conf file).

~/heatmiser-wifi-read-only/bin/heatmiser.pl

Set up the web interface

Happily the project’s web interface instructions seem to work fine on the Pi without any changes.

I have also set up logging and charting of external temperature (via the Met Office API). Frustratingly, my Met Office API key didn’t work straight away – it kept returning Invalid key please register at http://www.metoffice.gov.uk/public/ddc via both the heatmiser_weather.pl script and the “preview data” feature on the Met Office site itself. Also note that it will take up to five minutes for the weather table to start populating, unless you’ve increased the rate in the heatmiser.conf file.

“Cannot save the property settings for this Web Part” error when using SmartPart in SharePoint

I recently deployed a custom user control using SmartPart on SharePoint 2007, and although everything else seemed to work fine, I came across the following error when trying to edit the properties (in my case, the chrome type and width):

Cannot save the property settings for this Web Part. Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))

I managed to resolve this, thanks to an MSDN forum post, by changing one of my lines of code:

using (SPSite oSiteCollection = SPContext.Current.Site)

to the slightly more long-winded:

using (SPSite oSiteCollection = new SPSite(SPContext.Current.Site.ID))

I’m not sure why using SPContext.Current.Site directly (versus creating a new SPSite object) causes this behaviour, but at least it’s a simple fix.

How to disable time synchronisation under Virtual PC 2007

One of the benefits of the Virtual Machine Additions for Virtual PC is that the time is automatically synchronised with the host machine. In most cases this is desirable, but I ran into a case recently where I needed to test something using an earlier date, and not realising this I wrestled with the time settings of the guest OS to no avail – it just kept resetting to the current time!

The process for disabling this feature (on an image-by-image basis) requires editing the VMC file and is detailed at Ben Armstrong’s blog.

How to increase/decrease the time your iPhone rings before diverting to voicemail

The iPhone supports ringtone of up to 30 seconds, but most networks will divert to voicemail before you gets a chance to hear the full ringtone.

The way around this is to instruct your network to increase the delay before a caller is sent to voicemail:

  1. Via the Phone app, enter *#61# and press Call.
  2. Write down the message that appears after “Forwards to”. This is your voicemail access number.
  3. Now dial **61*xxx*11*y# (where xxx is your voicemail access number and y is the number of seconds before the call should be sent to voicemail – this must be a multiple of 5 seconds) and press Call.

I have tested this tip on an iPhone 3GS on Orange and an iPhone 4 on O2, but it should work on all phones and networks as it’s a standard GSM feature.

How to cut your own micro SIM card for free, in time for iPhone 4 launch day

I braved the queues (actually, the barrage of error messages) on Tuesday, 15 July, to pre-order my iPhone 4 direct from Apple. Hopefully I’ll save in the long run as I’m planning to go for a £10-15 pay-as-you-go or SIM-only contract deal rather than being tied in to a £30+ contract for 18 to 24 months.

Until I’ve figured out which operator to go with, I plan to stick with my current O2 contract. I’ve crossed my fingers that O2 will ship me a microSIM before I get the phone, otherwise I will be going down the DIY route, trimming my existing SIM down using this PDF template. In case you don’t read German, here’s a quick translation of the instructions:

Micro-SIM template for iPad/iPhone 4 SIM cards

The Apple iPad (and upcoming iPhone 4) uses not a standard 25x15mm SIM card, but a micro-SIM. The micro-SIM format is 15x12mm, but the contact layout is identical to a standard SIM.

Therefore, it is possible to convert a standard SIM into a micro-SIM which can be installed in the iPad or fourth-generation iPhone.

How does it work?

  1. Print the stencil at 100% – don’t shrink to fit the page. The outer black portion should match the size of your existing SIM.
  2. Cut and paste the stencil on the back of the SIM (not on the contacts!). The white area must be exactly on the reverse side of the chip.
  3. With sharp scissors, cut cleanly along the outline of the inner white area.
  4. Remove the stencil. If necessary,  diagonally trim the corners and/or grind down the edges with a nail file.

I accept no responsibility if you damage your SIM by following these instructions… in fact I’m too busy worrying about whether I’ll break mine!

There are commercial card cutters that can do the job, but I can’t justify spending upwards of £20 for something I’ll only use once or twice at most, and again there’s no guarantee that the item would be delivered by launch day.

Repairing Dell MediaDirect blue screen issue

My brother-in-law recently reported a problem with his Dell XPS M1530 laptop. When starting the laptop (using the power button), it displayed a greyscale Dell MediaDirect logo for a few seconds, then a Blue Screen of Death relating to a Plug & Play driver.

When I restarted while holding F8 in an attempt to access Windows Vista in safe mode, the boot menu showed only “Windows XP Embedded”, and booting into safe mode just resulted in another blue screen. This is when I began to suspect the MediaDirect feature, which allows users to view media such as DVD movies without having to boot into full Windows.

Sure enough, when I powered off the machine and pressed the “Home” logo button, the laptop attempted to boot into MediaDirect (with a colour logo) and showed the same blue screen as before.

I did some research online and ended up finding a download for a MediaDirect Repair boot CD. This appeared to run successfully, but actually didn’t help. Now when I booted up, I just got a black DOS-type screen with the text “2 active partitions” in the top left-hand corner. It looked like the repair CD had somehow corrupted the partition table by setting two partitions as active – not good news!

Fortunately, I found a forum post by a user of a different model of Dell laptop running Windows XP. This inspired me to try the Vista recovery CD (you can also use your original Vista installation CD if you have it to hand), running the BootRec /FIXMBR and BootRec /FIXBOOT commands as detailed in this knowledge base article.

This fixed the issue and the laptop was now able to boot into Vista as normal.

I then tried my luck with powering off the machine and booting into MediaDirect using the “Home” button. Unfortunately this brought the system back to its earlier, broken state, and turning it off and on again using the power button revealed that I wasn’t able to get back into Vista!

I repeated the BootRec steps and this got the system working once again. Further research showed that Dell have released a new version of MediaDirect which removes the “dual boot” functionality, so I can only imagine they’ve had quite a few problems with it!

I returned the machine it to my brother-in-law with instructions not to touch the Home button for the time being, and to try installing the new MediaDirect software. I’ll report back when I hear the results.

Removing Excel macro passwords

At work, I recently needed to edit a database connection string in an Excel spreadsheet. Unfortunately the macros were password protected, the person who wrote the spreadsheet left the company some years ago, and we had no record of the password.

Luckily, thanks to a post on David Bugden’s blog, I discovered that it’s simple to circumvent VBA macro password protection without having to purchase a commercial utility such as Passware’s VBA Key.

The hex editor method worked for me in Excel 2003, although I’m not sure whether Microsoft have beefed up the security in 2007 and later versions.

If you want to remove the password used to protect/unprotect worksheets and workbooks, there is some information available here.

Auto Aid breakdown cover: the other AA

Having held an AA membership for just under a year, I recently had occasion to call them out for the first time. I wasn’t at all pleased with the experience, so decided to vote with my feet and look into signing up with one of their competitors.

When I mentioned this to a colleague, he recommended Auto Aid. Like the AA, the RAC and Green Flag, they provide breakdown cover for £37 per year, which is quite reasonable. They don’t operate their own recovery fleet, but instead send out a local garage to pick up your car. You then pay the cost of the recovery on your credit card and claim this back from Auto Aid. A year’s membership costs £37, which covers yourself and your spouse and includes recovery to and from anywhere in the UK,  even if you break down on your doorstep.

I hadn’t heard of Auto Aid before my colleague mentioned it, but renowned financial expert Martin Lewis has good things to say about Auto Aid on his Money Saving Expert website so I decided to give it a go.

Their website is basic but tells you everything you need to know. I filled in the online application and received a call back the next day to confirm that I wanted to go ahead and to take my payment. Five minutes later, I was covered, and for a fraction of what the AA would have charged me for renewal.

Hopefully I won’t need to call them out any time soon, but if I do I’ll be sure to report back. I’d be very surprised if they did any worse than the AA though, given my recent experience!

Find the fastest DNS server with Google NameBench

One of the factors that dictates browsing speed is the time it takes to do a DNS lookup – that is, convert a domain name such as google.com into an IP address such as 209.85.227.105. Generally most people use the DNS servers operated by their ISP. Usually this is fine, but sometimes ISP DNS servers can be unreliable, and they’re not always the fastest choice.

There are many free public DNS services, such as OpenDNS and search giant Google’s Public DNS, but it’s difficult to know which one is best for you. Enter NameBench, a free cross-platform tool which tests a raft of public DNS services using either your browser history or a list of top domains. Once the tests are complete, you receive a summary of the results including suggested primary, secondary and tertiary servers:

So if you’ve got a few minutes to spare, why not see if you can shave a few milliseconds from your page load times?