There needs to be further software written and easier to use front ends so that people like my wife, who don't want to learn complicated commands and setups, can basically point and click. Unix has all the tools needed to perform all of this and still keep the command line there for those who want more power. After the front ends have been added the next thing to work on will be redundancy. This is an area where most Home Automation systems are lacking.

Unix Home Automation

Neil Cherry

cherry-01.gif (22782 bytes)
Neil Cherry

There needs to be further software written and easier to use front ends so that people like my wife, who don't want to learn complicated commands and setups, can basically point and click. Unix has all the tools needed to perform all of this and still keep the command line there for those who want more power. After the front ends have been added the next thing to work on will be redundancy. This is an area where most Home Automation systems are lacking.

Neil Cherry is a Network Systems Engineer building Wide Area Networks for a large communications company. His hobbies include most aspects of computers and bicycling. He started in computers in 1978 and has been collecting them ever since. :-) He has a degree in electronics (EET/AS) and has no idea how it got him into Networking.

Come gather round and I'll tell you a story of a time of old. Before Microsoft, GUI's, the World Wide Web and browsers. A land were IBM was king and Unix and DEC Vax ruled the palaces of thought. When much of the communication was through newsgroups, and BBS's. Electronic mail was handled through UUCP, dial-ups at 2400 bps were the the norm and 9600 was just a dream. Life was good but the times were a changing.

OK so that's a bit corny and we have it better now than we did then but one thing has changed little. That is the basics of Unix. Unix has almost always had automation. Any time a job had to be done over and over again Unix programmers would created a utility to assist in getting it done. As far back as I can remember there were the utilities at and cron. Cron allowed the user to set jobs to go off at certain times. Whether it was the middle of the night, the 4th Friday of the month, or every day at 2 AM. By creating a shell script and using the tools that are already available and you could create a new tool to perform other functions. Then use cron or at to start your job at a specific time and you could be off doing something else like sleeping. That's because many time shared systems billed for the computers resources used and the night hours were by far cheaper to use. Unix is definitely a programmers environment. This is not to say that the new breed of Unix like OS's are only for programmers. Linux has made it's presence noticed and with distributions from Red Hat and SUSE installation is a lot easier. Programmers are now creating front end programs which hide the increasing complexity of what goes on behind the curtains. This is great because a novice can cut their teeth using the front ends and if they become more curious can venture into the underworld of scripts and redirection.

Today much of the Unix world lives with both the shell command line and the X GUI. Even computers with no keyboard and monitor (or terminal console) can run X applications but display them on other computers or X terminals. Other operating systems also have X servers which can be run on them so Unix works well in mixed OS environments. One of Unix's strongest points is that with the help of Linux you can use computers that would have otherwise been retired to the scrap heap. My first system ran on a 386SX/16 MHz, 8 Meg of ram and 320 Meg of hard disk, this system ran with my CM11A and my Dallas Onewire network attached to it. It ran until my hard drive became corrupted and the keyboard controller went dead (but I hope to resurrect it with the serial console option :-).

So how does this all work with Home Automation? Well it works very nicely! Over the last few years I've been collecting different packages to use in Home Automation. I've gathered software for different controllers (the CM11A, Lynx-10, CP290, HCS II and the Two-way). I also collected other packages to help pull things together. And I've found packages that although at first don't seem to be very useful become part of the package with a little imagination.


One of the first things I purchased for Home Automation was the HCS II by Circuit Cellar (in kit form, I love the smell of solder in the morning). It's a stand alone industrial controller that can be programmed from a PC (running MS DOS) using a language called Express. Of course I have DOS running under the DOS emulator. In fact I've gone as far as using expect to interact with the DOS emulator (acting like a terminal) to execute the Express compiler in DOS. That way I am able to edit the Express file with emacs and type a single command under Linux to compile the Express code. You can then download the compiled code to the HCS II main controller and let it run. It has an interface to an X10 TW523 via the PL-Link which is connected to the main controller via RS485. On the main controller it has support of Analog input, and Digital I/O. Additional boards are available for IR , DTMF, and for voice synthesis. The manual gives you enough information so that you can even add your own boards. Mike Baptiste's Creative Concepts page is an example of such projects to build your own PIC based devices that can connect to the HCS II boards. With the software I found (originally for FreeBSD) you can communicate with the HCS II and control every function from the Unix command line or cron jobs. Further software needs to be written but I haven't decided in which direction I really want to go.


