Before reading further... Are you looking for great Linux hosting from a company that cares about GNU/Linux? Pick Dreamhost hosting, get a 10% bonus to the disk space (and support Free Software Magazine in the meantime!)
Home automation in GNU/Linux
Or how to email your light switch with free software
Download the whole article as PDF
- 2008-07-03
- User space | Easy
-
Write a full post in response to this!
Home Automation is anything that your home does for you automatically to make living there more enjoyable or productive. It covers many areas, including remote and timed control of lights and electrical home appliances, distributed media services, and communication. Over the last 10 years, many hardware manufacturers have presented their own proprietary solutions to these problems. Unbeknownst to them, a groundswell of developers from around the world has been providing similar solutions to the free and open source community.
In this introductory article, I will carry out a high-level review of a number of these projects to see what is already available.
Appliance Control
One of the most impressive features of an automated smart home is the ability of a computer to control your lights or to operate the power socket attached to the kettle. Naturally, this requires the addition of hardware, and the most prominent example here (with a good trade-off between cost, longevity, and flexibility) is called X10.
X10 is a protocol that places specifically-formatted high frequency power bursts onto the mains power line. Since the mains cables are connected to every light bulb and power socket in the house, a signal placed onto the power line in one place is seen across the rest of the mains supply. Consequently, a special X10-enabled power socket is able to watch for these power bursts and switch itself on or off, accordingly.
To place these X10 signals onto the mains requires a peripheral, such as the CM12U (see figure 1) which also contains a serial plug (either RS232 or USB) that is inserted into your PC. To receive these signals you can use either:
An appliance module that will turn a socket on or off. You simply plug this unit into the wall, your appliance into the other side, and switch the wall socket on. The appliance (such as a kettle) is then controlled by a remote X10 signal. One such unit is shown in Figure 2.
A light bulb attachment unit, as seen in Figure 3. It is placed in series with a conventional bayonet light socket, and acts like an AND gate. It can only be controlled through remote X10 signals.
Or a special light switch that replaces your existing switch and will control the light to which it is attached. This control is either by the switch itself, or remote X10 signals. This can also function as a dimmer switch, and shown in Figure 4.

Figure 3: Fitting directly into an existing light socket, this is the easiest way to add lighting control to your home

Figure 4: This replaces an existing light switch, and is the most effective way of controlling a light
Each of these devices is given an address. This comprises of a house code (A-F) and a unit code (1-16) for the individual appliance. The house code is necessary because the mains voltage to your house is often fed from the same supply as that of your neighbour, meaning your appliances would see their X10 signals and vice-versa. It is possible to buy an X10 suppressor to stop your X10 signals leaking out, but the current take up of X10 is not universal enough to be a problem—unless you live in a block of flats inhabited by geeks, it’s unlikely to be a problem in the near future.
A question of countries
NOTE: The mains voltage and frequency varies according to country, so specific devices are needed depending on where you live. Check the vendor websites carefully. The codes given in this articles are for UK devices.
Sending suitable X10 signals (through the CM12) requires software, and the current favourite is heyu. This is not truly open source, but close enough for most purposes. It exists as a simple command line utility (with configuration in /etc/heyu/x10.conf) that lets you control the lights with commands such as,
heyu turn bedroom_light on
and
heyu dim studio_light 2
These commands can be triggered from a web site, script, crontab, or command line. As an alternative to cron, you can also upload a program containing a sequence of on/off messages directly into the CM12 as this allows you to specify a set of timer events that will execute, even when the computer is off.
The CM12 gives more control over the lighting sequences in your house than a traditional timer switch, and allows you to program more realistic scenarios. For example, you can program a sequence whereby the unit switches the landing light on, waits one minute, turns the downstairs light off, waits one minute, and then turns the upstairs light on. This subtlety gives the impression of someone walking up the stairs, and switching the lights on and off as they go, which is the mark of a human, not a machine.
Write a full post in response to this!
Do you like this post?
Vote for it!
Copyright information
This article is made available under the "Attribution-NonCommercial" Creative Commons License 3.0 available from http://creativecommons.org/licenses/by-nc/3.0/.
Biography
Steven Goodwin: When builders go down to the pub they talk about football. Presumably therefore, when footballers go down to the pub they talk about builders! When Steven Goodwin goes down the pub he doesn’t talk about football. Or builders. He talks about computers. Constantly... He is also known as the angry man of open source. Steven Goodwin a blog that no one reads that, and a beer podcast that no one listens to :)
- Login or register to post comments
- 34725 reads
- Printer friendly version (unavailable!)




Looking for Linux hosting, reviews, coupons, etc.? See out user-voted list
Best voted contents
-
Why sharing matters more than marketshare to GNU/Linux
Terry Hancock, 2008-08-01 -
Is Microsoft trying to kill Apache?
Gary Richmond, 2008-08-08 -
The Bizarre Cathedral - 15
Ryan Cartwright, 2008-07-28 -
More evidence of Microsoft "tying up" the Asus EeePC
Tony Mobily, 2008-07-28
Buzz authors
All news
Other sites
- The Top 10 Everything (Dave). The good, the bad and the ugly.
- Free Software news (Dave & Bridget). All about free software -- free as in freedom!
- Book Reviews: Illiterarty (Bridget). Book reviews, blogs, and short stories.
Hot topics - last 60 days
-
Don't compare GNU/Linux with Windows or MacOS - they are not in the same game
Ryan Cartwright, 2008-07-07 -
Self-signed certificates and Firefox 3 - a possible solution
Ryan Cartwright, 2008-08-05 -
Dictators in free and open source software
Tony Mobily, 2008-07-22 -
Why sharing matters more than marketshare to GNU/Linux
Terry Hancock, 2008-08-01 -
Why did Javascript/AJAX mop the floor with Java, Flash and Silverlight? Or, why open standards eventually win
Tony Mobily, 2008-07-30
Hot topics - last 21 days
-
Self-signed certificates and Firefox 3 - a possible solution
Ryan Cartwright, 2008-08-05 -
Why sharing matters more than marketshare to GNU/Linux
Terry Hancock, 2008-08-01 -
Why did Javascript/AJAX mop the floor with Java, Flash and Silverlight? Or, why open standards eventually win
Tony Mobily, 2008-07-30 -
How do Drigg and Pligg compare?
Tony Mobily, 2008-08-17


Dedicated server