Controlling lights in the home is one of the simplest things to do on the PC. X10 is a company that has been around for a long time ( www.x10.com ). They produce modules that can be controlled via your house wiring. The user plugs the module into the A.C. receptacle and then plugs the device they wish to control into that. X10 provides several means of communicating with the different devices. They have software that runs on the PC. They have a kit that includes a small hand-held remote and for developers, they provide programming specs. to develop custom applications using, what they call, their Firecracker interface. The firecracker interface consists of a receiver that plugs into an A.C. receptacle near the computer and a small transmitter that plugs into the PC’s serial port. The software sends signals to the device plugged into the serial port, which in turn sends signal to the receiver near the computer. That device then sends the appropriate signal to the various devices in the house over the house wiring.
These are neat devices and because everything just plugs in, implementing it is very easy and doesn’t require any special technical skills. X10 also has wall mount devices that can actually replace your A.C. receptacles and switches. This makes it easier to develop a solution that can handle most scenarios.
These devices make it possible to automate most of the lighting around the house, but there are a few pitfalls. It takes a second or two for the different devices to communicate and send the appropriate signals over the house wiring, so it isn’t ‘real-time’. Another problem is that there is no way to determine the current state of a particular device. This would be handy if, for instance, you wanted to dim a light but wanted to know if it had already been dimmed.
The X10 interface has a few drawbacks, but overall is probably the mostly widely used means for controlling light. The ease of installation (except for the wall mount devices), the pricing (most modules are $10-$15), and their duration in the industry (most dedicated panels and some alarm systems provide X10 interfaces) make them the favored means for controlling lights.
Camera control is another area that has become pretty simple to implement on the PC. All the interest in the Internet and video conferencing has provided a lot of reasonably priced solutions. You can get a USB camera or a video board that plugs into an available PC slot. Most, if not all, come with software that lets you view and capture video in some form.
This is neat ‘stuff’ whether you are setting up a surveillance system or just playing around. It is really neat to be able to view and control cameras without having to have a special monitor.
From a development standpoint, I prefer the video board. I use a 4-port, 1 channel board from a company called Winnov ( www.winnov.com ). It is a nice board and sells for around $300. That includes the board, an OCX for VB or C++ development and sample programs. I like the custom OCX. The other alternative is to use an USB camera and a Third party control that lets the programmer use the supplied video capture driver. There is nothing wrong with that methodology and it does allow the developer to interface with a larger number of cameras, but if you were developing an off-the-shelf application, you would have to have every camera the control interfaces with for support purposes. That is why I like the video board and custom OCX. It presents an easier support solution.
Other A.C. and D.C. Devices
Today there are digital I/O and serial communications boards readily available. These boards make it possible to communicate with everything from motion detectors to Industrial panels. These devices are what make home automation on the PC so exciting. RS-485, like RS-232, is a communication standard. Mainly industrial type panels and hardware use it. RS-485, as well as RS232, boards for the PC are readily available and easy to program. This allows a developer to develop applications that can control and communicate to a very wide variety of machines. The digital I/O boards allow the developer to control a wide variety of discrete devices (motion detectors, sirens, electric locks, etc.). That is a lot of devices to be able to control.
I use a digital I/O board from Acces I/O products, Inc. ( www.accesioproducts.com ) for most of my development. I use a 16 bit opto-isolated input board that has 16-bit relay output. The inputs accept 0-24 volts A.C or D.C. The outputs are all relays. It has 10 form C SPDT outputs and 6 Form A SPST (normally-open) type. They also provide a screw down terminal that is rack-mountable with cables to connect to the PC. This is a very versatile piece of hardware. It installed easily and came with excellent programming samples. With screw terminal, it runs about $500. They also have an 8-bit board which less expensive.
Control via the Internet
This is another area in home automation that is very exciting. All a person needs to setup a personal web server is an IP address and either Windows 2000 Professional or Windows XP professional. These versions of Windows come with an application called Internet Information Server. Once installed, it will Become your web sever. You have to develop your web pages, but the software to get up and going is all there. (I believe with Linux and Apache, it is also just about that easy.)
Being able to control devices via the web is very exciting. That means you can turn on lights, check cameras, etc. from anywhere on the planet that you have an Internet connection. You can’t control the above devices directly via the Internet unless you have a java applet or custom COM+ control, but you can easily setup what I call a ‘Request Server’. The ‘Request Server’ would act much like a fax server. You develop an ASP that inserts a record into a database. The record would contain device information and the action desired. You then develop an application that can interpret the records and check the database at timed intervals. Using this methodology, an Internet control system can easily be developed.
Interactive Voice Response (IVR)
IVR is an alternative to an Internet interface and it is another system that is easily implemented on the PC. It eliminates many of the security concerns some users would have with the Internet interface and doesn’t require a computer and an Internet connection. The user merely needs a phone.
I use a software package called Active Call Center ( www.sunnybeach.net ) for my IVR development. It supports many of the lower-end telephony boards as well the higher end boards like Dialogic and Brooktrout. It has OLEDB support via VBSciprt for database driven text-to-speech and if you are willing to use one of the lower end boards, a small system can be developed for around $400.
iButton is a term used for a line of IC’s produces by Dallas Semiconductor. What makes them unique is that they are packaged in a small can (approx. 1/2 inch in diameter) and can be written to and read from via the serial port of any PC. They come with a wide variety of mounting options including a ring mount. They have 256K EEPROM iButtons, 64Kb add-only iButtons and many more. Imagine having a small ring receptor instead of a keypad to turn your alarm off. The user touches his ring to the receptor and the system disarms the alarm system and performs any other actions coded on the ring.
Dallas has a developer starter kit that includes several iButtons, two different receptors, programming software and sample programs for around $125 (last time I looked).
This is one area where the PC application really shines. If you combine X10 interface, cameras and a digital I/O board, a very versatile security system can be developed. I mean, why would you want to have something using a crummy little 8-bit processor when you can use a 32-bit processor running a robust operating system at 2GHz? Yes, it is true that a security system running on a PC raises a lot of security issues. Let’s look at a few:
Q) Is it secure?
A) Yes, it is true. It wouldn’t be a panel in the basement or in the attic, butâ€¦.
1. No one is going to know it’s running on your PC. As long as the user is discrete, the intruder can’t go right to the PC and disable it.
2. If you design the system so the intruder has to cross at least one line of defense to get to the PC, the question is academic. I mean, how affective would it be to have your security system be able to say, once a sensor was tripped, ‘You have entered a secure area. Your photograph has been sent to the police. Leave now to avoid prosecution’. If that doesn’t scare away your burglar, nothing will. Or, if you are monitoring your cameras via the Internet, be able to submit a line of text to the text-to-speech engine (ex. ‘Get the @$##* out of my house!!!’).
Q) Can it be monitored?
A) At this time, probably not, butâ€¦
1. This isn’t a technological problem. If a developer could get Silent Knight or some other mfg. of central station hardware to release their protocol, it wouldn’t be a problem to develop a PC solution. Of course, you would need a central station that would, a) let you do testing and b) accept other accounts using the same software, but this isn’t a technological problem. 2) The security application is one I really like. Being able to use test-to-speech, E-mail and basically all the things you can do with a computer really outshines the dedicated panel. The downside is that, like ‘Electronic Money’, this is an area likely to take some time for acceptance. The security issues and the cost (most alarm panels cost between $100-$200) will make this a hard-sale, but the time may come when this is the way people want to go.
What we can do and what we can’t
With all the hardware that easily installs into your PC, the sky is the limit for what can be automated by PC applications. However, there are a few hurdles the home automation industry hasn’t jumped yet.
Light control is one area that is still lacking. Turning light on is fairly easy, but turning them off at the appropriate time is a little more complicated. Ideally, you would like the light to come on when you enter a room and go off when you leave. This raises some difficult logic problems that don’t today have solutions. You can use a motion detector, a digital I/O board, and X10 interface to easily turn the lights on when entering a room, but a motion detector has blind spots and only senses motion. The user stops moving and the lights would go out. If this is a TV room, the user probably won’t care. If it were a reading room, it would be very inconvenient. There are other things you can do. You can create an application that times the activity from a motion detector and if no activity has occurred in a pre-determined amount of time, turn off the lights. This is a little better, but will not work for all scenarios. Another alternative is to try and cover all the space in the room with floor sensors. This alternative is pricey for a large house. You could use a door switch instead of a motion detector, but the door switch can’t determine whether the person is coming or going. This leads to a possible solution.
I think the ultimate solution will be some kind of door sensor that can determine direction. If you had two infrared emitters and detector connected on each side of the door, you could detect direction. Just like you can control your TV with a remote pointed at the opposite wall of the TV, you should be able to detect when someone walks through a door. Using two emitter/detectors, one on each side of the door, you can determine direction because one detector will be biased before the other. You could connect the detector to some IC circuitry that basically works like a counter. Every time the forward detector is tripped, the count increments and the output goes active. When the rear detector trips, the count decrements. When the count is back to zero, the output goes inactive and the application turns off the lights. I don’t know of anyone working on this and I haven’t tried it, but I may in the future.
Voice Recognition is an area that has great potential but isn’t quite there yet. Using a voice recognition engine, you can write voice activated applications. I haven’t used any of the higher-end engines but have played with Microsoft’s voice recognition engines. I started with a desktop microphone and went through 3 or 4 training sessions. I then replaced the desk-top microphone with a microphone/amplifier device used by some alarm companies and developed an application that recognized phrases like ‘Lights On’ and ‘Lights Off’. It worked. I could stand in the middle of the room and 2 out of 3 times, turn the lights on or off.
This is neat stuff also, but like the light control has some pitfalls. If you change the distance from the microphone, it changes the performance. One solution to this might be a wireless microphone like concert singers use. The user comes home and dons his wireless microphone. This would make development fairly easy for one person. Of course the more number of people using the system requires more sophisticated software to interpret the different voices.
There is a lot more that could be said on these two subjects, but I will leave it there. Once manufactures develop PC solutions for these two problems, there is no reason why the PC application can’t own the home automation market.
Well, those are my thoughts on home automation. For off-the-shelf software that does most of the things discussed in this article, or help on a custom project, visit www.home20nn.com