A Little Home Automation

I’ve mentioned elsewhere that I have a lamp timer and was finding it frustrating to have to manually change the on/off times throughout the year as the length of the day changes. One option I suggested using a computer to to give more flexibility and control.

Well I’ve been running with a setup that does use a computer for a few months now and it seems to be working well, so well that it’s controlling my Christmas lights too. In the end I didn’t wait for a Raspberry Pi (I already have a small Linux server that’s on 24/7, so just used that instead).

In my other article I posited using something like X10 to control it, but X10 plugs and controllers are fairly expensive. I had a set of three remote controlled plugs already and a bit of searching found that they could be controlled remotely. I got the set for free, but you can pick up similar ones in supermarkets and DIY places from as little as £5. Just be sure they adhere to one of the standards (such as Bye Bye Standby or Home Easy, which seem to be the most common in the UK). To send on and off signals I settled on a simple USB stick from a Swedish company to do just that.

The Transmitter

Telldus TellstickI opted for the Telldus TellStick, which isn’t cheap (though it’s the cheapest of their range), but it had good support on multiple platforms (including Linux) and saved me soldering or whatnot. It cost me £54.60 (inc VAT and postage) from Audon Electronics.

The unit is underwhelmingly small and looked a little disappointing when I opened the pack, but I plugged it in and followed the instructions to download and install the application and within minutes I was able to switch a socket on and off through the control centre software.

I was thinking of using the automation as an exercise to play about with Python, but I know PHP better and there seemed a fairly simple way to get that to work (plus I already had everything installed so could get a web front-end working no problem).

A few more minutes and I had a rough web page with some links I could click to trigger the socket. A static web page was never going to be enough for me though, so after a few quick scribblings to get my head around the design I knocked up a database to store the device details and some on/off timer settings.

Then I wrote a couple of simple functions to poll the timers’ table for any that were due, checked the current status of the device and switched it on or off accordingly. I set up a script to call these every minute using a cron job and voila I had a working timer.

A few more lines of code and I’d added functionality to support weekday, weekend and everyday timers so I could limit events appropriately. Continue reading…

Computer Hardware Tool Kits

I doubt the rise in tablets, laptops and mini PCs will see the end of people building, repairing or modifying their computers, despite many being sealed, so a computer tool kit is invaluable. There are a number of kits available to buy and you only need a couple of tools to do 99% of the tasks you’ll ever attempt. You may even have many of the tools.

If you’re going to buy a specialist computer tool kit they range in size from a handful of tools to a whole briefcase and with prices to match. Having had to support computers both personally and professionally I thought I’d share what has actually been useful.

The Essentials

Part retriever/extractor

This is one of the most useful tools in my kit, especially when a screw gets away from you. Aside from being able to reach places my fat fingers can’t, it’s useful for putting screws back into locations deep in the case, generally you use this to get a turn or two so it’ll hold before you grab your screwdriver. It’ll also save you a lot scratches from the rough edges inside most cases.

Strong magnets generally aren’t recommended inside computer cases (or near electrical equipment in general), so the mechanical claw type is the best option.

Screwdrivers

For PCs it’s really down to a couple of Philips-type screwdrivers.  Sizes 1 and 2 should cover every application you’ll find on a PC as the case, motherboard, drives and expansion cards generally all use the same size screws across every different make and model.

I’d recommend fixed screwdrivers over the kind with removable bits (they’re usually  shorter and the bits can fall out). The removable bit types do allow you to pack a lot more types of screwdriver in a small space though (I do have one in one of my kits), but is this is your only screwdriver look for a set with an extension bar to help reach some of the screws hidden in the depths.

A couple of traditional fixed-head Philips screwdrivers and then one with interchangeable bits would probably be the ideal.

If you’re likely to be taking apart things like Apple computers, laptops, tablets or want to go hardcore on things like hard drives then some precision/jeweller’s screwdrivers and a kit including Torx bits will be necessary.

