Find out about yourselfJoin Mensa nowBrowse our shop

Mensa Group

Were you previously a member? Rejoin


Are you a member of another National Mensa? Become a Guest member

Home Thoughts – A Mensa Magazine feature

Thu, 21/11/2013
Steve Goodwin Home Automation

Mensa Member Steve Goodwin on the joys of computerised home automation…
 

One of my many hobbies is home automation. But in addition to ringing an element of pleasure into my spare time, it also brings other rewards. Mostly recently, it earned me a book deal with Apress (a major publisher of professional technology literature.)

Not too shabby for something that first began when I ran a speaker cable from the living room into the kitchen, just so I could hear the TV while cooking! But before we get ahead of ourselves, what is home automation? Home automation is anything your house does for you to make living there more enjoyable or productive. It includes appliance control, media playback, and intelligent data processing. So how does it work?

I consider the home automation (HA) pipeline to exist in three parts. Firstly, there is an input conduit which provides a request to do something, such as turn on a light, change the TV to channel 9, and so on. The request itself can come from a user with a remote control, an e-mail, someone clicking on a web page, or a programmed algorithm that determines that it is now sunset and the lights should go on.

Secondly, there is a processing unit which works out how to execute the command. This requires a computer connected to all the input conduits, and left on all day. This is not as dangerous or as power-hungry as it sounds, especially if you use a single board computer like the Raspberry Pi.

Thirdly, and finally, is the output conduit, which routes the control instructions to the light switch, TV, or other device that the input conduit wishes to control. There are pieces of hardware (aka peripherals) that connect to a standard PC, such as Hue or X10 controllers, which allow you to control a specially made light bulb from the computer. There are also PC peripherals that transmit infra-red signals to hi-fi, or TVs, such as the Keene IR Anywhere. And your PC can manage speech synthesis, sending e-mail, and (through various online gateway services, like TxtLocal or intellisys) text messages. Most of these devices are network- or wifi- enabled, so you don’t need your computer to be physically close to the TV in question.

It might not seem like much, but with just these three elements you can do a lot more than standard remote control. For example you could have a switch by the bed which turns off the TV and every light in the house. Or you could have a button on a (private) web page which controls appliances other than the TV... such as the kettle, and then use the speech synthesizer to tell you when it has boiled.

Media control is a common, and entry-level, piece of functionality for home automation. PVRs are cheap and easy to come by. But you can build your own using an old computer and some free-to-download software, such as MythTV. In addition to recording programmes when you’re sat in front of the TV you can do it remotely; i.e. from work. After all, it’s just a computer which responds to messages like any other. This means you can hear about a new TV show around the water cooler at work, return to your desk, and set the machine to record through the PVR’s own web page. Of course, you can also have tomorrow’s TV listings e-mailed to you the day before. This uses a processing module to download the schedule, search for keywords (in my case it uses terms like technology, music, sci-fi, and magic), and use an output conduit to e-mail you the list. I have implemented these features in my own home. With extra benefits. When I’m working from the office I will e-mail my home when I’m about to leave... it knows how long it takes me to get to the train station and will look up the next train (www.nationalrail.co.uk reports in real time). In so doing it can monitor the train’s progress and know when I’m likely arrive home, putting the hot water on an hour beforehand. If I’m on a late evening train, it will use an output conduit that sends a text message to my phone... in order to wake me up! And of course, knowing it’s late the computer knows I’ll be getting a taxi, so knows my journey from the station will be shorter, and can put the lights on ready slightly earlier to normal, ready for my arrival.

And because the computer is allowed to read my calendar, it knows that I’m in work, so can automatically switch the house into ‘holiday’ mode, and control the lights and TV automatically to give the illusion that someone is home. An extreme, but genuine, example of what humble domicile devices can be upgraded to is present in my oft-quoted project of the automated doormat. By placing a pressure sensor under the mat it can detect whenever I arrive, or leave, the house. (There’s at least two easy ways for it to determine whether you're coming or going, but I will leave that as an exercise!)

When it knows I am leaving it will download the weather forecast, scan it for the words ‘rain’, ‘raining’, and ‘chucking it down’ and, if it finds them, will use the speech synthesis in the computer (another output conduit) to speak the words: “Don’t forget your umbrella”.

By now you’ve probably thought of several uses that would benefit your own living patterns. Maybe the automated doormat will also trigger the kettle when you arrive home. Or the ‘TV on’ command will also dim the lights to a subdued cinema-style environment.

The technology to implement all of these features is not difficult, if you’re prepared to get your hands dirty and learn some basic programming. Naturally, my book covers the ‘how to’ for these examples, but it’s better to ask me in person at a Mensa pub crawl, or similar event!

Smart Home Automation with Linux and Raspberry Pi is published by Apress, who provide me with a royalty that allows me to buy half a pint for every copy sold. So please buy two!

 

 

 

Originally published in Mensa Magazine November 2013.
Mensa Magazine is received monthly by members of the society and is full of stimulating debate, fascinating features and member stories.

Tags