The next Home Automation controller I have is the CM11A. I've had this one for a while, it runs all the time and other than power line problems (brown outs and drop outs) it has run continuously for months on end. I prefer to use Dan Lanciani's software X10d. I've modified his code so that it compiles and works under Linux. Dan's code runs as a network daemon allowing any computer connected to my network to control the various X10 devices we have around the house. I have lights that go on at sunset and off at "bedtime". I also have the capability to control devices at sunrise but have had no need to use this script yet. I use the commands sunrise and sunset to calculate the correct time. And then using at to run the sunrise/sunset shell scripts I've created. There are also programs to calculate high/low tide and moonrise/moonset and it's phase if that should be important (sorry I don't have this code). There are other programs available also and they are really worth mentioning. Dan Suther create a program called heyu which interfaces to the CM11A. It allows you to send commands to the CM11A from the shell. These could also be added to cron jobs and run with at. With his code there are no network connections used (most Unix OS's have networking builtin even if there is no network card). With the help of a program by David Shaw, called xtend, you can monitor the CM11A and perform external commands based on the state of any set of X10 devices. I've done some initial testing with heyu and xtend and they work nicely together. I've also tried to modify X10d and xtend to work together but found the two incompatible. I will have to come up with my own program which will have the same functionality as xtend. Currently there is no macro use on the CM11A under Linux. Most of it's functionality is better run from shell scripts and programs like xtend which can combine a lot more functionality than the macro capability of the CM11A.


I recently purchased a Lynx-10 (again in kit form) and although I have it assembled (it was very easy) I don't have it up and running because I wiped out half the system it would run on. Soon I hope to have it running using Dan Lanciani's Lynx-10 daemon. I expect the same functionality as the CM11A x10d except I won't have a record of receiving extended code (this is a limitation of the X10 TW523 not of the Lynx-10 or Dan's code). The Heyu and Xtend code don't work with this controller.


I also have a CP290, the grand daddy of the X10 line (although the Heath kit X10 interface does precede the CP290). I haven't had much use for it yet but I keep it as a backup. I have Paul Fox's CP290 software should I ever need it. The CP290 can only send signals and not receive signals. But it has 8 button on the front which can be used when the computer is down. Which seems to happen a bit too frequently lately. Maybe I should stop playing with all the beta code, nah no fun in that! Linux does have stable releases but I am always interested in playing with the latest and the greatest from the beta development tree.

WM918 Weather Station

This last Christmas my friends gave me a WM918 weather station. Their only request was that I post the information to the web. A day later I had the information posted to the web 8 times a day. I used Tim Witham's WX200d (with no code modifications) and an expect script to post the info. Tim's program creates the HTML page for you, ready to be posted to the web. He has also created programs to pull down the information unformatted from the weather station so that it could be manipulated by whatever means you deem necessary. I can display barometric pressure, temperature, humidity, wind, rain and dew point.

Festival Speech Synthesis software

A recent addition to my collection of programs is the Festival speech synthesis suite. It produces a sound file (.au in my case) and plays it through the systems sound card. I'm currently using it to tell me the temperature on the hour. It works well and I hope to expand it's use in the near future. The voices are mechanical but are very understandable and can have an English accent, Spanish Accent or American Accent. It has a male and female voice in some accents and you can also use multiple voices with in a document.

Dallas Onewire

I've been using the Dallas onewire thermometers for about a year. I have one thermometer on a lamp, one in my box window and one outside my window protected from the sun. These inexpensive chips work very well and work over extended distances. I would eventually like to have additional IC's at the front of my house, (where the sun rises), one in the attic, and one to drop in the pool if I can seal it well enough to keep it dry. There are other onewire chips but I haven't started playing with them. Dallas Semiconductor has a weather station based on the onewire IC's for about $80 (US). It looks pretty interesting, nice and compact. I may get one for experimentation.