Don’t worry of they’re magnetised, the power in them won’t be enough to disturb the electronics. Continue reading…

Securely Wiping a Hard Disk

So you’ve bought a new computer and decided to be generous and donate your old one to a charity, or perhaps you’ve decided you need some more space and have upgraded your hard drive and are looking to sell the old one to recoup some cash.  You’ve remembered to format the drive, so you’re safe from someone reading your files, right?

Well, no.  You see, deleting files and formatting drives still leaves your files perfectly readable using freely available software.  A study by the Information Commissioner’s Office found everything from bank statements to scanned passports on hard drives bought online and at computer fairs.  Criminals use old hard drives as a source of personal information to commit identity theft.

So how do you securely delete your files?  There are a number of free, simple options.  If you want to do the whole disk, my personal preference is Darik’s Boot and Nuke (DBAN), just download and burn onto a CD, boot from the CD and away you go (obviously be very careful you don’t remove anything you want to keep).

If you have a Mac, you can use the built-in Disk Utility (under /Applications/Utilities).  And if you want to do individual files, give Eraser (for Windows) a try.  On a Mac, delete the file and then select Secure Empty Trash to permanently remove.

What about if your drive has failed?  Well people can still get the files off by extracting the platters, though it’s much harder work.  You can use a hammer and some heavy blows or a drill to damage it beyond repair.

It’s not difficult to ensure your data stays safe, just remember to take the right precautions.

HTPC Upgrades and HD

I ran out of space on my media centre a while ago, but with the floods pushing HDD prices up so high I held off ordering a new drive.  They haven’t quite dropped back completely yet, but there were low enough so me to consider again.  Freeview HD has also made it to my region at last, so I figured I would give the machine a bit of an upgrade in time for the Euros (football on ITV was always very soft on my big screen).

Decisions

After a lot of hunting around there appeared to be just two HD dual-tuner cards around, the Blackgold BGT3620 and the TBS 6280.  In the end I decided on the TBS for two reasons: it was cheaper (by £30) and it had an aerial pass-through so I could feed it on to my existing card without having to split the aerial feed (again).

For the hard drive, well, I’ve got all Western Digital drives in the machine and they’ve always served me well, so it made sense to pick another Caviar Green to go in with the others.  Looking at the pricing, the 2TB drives were offering good price-per-GB (the 3TB drives were better by only a few pence).

I had a problem in that I’d used up all the SATA ports on my motherboard, so I could either pull out one of the smaller existing drives, or buy an expansion card.  Having checked I had power, I opted to expand (figuring it can be re-used should I upgrade the rest at some point as few motherboards go beyond 5/6 SATA connectors).  I spent a lot of time digging around looking at various makes and models from different stores, prices varied wildly and, while I didn’t need speed, it seemed a good idea to go for a SATA III card to future-proof it. Continue reading…

Where are the Cheap Computers?

OK, so most people have heard of the Raspberry Pi, the low-cost PC designed to get kids programming again.  The Model B retails at about £16 (I found it for £21.60 with delivery), so what I want to know is where are all the other cheap computers?  By cheap I mean sub £100.  The Pi Foundation is non-profit, so they can obviously undercut most businesses, but they also lack the supplier deals and manufacturing plants to get economies of scale.  Not to mention the technology they’re using isn’t new or cutting edge and is made up of components that go in most mobile phones and set-top boxes.  For five/six times the price I’d expect to see something a lot more capable.

The Pi does stand to rock a few existing markets.  People are using the Pi as a thin client, for example.  Compare that to the offerings from Wyse, one of the big names in the market.  The cheapest thin client I could find from them was around £170 (excluding VAT).  To put that into perspective, you can buy a branded PC with a top tier processor, a couple of GB of RAM, a 500 GB hard drive and Windows for about £80 more, or even a budget brand one with no OS for about the same money.  Why exactly they cost so much when they’re essentially just displaying a remote system I’m not sure. Continue reading…