Home Automation Project – Raspberry Pi Heating Controller – Part 1

pi-controlI’m going to build a home automation project which connects a Raspberry Pi to control my central heating. I wasn’t particularly happy ripping out all the existing controls, and wanted to piggyback onto them.. which helps if the Pi ever fails (I’ve still got the old controls to fall back on).

I also didn’t want to mess with the existing heating control board, so bought a duplicate unit (British Gas UP2) from eBay for about £12.. I can perfect the project on that, and install it when I’m ready.

This set of videos goes through each step of the project.. starting off with opening the control board, an overview of what I want to do, and testing out the changes.

Opening up the Control Panel

This was a bit tricky.. it wasn’t quite obvious which plastic clips needed pushing in to pull the board out.. if you were doing this on your actual panel (not an eBay-bought duplicate) then this video should help work out what you need to do to get into it without damaging anything.

 

Project Overview

Next up, I’ll quickly go over what I intend to do to piggyback onto the control board. There’s a project here which did exactly what I wanted to do. He’s not using a PiFace 2 like I intend to use, and he wants to be able to control the hot water as well, but everything else is the same.

 

Safety First – Masking off the High Voltage Area

In this second video, I’ll show how I’m masking off the high voltage area of the board to make it a bit safer when I’m testing things out. Obviously most of the time the board is off, but this helps keep things safer when it is on without the cover.

 

Identifying Solder Points

Luckily this blog gave me a good starting point, but it wasn’t clear where to get the status of the central heating.. I used a multimeter to find a spot which changed voltage when the system was on, and this diagram shows you what I found;

pi-heat-3

Soldering

Since I only needed 4 wires for this project (2 for the switch, and 2 for the system state), I took an old USB cable, cut the ends off, stripped the wires and soldered it to the board without much trouble.

pi-solder

Soldering Complete!

This shows the control board after the soldering has been completed.. it’s pretty simple soldering; the only tricky part was finding the points to connect to for the system state (on/off). I’ve stuck down some of the wires so that they don’t catch or get stuck underneath the control boards buttons.

 

Testing the Wiring

Now that I’ve done the soldering, I’m testing out the wiring.. seeing whether connecting the two wires for the switch turns the central heating on, and when it is on, whether we get voltage on the other two wires to indicate the system state.

 

Controlling from Software

I’ve now hooked it up to the Pi Face 2 board, which can be controlled with a few lines of Python to simulate a button press, and detect the state of the system.

With these basics in place, the rest of the control software can be written to do scheduling, bring in temperature readings, and allow the system to be controlled remotely.

Foscam FI8910W Review, Unboxing, and tips

foscam Over the past 3 years I’ve had the Edimax IC-1310 working in my home without many problems. It’s great to be able to monitor the house when I’m away & know that I’ll not have any nasty surprises when I get back.. well at least from a living room point-of-view.

The Foscam range of webcams caught my eye, specifically the FI8910W which can use a wireless network connection, and is steerable. I like the fact that this gives it a lot of placement flexibility.. just needing a power source & off it goes. This newer model has an IR-Cut filter which gives better colour reproduction from it’s predecessor. I paid about £65 for the white version from the official UK-based Foscam distributor; there was a 10% coupon code floating around on the web, which brought the price lower than Amazon.

Here’s what’s in the box;

Initial setup of the camera is supposed to include you installing some Windows app to find the camera’s IP address on your network; my router gives me a list of connected devices, so I chose to forego the app and use the router’s info instead. I could log into the camera once I had it’s IP address, and configured it to connect over wifi, altering a few other settings as I went (disabling the DDNS service, since my Edimax camera is already updating dyndns.org with my externally visible IP).

As long as you’re used to fiddling with things like port forwarding you’ll have everything set up within 10-15 minutes; there’s not a lot to it & these days it’s handy to have a phone on 3G to check things are working correctly. I added a few extra user accounts, and had TinyCam Monitor for Android working in no time at all.. specifying the local network IP on the main settings, and the DynDNS address on the extra 3G settings page.

Being able to steer the camera is really handy.. when you have it pointing in the right direction, you can save it as a preset, both from your browser, or from an app like TinyCam Monitor. I’ve set mine to mostly look out of the back window, but can swivel it round to look into the kitchen & hallway.. even up to the skylights, etc.

The quality of the images is pretty decent, but at 640×480, they’re not exactly HD quality. Motion detection is a tad limited.. even compared to my 3yr old Edimax. There’s no way to specify zones for motion detection, and it only uploads 2 .jpeg files for each motion capture event (the Edimax can upload 5 second videos!).

Annoyingly, even if you turn off the IR LEDs, they’ll switch back on the next time the camera is rebooted.. which is a real pain when the camera is looking out of a window (you only see the bright glare of the LEDs shining back at you!). Hopefully that’ll get fixed in a future firmware update, but I’m not betting on it. Talking of firmware, make sure you upgrade it.. the latest versions include some (unspecified) security fixes.

Overall, I’m still impressed with the camera.. the price point is just right when you compare it with the features and annoying niggles.

For anyone who wants a direct URL to a jpeg snapshot from the camera, then this is the correct URL format;

http://your-external-ip:port/snapshot.jpg?user=whoever&pwd=letmein

That should be handy for anyone who has a HTML dashboard page, or a desktop widget that accepts webcam image URLs.

And here’s a sample image from the camera as it points out of my back window.. a window that needs a clean! And yes, that’s a sink plunger on the patio.. for some bizarre reason the kids enjoy playing with this more than the billion toys they’ve got ;)

Foscam FI8910W snapshot

ASUS RT-N56U Wireless Router Review

The Belkin 54G wireless access point I’ve been using for a few years has been suffering since we extended the house.. there’s just not enough range on it, and it tends to temporarily lock up if it’s hammered a lot.