Linux IR project

Linux IR is a project to provide access to send and receive IR signals via the serial or parallel port. I'm hoping to use it to do things like: program my VCR (so it will stop blinking 12:00 am :-). I would also like to be able to select the TV, radio, CD, volume etc. I have the hardware built to receive the signals and I've compiled the drivers. I hope to be testing it shortly. This would allow me to get rid of all the incompatible remotes I have (I have 1 programmable remote and 2 remotes that I can not replace). Also it would allow me to mute or lower the volume on my radio or TV when I pickup the phone. What LIR allows me to do is record the signals sent by the remote when you push a button. I should then be able to send the same signal and control various IR controlled devices. I could probably extend the use by pulling TV and radio program information off the web. I could calculate the start and stop times and then turn on and off the VCR to record those late night programs I haven't the time to stay up and watch.

Much needed software

Obviously to make all these things much easier to use a GUI front end would help. I've seen some attempts to create such a front end. Some have been simple imagemaps for use with web browsers and another was Adam Hightower's TCL application for the CP290. A Java applet would work very nicely as it could be run on any browser and any OS that supports Java applets. Support is also available for web based TCL applets (a tclet). A single GUI front end could seamlessly bring together different application on a single system. With Linux's builtin networking it wouldn't matter that the applications were not on the same computer (yes you could run them on several other computers). Point and click on icons and using 1 front end could bring together the many systems together seamlessly. I particularly like the software Demo found at the Emware page, it's pretty close to the idea I have for what such an applet would look like. In fact I like the over all idea of their product (unfortunately hobbyistst don't usually have that kind of budget).

Many of the programs found here were created out of someone's desire to solve a single problem. Once the problem had been resolved there was no further need to make any further modifications. Thanks to the World Wide Web one person solution can now be easily shared and taken to the next level of usefulness. Also thanks to the flexibility provided by Unix one such small program grouped with other seemingly different programs can be used to create a larger program. By adding a GUI front end the group of programs can be a user friendly package that rivals that of higher priced packages.


X10 is report to be beta testing a new X10 controller, the CM14. So far a release date hasn't been set and nothing official has been released. I'm dying to get my hands on one of these and test it under Linux but no luck so far.

The Future

One of Linux's strongest points is that the OS is stable. There are many users out there running Linux that have been up and running for months, 7x24. As long as you are not playing with beta releases, as I am, you find Linux to be a very stable platform. It's flexible enough to run on lowly 386SX machines and powerful enough to take advantage of the more powerful CPU's that are available, such as the Alpha's as well as Intel's/AMD's/Cyrix's current line of x86 chips. There needs to be further software written and easier to use front ends so that people like my wife who don't want to learn complicated commands and setups can basically point and click. Unix has all the tools needed to perform all of this and still keep the command line there for those who want more power. After the front ends have been added the next thing to work on will be redundancy. This is an area where most Home Automation systems are lacking.

Comments (0)

This post does not have any comments. Be the first to leave a comment below.

Post A Comment

You must be logged in before you can post a comment. Login now.

Featured Product

VMP ERWEN-6E 19-inch wall rack enclosure

VMP ERWEN-6E 19-inch wall rack enclosure

The effective and rugged ERWEN-6E 19-inch wall rack enclosure has been designed for getting equipment up off the floor and on the wall where space is at a premium and floor standing equipment racks just won't do. VMP designed the ERWEN Series wall mounted racks for both form and functionality, especially with the security and AV installer in mind. With adjustable front and rear rails, removable hinged back panel, and a reversible glass front door, the ERWEN-6E is the answer to the most demanding rack mount requirements. Additional features of the ERWEN-6E wall rack enclosure include welded steel construction, ships fully assembled, works with all standard 19-inch rack equipment and accessories, 16 inches of usable depth, rails have numbered spaces with standard 10-32 threading, vented top and bottom, top and bottom cable routing knockouts, removable side panels (with optional locks), load capacity - 120 lbs, black powder coat finish, 2-fan kit (ERWEN2FANKIT; optional), product dimensions: (W x D x H): 24.3in x 21.9in x 14.5in, product weight: 50 lbs.