Finding a replacement took a lot of research, but I eventually decided on the ASUS RT-N56U, costing about £85, after reading some great reviews, including one in PC Pro. It’s worth reiterating that it doesn’t contain an ADSL router.. so if you’re on that type of broadband you’ll still need one of those in your set up. I’m happy with that, since the master socket isn’t where I want to place the wireless router anyway.

Configuration was straight-forward, aided by a decent web interface. As soon as I plugged it in I upgraded the firmware to the latest version from ASUS. I’d also seen that there are unofficial firmwares from a Russian group which are meant to fix a bunch of stuff & add new features. I’m sticking with the ASUS firmware unless I hit stability problems or find that I want to tinker later on. I certainly like the option to have a customised firmware should the need arise.

After having it running for a few days I’m really impressed with the speed and coverage across the house. It allows you to either use one SSID for 2.4Ghz and one for 5Ghz.. which lets you decide which band you want a device to use. Or set the same SSID for both, and it’ll automatically switch you over to the fastest band according to the signal strength. I was in the kitchen, and it connected on what must have been the 2.4Ghz band (due to the distance), then moved to the living room where the speed shot up & was obviously using the 5Ghz band.

Here’s a table showing how the signal strength has been affected by the upgrade;

Signal Strength (dBm)
Postion ASUS Belkin
Utility Room -70 -75
Kitchen Diner -76 -85
Lounge -45 -63
Bedroom -61 -75
Bathroom -76 -85

 

And here’s my unboxing video;

Custom Firmware on the Humax HDR-Fox T2

After the untimely death of my Topfield box, and less than stellar performance of the 3view box, I ended up sending that back & buying the Humax HDR-Fox T2. Since I bought it over a year ago there’s been a huge amount of progress on a custom firmware which enables you to install ‘packages‘ that add a whole bunch of new features, including;

– Web-based interface for controlling the box, searching the EPG, etc.
– Smartphone optimised web interface
– Auto-filing script for placing series linked programs in designated sub-folders
– Remote scheduling interface for setting timers on the box remotely
– Recording trimming to cut off unwanted segments of recordings
– Custom TV portal (offering Sky Player support)
– And loads more!

There are some videos on YouTube that show a lot of these features in action, together with a guide showing exactly how to install it onto your box. It’s a simple, and reversible process & the guys that have worked on it have helped improve the features on the box no end!

NZB-to-Server Automation

The HTPC I’m using is also my download box. It started to get really tedious to VNC onto it & surf for NZB files, and manage things that way. Now I do it all from my laptop and use a relatively simple batch script to get the NZB files onto the server.

Here’s what’s involved;

Automatic Save Folder – Firefox Add-On

This useful Firefox add-on is used to save the NZB files to a specific folder without even prompting me where to put it. Saves a few clicks and having to re-select the same folder all the time.

Batch Script

One I’m done with the NZB files I then use this simple batch script to map a network drive to the server & move them into a specific folder. This script is then pinned into my Windows 7 Programs folder so that it’s simple to run with a few keystrokes.

Rem EXTRACT ALL ZIP FILES

c:\progra~1\7-zip\7z x "C:\Users\blah\Documents\_altbinz\nzbs\*.zip" -o"C:\Users\blah\Documents\_altbinz\nzbs"

Rem DELETE ZIP FILES

del "C:\Users\blah\Documents\_altbinz\nzbs\*.zip"
del "C:\Users\blah\Documents\_altbinz\nzbs\*.nfo"

Rem MAP NETWORK DRIVE (TEMPORARY)

NET USE T: \\192.168.1.10\htpc /Persistent:No

Rem MOVE ALL FILES TO SERVER

move "C:\Users\blah\Documents\_altbinz\nzbs\*.nzb" "t:\usenet\nzbs-import\"

Rem UNMAP NETWORK DRIVE

NET USE T: /DELETE

pause

Alt.Binz Auto-Import Feature

The alt.binz client allows you to automatically import NZB files from a speified folder. It does this automatically & can delete the NZBs after it’s done. This is perfect for what I’m attempting to do here.

Harmony 600 Replacement

Due to a clash with a toddler and my Harmony 555 all-in-one remote I bought a Harmony 600 in September last year. In the last month it’s been repeatedly rebooting/restarting. A new set of batteries sorts the issue out, but only for a couple of weeks, and then it starts happening again. There’s a thread on Logitech’s support site which talks about the problem, so it’s not an isolated issue.

The good thing is, that after raising a support ticket on Sunday, it only took a couple of message exchanges before they said it was faulty & shipped a new remote. They don’t even ask for the old one back, since they can de-activate it on their servers so that it can never be updated online.. pretty much rendering it useless, because there’s no way to update it without using their online app.

Kudos to Logitech for sorting this out so quickly! Really impressive.

Slow Cooker Power Consumption

When I was looking to buy a slow cooker I didn’t find much on specific power usage. I guess it depends on your model, but even general figures were hard to find. Now I’ve got one, here’s the deal;

Morphy Richards 3.6 litre crockpot (bought from Argos in Sept 2010)

High 160w
Low 118w
Warm 37w

The readings I took for cooking a full meal for 10.5 hours (high at the start, the low for most of it, then warm for a while), used 1.23kw of electricity. There’s no thermostat so it idles along at whatever power setting you’ve chosen. At today’s UK energy prices you might be looking at 12p per kw of energy, and therefore about 15p to slow cook a meal.

It’d be interesting to know how much energy it would take to cook this purely on the hob, in some ways I’m guessing it might be cheaper, but the convenience of the slow cooker for some meals is what appeals.. plus 15p isn’t exactly expensive.