Volume Number: 16 (2000)
Issue Number: 6
Column Tag: Tech Home
Home Automation: The Geeks Holy Grail
by Neil Ticktin, Publisher, MacTech Magazine
OK... I admit it. I'm one of those closet geeks that looks forward to the day of having "Star Trek" level of control of my surroundings. And, given what we saw on the last MacTech reader survey, most of you feel the same way I do (actually, nearly 80% of you).
Home Automation (HA for short) has long been the holy grail for techies of all types. Today, there are some great options, and things are looking even better all the time. In looking at Mac-based HA, a whole new world has opened up. Some folks have been at this kind of stuff for years at a variety of levels. But, if you haven't gotten started, now is a great time to do so.
With this article, we're going to take an initial, and broad, look at HA and how you can have the "home of tomorrow" today. Of course, the centerpiece of this is... your Mac. One caveat up front: this article is so broad that if you aren't interested in the part you are reading... just skip to the next part, it'll be about something different.
What do you want to accomplish?
First, you need to determine what you want to accomplish with HA. This may seem like a trivial question but it's actually quite difficult. And, you really, really need to determine the impact of SAF "Spouse Approval Factor" in what you are doing.
For example, our electrician told my wife stories about a house that seemed straight out of Amityville Horror or Poltergeist. There were some problems with the automated lights that sent random signals... lights would literally turn on and off in an almost haunted manner. This not only concerned me, but I got some stern looks from my wife (understandably).
Being conservative (and realistic), I decided to take an approach that accomplished HA, but was designed in a way that if things didn't work the way we wanted, we could revert to conventional (non-automated) methods. This not only gave me a lot of flexibility in my own comfort level, but drastically increased the SAF. And, increasing SAF is always a good thing.
New Construction or Retrofit?
Implementing your goals prompts a series of other questions. The biggest of which is whether you are building a new environment, or do you need to retrofit the existing environment? This is a huge question, and it will govern many of the implementation decisions that you need to make.
Let's take an example that we're all more familiar with. Let's say that you want network access everywhere in your house. With new construction, you may want to run CAT 5 or better cabling everywhere you can think of. But, if you don't have access to the inside of your walls, maybe wireless would work better.
Likewise, if you want to control lighting... do you want to go over existing power lines? Or, can you hard wire control lines to switches for greater reliability? Again, it comes down to whether you have access to the innards of your walls/ceilings.
Let's Get Down to it
Enough pre-amble, what are we trying to accomplish here? We embarked on a fairly ambitious project that combined tactics of new construction with retrofit. The goals were as follows...
- Computer Network
- Environmental Network
- Entertainment Network
- Computer Networks
MacTech has had some recent coverage of networks, so we'll keep this part really brief. My believe is that, if you are like me, you want to have a relatively serious network in place at home... not only for the needs of today, but tomorrow as well. This may not be just for your home office, but where your kids might play or in a guest room.
No matter how you slice it, build your network right. That means modularity. If you can, run Category 5e or better wire in the walls to a central distribution point. At that point, use a patch panel. From the patch panel, use short patch cables to take you to a hub. If your traffic warrants it, take it to a switch instead, either now, or in the future. Lastly, your Internet connection will tie into the network giving your entire house connectivity with a single connection. Products like the MacSense XRouter (available from DevDepot <http://www.devdepot.com>) can help you share a single IP throughout the house with DHCP and other features.
HomeLine from Farallon
For those of you dealing with retrofitting your house with a computer network, you may want to consider Farallon's HomeLINE (<http://www.farallon.com/>). Some people would call this the Ethernet version of PhoneNet. Others might call it indoor DSL. Whatever you call it, basically, you can run at a megabit (e.g., 18x faster than a 56K modem), but over your existing phone wires (without any wiring modifications). And, the best part is that these existing phone lines can continue to be used simultaneously for both voice and network... just like DSL. If you are looking to share a single Internet connection, without having to run new wires, it's a good solution.
What about wireless?
The first question is wired or wireless? The answer: both. In our house, we have wired connections for desktop computers, while the mobile machines have wireless access. This is done with the AirPort's big brother the Lucent WaveLAN product line (which is now called ORINOCO). Because they are based on the 802.11 standard, the Lucent bridge works very well with the AirPort card in my PowerBook. So well in fact that wireless is the only connection I use on my PowerBook... even when I'm sitting at my desk.
The reason that we have both wired and wireless is for division of traffic. I want to keep our wireless network working as fast as possible so by hardwiring those that are easy to, I keep machines off the wireless LAN.
For more information on wireless networking, see MacTech issues from January 2000 and December, 1999 www.mactech.com.
The Tools to use
For this article, the important thing about your wired network is the tools and products that you can use. There are a lot of quality brands out there for cabling, connectors, patch panels, and more. A few to call out are Leviton (<http://www.leviton.com/>), ChannelPlus (<http://www.channelplus.com>) and Belkin (<http://www.belkin.com>). Leviton has some really nice modular connectors that match the coloring of the other plates in your house... they are the inventors of the "Decora" style.
ChannelPlus has some excellent integration with entertainment networks (e.g., coax). More on ChannelPlus at the end of this article.
For this project, we primarily used Belkin products. They have a variety of patch panels, mounting brackets, and wall plate/jack combinations. I found their products to be very easy to work with. There are two things that you should know their wall plate products do not come in a wide variety of colors, so watch out for the SAF here. Also, make sure to use the products that "require tools" they are much easier to deal with.
One of the nicest wiring products that Belkin has is their "snagless" 10/100BASET cables. These cables have "snagless molded strain relief" which is a fancy way of saying that they will help you prevent breaking the connectors at the end of the cables. The design works well I haven't broken one yet.
Belkin Snagless Cables.
For any network wiring, you will want to spend the money and get yourself a good punch down tool. With about 1/2 a mile of cable in my house, and nearly 500 connections, I can confirm that it's well worth it. This tool allows you to easily connect wires to a punch down block, the back of a patch panel, and even certain types of modular connectors. Furthermore, it will allow you to cut (or trim) wires in the same action as you are punching it down. Punch down tools are available from any phone equipment vendor.
A must have in your tool box is what is commonly referred to as a "fox and hound". This is for identifing cables. You've got all this cable running all over the house, now you need a way to figure out what goes where. You can try labeling ahead of time, but that can be a hassle (or you might just forget to do it like me). We used the 701K kit from Progressive Electronics. (<http://www.progressive-inc.com/>).
You take a "tone generator" and connect it to one of the cable and then pass a "Inductive Amplifier" over the bundles at your termination point
Progressive Electronics 701K kit.
If you are doing a project that has new construction, you should seriously consider a full "wiring system". We won't go into those here, but you should check out HomeStar from Lucent, LonWorks from Leviton, Ortronics InHouse, and OnQ Technologies. These give you a very simple way to combine all of your assorted wiring needs through one system. They are an excellent choice for new construction, but you wouldn't want to deal with it for a retrofit you'd be opening every wall in the house.
Environment Control Network
The first thing that probably comes to mind when you hear "environment control" is heating and air conditioning. While this is part of it, there's a lot more to controlling your house. What we're going to focus on is retrofitting a house with "PowerLine Carrier" or X-10 protocol devices, and controlling them with your Mac. Realize that you can do PowerLine Carrier with new construction, but, you should first look at one of the wiring systems before doing this type of setup.
X-10 is the trademark name that many people know it by but PowerLine Carrier is what the protocol is really called. Leviton, one of the leaders in the industry, calls their product line "Decora Home Control" or DHC. We'll use the names DHC, X-10 and PowerLine Carrier interchangeably. If you remember X-10 from the BSR days, forget it. Today, PowerLine Carrier is a whole different ball game. When the patent expired on this technology some years back, the entire market was opened up to competition... and today, there's a whole array of X-10 compatible devices from a variety of vendors.
Let's take a look at how this protocol works...
The PowerLine Carrier Network
PowerLine Carrier devices work together as a communications network. Programmers, controllers, and computer interfaces are the transmitters in this network. They are installed at locations in the home convenient for their designated use. All transmitters send a unique coded command signal throughout the home's existing AC wiring, which links the entire network together. PowerLine Carrier switch, fixture and receptacle (outlet) modules, which act as receivers in the network, are installed in place of standard switches, outlets and dimmers at key locations throughout the home.
The PowerLine Carrier Address
At the time of installation, each receiver is set to a specific system address, which consists of one letter from A-P (16 possibilities) and one number from 1-16. Typical addresses are A-4, C-6, J-12. There are 256 letter-number combinations available for use as system addresses. The system address is set at each receiver by turning a dial to the desired letter, or house code, and another dial to the desired number, or number code. On some devices (e.g., wall switches), the code wheels are hidden (e.g., behind the switch plate).
The PowerLine Carrier Command Signal
When activated, transmitters send a 3-volt, 121 kHz series of pulses, called the "command signal", at the zero crossing of the 60 cycle AC power curve (see figure). Transmitters then repeat the command a second time for added assurance.
PowerLine Carrier Command Signal.
The command signal contains a specific address code and a performance function code (on, off, dim, brighten, all lights on, all off, etc...). Transmitters can send command signals to all or just a selected group of system addresses, depending on the particular model. Many wall-mounted controllers will retain command signal transmission if a command from another controller is in progress on the AC power lines. When the line becomes clear, the wall units will then transmit.
Receivers monitor the AC power line constantly, "listening" for a command signal. When one, or a group of receivers "hears" its specific address, it responds by performing the designated dimming or switching function. The command signal can travel a considerable distance and still activate a receiver, if no electrical loads generating interference are present to dissipate the signal strength. No more than 4 transmitters should be on the same AC branch circuit, since this can reduce signal strength considerably.
Quality of Products
Save yourself some grief and plan ahead
Every home has some electrical "noise" on the AC lines that can cause interference with command signal reception. Know this up front. And, to some extent, working with PowerLine products can be more of an art than a science. However, there are several things that you can do to work in your favor... and keep your headaches to a minimum.
First, buy quality hardware. We saw several different vendors of X-10 and PowerLine products. You can tell the difference with the quality ones once you have them in your hands. We used the newer Leviton switches primarily and were very pleased with not only the products performance, but the look and feel as well. Make sure you get the newer Leviton ones (check the Leviton web site for the latest versions). Some resellers will try to sell you the older versions, which are not as good.
Leviton switches use a special circuit called "Intellisense" (gated automatic gain control). Intellisense is supposed to provide DHC receivers with outstanding noise immunity during the critical "zero crossing" interval of the 60 Hz sine wave. As far as we can tell, it works great and the switches were very good at avoiding noise that we knew to be on the lines.
There are other problems to avoid as well. For example, if your house is larger than 2000 sq. ft. or so, you want to use a bridge/amplifier. Let me explain. Houses are wired in two "phases". Almost like two zones on a network. In a smaller house, the signals may bleed over the phases well enough, but you are still likely to need a low cost coupler. In a larger place, you need to install a bridge/amplifier or coupler/repeater. We used the Leviton 6201 Coupler/Repeater, and it performed wonderfully. In fact, there was such a noticeable difference, you should consider putting one in regardless of the size of your house. The only problem is the cost, they are one of the priciest items in an PowerLine installation list at as much as $200.
You also want to consider putting in a panel mounted surge protector. This will not only protect your electronics internally, but it will help with some of the noise as well. Here, we used the Leviton 51120-3R. You may also want to consider a noise filter or block that is installed at your breaker box. We didn't do this, but many people will find it necessary.
One thing to realize is that the surge protectors you may use in your house (e.g., with your computer) may cause problems with PowerLine signals. Why? They filter noise. What is a PowerLine signal? Noise. In fact, the better your surge protector, the more likely it is to cause problems.
And, there are other culprits that can cause noise. For example, instant on TVs (which are basically all TVs today), refrigerators, air conditioners, low voltage lighting (e.g., Malibu type lights as well as indoor low voltage), and more. What can you do? If you suspect anything, put in-line and plug-in noise filters. We used a lot of the Leviton 6288 and it worked great and is cost effective.
Leviton Plug-in Noise Filter (#6288).
One big question that probably comes to mind is how does the computer talk to the PowerLine devices? It's pretty easy actually. Typically, people are using older Macs. One of our primary machines is an LC III... remember those? You take a serial output from the computer (e.g., the modem port) and plug it in with an adapter cable to an interface. We used the IBM Home Director. Be forewarned though, most people have complaints about almost every one of the interfaces out there. For us, we tried multiple Home Directors, yet still see phantom messages come across the log that may or may not be there.
We have heard fairly good things about the LynX-10 by Marrick (<http://www.marrickltd.com/>). The best known issue with it is that it may have difficulty keeping track of dim settings going over the network. So, you would have to code your software to compensate for this something that's a good idea anyway.
While some folks consider the CP-290 interface to be limited and even obsolete, the people that we spoke to called it "undeniably the most reliable X-10 interface". Something worth considering.
There are a variety of interfaces from the slew of mail order companies that serve the HA community. See the end of the article for some links.
OK, so it wouldn't be a MacTech article unless we spoke about debugging. <g> The hands down winner here is a product called the "PowerLine Signal Analyzer" (PLSA) by Monterey Instruments (760-941-3666). The product is pricey ($349), and it has an interface that it takes some getting used to, but if you are serious about PowerLine, get this product you'll save yourself a lot of grief.
The PLSA will allow you to do several things. First, it allows you to look at raw codes. So, when we couldn't figure out what was going on with some phantom messages, we could instantly tell with the PLSA that they were phantom. We were also able to quite easily determine the before and after differences of the coupler/repeater installation.
Many sources have told us that the signal strength of a PowerLine signal should be between 100 and 200 millivolts. Even if the device is rated at as little as 50 millivolts, you should still look to have at least 100 mv to give you extra buffer. On a similar note, typically 100mV of noise or less is OK. The PLSA will help you identify both of these easily.
In short, you can do the following with this tool. Code identification, signal strength monitoring, noise metering, signal dissection and recording history.
The manual will give you an excellent understanding of how code transmission theory works. It will educate you on a number of other important areas. If you get this product read the manual. I'm serious. You'll spend 10 minutes reading the entire thing, cover to cover, and you'll save yourself hours.
Enough Background, Let's Do Something
Enough theory, what can we do with this stuff. The two easiest things are controlling lights and electricity... and controlling irrigation.
To me, controlling lights is a big enough item, and worth doing. We've used a combination of PowerLine products and conventional motion detection to do this. Why is lighting such a big deal? It comes down to a couple of things... convenience and security.
When you have computerized control of the lighting, you can do some nice things. For example, I have our front porch and pilaster lights set up to go on automatically. The computer calculates the sunset based on our area each day. The lights are set up to go on a random number of minutes after the sunset. This not only gives us the convenience of automated lighting, but the security of it looking like someone is home. The switched lights are all controlled by conventional light switches, but just use ones that receive PowerLine signals. We used the Leviton 16383 (make sure you don't confuse these with the older 6383). These are very nice looking, solid feeling switches. And, while they look similar to a standard Decora rocker switch, they operate a bit differently. To turn on the light, you tap the top half. Off? Tap the bottom half. Dimming? No problem. Press and hold the top or bottom half. The switch remembers the last dim setting and uses that for when you "tap" it on.
Leviton DHC Switch (#16383).
You can also do a "three way" switch if you use the Leviton MS00R-1 remote (or slave) in conjunction with the Leviton 16383. Now, if you are completely anal like me, it actually may annoy you to see the light off, but one of the 3-way switches in the wrong position (e.g., it looks like it's turned on). No worries. Because of this "tap" on/off type action, the switch always returns to the neutral position.
Motion Activated PowerLine Signals
If you ask someone in law enforcement, they will tell you that one of the most effective crime deterrents you can do is motion activated lighting. Now, you can use conventional motion detection, but one thing that PowerLine will do for you is actually log the activity, not to mention allow you to control that lighting.
We used a series of Leviton 6417 "passive infrared transmitters". For some reason, these only came in a chocolate brown, so we had to spray paint them to match the coloring of the house. The sensors can "see" 110° for up to 40 feet; and have settings for sensitivity and darkness.
Leviton DHC Motion Activated Lights (#6417)
These lights have an interesting feature. Let's say that the code for this light is F1. When the motion activation happens, the transmitter will not only turn on the light, but can also send on signals to F2-F5 depending on the switch settings. We utilized this feature to install two sensors for one corner light. The first sensor can send a signal to the second sensor to turn the light on. There's a short delay when it does this, but it works well enough.
For our house, we have one motion sensor on each corner of the front of the garage door. So, it stands to reason that if both sensors are triggered simultaneously (or nearly simultaneously), a car is probably pulling into the garage. Now, in the really cool category, we wanted to have the hall lights inside turn on. By monitoring the time each motion detector was turned on, you can have a script that sends that signal to the hall light wall switches. We'll revisit this to write a script to accomplish this.
Another example is something that Michael Ferguson (well known in the Mac HA community), has running in his home. He can ask the computer for the whereabouts of others in his house are. Based on educated guesses, the computer will give a "most likely" response to him. For Michael, who lives on a fairly large property, this is really useful.
Conventional Motion Activated Switches
Sometimes, you don't need the computer to do everything. For example, there were some places like the garage that we didn't need computer control on, but wanted there to be motion-detected lighting. In this case, you can use something like the Leviton 16775 "Decora Wall Switch Occupancy Sensor". Like the 6417, this is an infrared sensor, but this one fits in the place that a Decora wall switch normally would. You can set the switch to auto, off and on. This switch is a great solution if you don't need PowerLine control.
For us, it's been the solution to the argument "why'd you leave the garage light on all night". Remember, SAF is very important. (Yes, I was usually the culprit.)
Electrical Outlets and Lamp Modules
There are so many devices that can be controlled well if you can just control their plug. Here, you have two basic options: a plug in lamp or appliance module, and a hard-wired outlet. We used both.
For the outlet, we used the Leviton 6280 Duplex Wall Receptacle. We used these for all of the low voltage lighting (with plug-in noise filters) that include "up lights" for trees, and other decorative lights.
For the pilasters that are in front of our house, they have electrical outlets as well. Because they are in front of the house, we didn't want them to always be on. So, we used the 6280 to control the power from the computer that way, they are usually off unless we want them on for a specific reason (e.g., holiday lighting).
Lamp and Appliance modules can be used for all kinds of things ranging from a light to a coffee maker. It's just up to your imagination.
One minor aside, you can use, without a computer, a "telephone transponder" to control things. Personally, I found that I was able to do most everything I wanted with the computer. One good use for the Telephone Transponder is to access scripts on your system from your touch tone phone. We used the Leviton 6325 when we wanted this type of interface.
If anything other than lights needs to be automated, it's sprinklers. Sprinklers are one of those things that, when done right, still need constant tweaking. It is possible to build a "model" that will allow you to control your sprinklers with good results. For example, let's say that a non-raining, Winter schedule are half the days and two thirds the duration when compared to the maximum watering schedule (Summer). You can see how you can build a model that suits your individual situation.
However, unlike lights, there are some worries about controlling sprinklers. For example, what happens if your system goes hay wire or the computer crashes? Will the sprinklers be on all day? What if it rains? What if it rains a lot?
The solution is to get a product that really understands both sprinklers and PowerLine. Enter the IRRMASTER-Pro from RCI Automation. These units come in a 4 and 8 zone model. You can use as many units as you want in a system provided that you have enough available house codes. Any time a station is turned on, it will turn off automatically after 80 minutes. This is your safeguard against problem commands.
The unit can be turned on manually from the box itself (e.g., in your garage). And, you can hook in a rain sensor (they use the Mini-Clik II Rain Sensor). Rain sensors can block watering until the sensor has dried out. More specifically, the system goes into a "suspend" mode when the sensor detects rain. The IRRMASTER-Pro then sends a unit 10 X-10 ON command to your home automation controller so you are informed of the rain condition and that the system is in the suspend mode. The IRRMASTER-Pro continues to send a unit 10 X-10 ON command every 24 hours to keep you informed that the system is still in the suspend mode. When the discs in the rain sensor dry out, the circuit opens again and the IRRMASTER-Pro sends a unit 10 X-10 off signal to your home automation controller to inform you that the suspend mode is over.
The sensor can be adjusted to different quantities of rain. So, if you want to get up to 1/4" of rain before turning off the sprinklers, you can make that adjustment (anywhere from 1/8" up to a full inch). Since the hygroscopic discs in the sensor dry at approximately the same rate as turf, the sensor and your grass will roughly parallel each other, as you would want them to.
In addition, if you want to shut the sprinklers off for 72 hours, you can send the IRRMASTER-Pro a unit 9 X-10 OFF. The suspend mode will automatically end 72 hours later, or you can immediately end the suspend mode by sending the IRRMASTER-Pro a unit 9 X-10 ON command. These functions can also be performed manually by pressing the Enable/Disable button on the front of the IRRMASTER-Pro. The green LED will be lit when the system is enabled. These functions are independent of the rain sensor functions.
One planning tip you'll need a contiguous block of PowerLine addresses for the irrigation system. In our case, we need two full house codes. You should plan on one house code per IRRMASTER. So, before installing the IRRMASTER, we had to do a bunch of system rearrangement of all the other PowerLine devices to clear the space needed.
RCI can be reached at <http://www.rciautomation.com/> or 619-857-4268.
ADB I/O From BeeHive
While we didn't get a chance to experiment with this product first hand, it definitely is something you should know about. ADB I/O is a Mac peripheral that allows you to control electronic devices and read data from sensors. You can control it via AppleScript (and therefore home automation software), or by writing your own code. There are some commands that you can do with the bundled software as well. As the documentation says, the possible applications of ADB I/O are almost endless, but to list just a few: Computer controlled science experiments in schools or at science fairs; control of electronic devices in your home; access control in office buildings; construction of complete weather stations by attaching wind, temperature, humidity, light sensors and barometric sensors. See more info at BeeHive Technologies Inc., <http://www.bzzzzzz.com/>.
Computer Control... The Software
We've spent all this time talking about the network and the hardware, now it's time for the software. On the Macintosh, there are three main pieces of software for controlling X-10: XTension by Sand Hill Engineering, Mouse House, and Thinking Home by Always Thinking. We took a look at XTension and Thinking Home.
First off, you should know that these are both great products. They've approached things differently and have different heritages. You really couldn't go wrong with either of them. We're going to dive in here and just show you how the products work.
XTension is a fairly mature piece of software, especially in home automation industry terms. XTension was written by Michael Ferguson, an engineer with a background in control systems. When you first open XTension, you are presented with a variety of windows: a master list of units, scheduled events, and a log.
However, there are other excellent ways to view information. For example, a graphical view of your house showing assorted icons representing XTension controlled items in your house. You do this by simply creating a PICT, creating a new "View" in XTension, and then positioning the assorted items throughout the map. And, you can control items by clicking on the views.
As the status of items changes, the map is updated. For example, in the figure, you'll see the sprinklers on, assorted lights, and an icon that represents whether the sun is up.
Later in the article, we'll talk about how you can view this map on a television channel throughout your house.
XTension House Map
One of the first things that you'll want to do is set up the units. This is incredibly simple to do, it is just a matter of filling out this dialog.
XTension Editing a Unit
You may also want to create events at certain times. That is also easy, you just fill out this dialog box.
XTension Editing an Event
There are some things that are a "must do" when using Home Automation software. One of those is action based on the sunrise or sunset. Based on your location, XTension calculates the sunrise and sunset times each day. Why is this important? Look around your neighborhood. If it's like mine, you'll see a huge variety of times that neighbors outside lights are on... all making their best guess at darkness. Now, you can do it with some reality... still adding in some randomization to make it look like you are home.
XTension Preferences (Sunrise/Sunset)
Writing a "Sunset" script can be incredibly trivial. In fact, XTension has it built in to just run the script called "Sunset" at the appropriate time.
XTension Sunset Script
Now, one of the best features of XTension is its incredibly strong AppleScript integration. Not only can XTension run AppleScripts, you can also edit them from directly inside the application. If you are working on a machine with limited CPU power, this is incredibly useful.
AppleScript is really built-in to XTension. For example, even the communication between the serial port manager and the "main process'" is via AppleEvents. As MacTech readers know, this makes it very easy for Sand Hill to add new features, which often result in passing those events to a 'monitor' or 'targeted' copy of XTension.
You may remember from earlier in the article, we have two motion sensors on the garage; one at each corner. The below script is activated when an ON message is received by Motion: Garage W. It checks how long it has been since Motion: Garage E went on and if they are within 5 seconds of each other, turns on the hall light inside the house. A similar script is set up for Motion: Garage E checking the time delta for Motion: Garage W and turning on the light as necessary.
The trick here is that we're using the Leviton 6417 passive infrared transmitters. These are hooked directly to the flood lights so that there is no delay in them turning on. (There are slight delays in sending PowerLine signals, but they are less than a second generally.) In this way, they act like non-PowerLine motion detector lights. But, we want to know when the lights are going on, so we ask the 6417 to output a "phantom" code. In this case, it's the address of the 6417 (F1) plus 1... in other words, F2. To capitalize on this, we define a "phantom" unit, which is F2. It doesn't represent anything physical, but it does allow us to have the below script.
XTension Editing a Script
In my mind, this is in the "hack" category, but you can do "variables" in XTension as well. The trick typically used is to create additional phantom units (ones that have no physical representation). Then you can store values in them. For example, the below script keeps track of rainfall.
XTension Using "Variables"
Speech recognition with XTension is most easily done via AppleScript that would look something like this:
tell app "XTension"
toggle "Office Lights"
Save as a compiled applet, in the Speakable Items folder. Name it "Lights Please".
So, do I like XTension? Yes. However, I will warn you of a few things. I find the program a bit non-intuitive. I did struggle at first with some things, but once I got them, it was fine. The user interface, as we discussed, could definitely be better. And, you either need a floppy disk or image to deal with the copy protection... something that would be better served by a simple serial number.
If you are going to do very simple things, then you definitely want to go with Thinking Home with the better user interface. If you are willing to go through some teething pains, XTension is a great choice with great support.
And, because of AppleScript, anything that you can do with your Mac, can be done by XTension. For example, XTension can send you email, or go to a web page, or whatever you want... as long as you can do it in AppleScript.
XTension sells for $99 through Sand Hill Engineering. There is a widely used discussion list, with a Sherlock plug-in for the archives. Lastly, the web site has some links to interesting places and examples on the web. <http://www.shed.com/>
Thinking Home 1.1
Now that you've seen XTension, Thinking Home will seem incredibly easy. Frankly, Bruce Lawton and Russell Easby-Smith, have done a really great job with the user interface. This program is an easy way to get started with PowerLine networks. Let's take a quick look.
When you launch the application, you'll see a device list. This is well laid out with icons, and other pertinent information. Devices are related to scripts and in short, it's easy to grasp a lot of information very quickly from this window.
Event and Macro lists are similar, you just press the tabs at the top of the window. And, similar to the "control panel" in XTension, there's a "Remote Control" in Thinking Home that allows you to quickly control items in window.
Thinking Home Overview
Editing events are easy in Thinking Home. The "Security Time Fluctuation" allows you to add a random number of minutes to the event.
Thinking Home Editing an Event
Macros are simply a series of steps. The Macro editor lets you see an overview of these steps in addition to editing each one of them.
Thinking Home Editing a Macro
One thing that's different between Thinking Home and XTension is that XTension does not download macros to the interface... ever. Thinking Home can do this. So, if you want to turn your computer off, or use it for other things, Thinking Home will allow you to download commands to the interface's memory (if it has it). One thing to note, though, is that you lose the "if/then" and other forms of logic when you don't have the computer monitoring behind the interace.
Beware, though, interfaces can be a weak link in your network. So, depending on the interface you are using, you may want to keep the control on your computer to avoid the Poltergeist effect. On the other hand, depending on your application, this can be an incredibly useful feature.
Thinking Home Interface Tools
Thinking Home does allow you to run AppleScripts easily. Unlike XTension, you do need to use a separate editor for the scripts. With Application switching on the Mac, this is not a big deal, provided you have enough CPU horsepower and RAM.
Thinking Home AppleScript Interface
One of the best features of Thinking Home is the support of voice recognition and announcement speech. Basically, to get Thinking Home to respond to speech, you simply turn on the check box "Respond to voice commands".
Now, think about this. You're now approaching Star Trek category. Take a installation that is using a wireless microphone. Now, you pull into the garage and want the lights inside to be on for you. You simply say "lights on", and because the base for the wireless microphone is hooked into your Mac with speech recognition, Thinking Home can oblige!
In our example, we were pointed to Lotus Productions in Seattle, www.lotusproductions.com, (206) 579-4320. They carry a series of wireless microphones, and the model that has a history working well is the Pro.2 Wireless Microphone, Model WM-581/582.
Thinking Home Speech/Voice Capabilities
Thinking Home requires System 7 or later to run, and needs a Power Macintosh, iMac, G3 or Macintosh with a 68040 with 2 MB of RAM, and 3 MB of disk space. As you would expect, announcements require the Speech Manager (comes with the Mac OS) and voice commands require PlainTalk Speech Recognition (which is included on the Thinking Home CD and on the web).
Thinking Home supports direct CGI AppleEvents, 'WWWOmega'. This means that because you don't have to go through AppleScript, the response time is very fast. The web integration that you can do is only limited by your imagination. For example, you could have a motion detector alert you via an AOL Instant Message, or a Pager, to turn to a web page with a web cam on it.
Now, if you are like me, you also really want to blur the lines between your computer system and your other electronics. The last year has made this very possible... and here are a few examples.
Just as this article was getting completed, a new player emerged in HA for the Macintosh. the ZephIR! by StudioZee is an ADB device that allows you to control infrared. In other words, it allows your Mac to control CD players, VCRs, DVDs, receivers, satellite systems, ReplayTV, televisions, and more.
One of the strongest features of ZephIR! is its ability to help you manage and select your music CDs. With the freeware application NetCD, written by Toby Rush <http://www.tobyrush.com>, you can catalog your CD collection using an Internet database <http://www.cddb.com>. Once your music catalog is built, the ZephIR application allows you to drag the disc into "magazines" teaching your Mac where each of your CDs are located in your multi-disc player. You then are free to create play lists of all varieties... not just by album title, but by artist or even the type of music.
Imagine combining these capabilities with speech recognition, HA software, and a wireless microphone. You may be in your living room and say "Computer: Please play Classic Rock." The HA script could know to turn on your amplifier via a PowerLine device, send an infrared signal to the receiver to select volume and the source for the music, and then execute your "Classic Rock" play list. This is doable... today.
Now, obviously, you need to have the stereo traverse your house. There are wireless methods, but for my ears, conventional wired solutions are the only way to go. We used a series of Niles Audio products <http://www.nilesaudio.com/>. Through fairly conventional methods, we set up 4 sets of remote speakers through their SPS-4 speaker selector, added volume controls to each room (e.g., a knob on the wall), and lastly, a series of weather resistant (for outside) and in-wall/in-ceiling speakers.
There is information available at a detailed level for today's electronics' IR interfaces. For example, one of my favorite brands of home entertainment is a brand called NAD <http://NADelectronics.com>. NAD LINK (their name for the IR command interface) is based like most home electronics IR on a standard created by NEC years ago. (FYI: There's a new standard called RC5, which is now starting to take hold as well.) So, for example, here's a small snippet of NAD codes to control a variety of items on my main receiver (a NAD T770):
|22||MULTI SOURCE VOL UP'|
|23||MULTI SOURCE VOL DOWN'|
|2E||5.1 EXT INPUT'|
|D5||'CENTRE VOL DOWN'|
|D6||'SURR. REAR VOL UP'|
|D7||'SURR. REAR VOL DOWN'|
|D8||SUBWOOFER VOL UP'|
|D9||SUBWOOFER VOL DOWN'|
You get the idea. Now you can see how the capabilities of the ZephIR! are just limited to your imagination.
We didn't have time to get a full review of ZephIR! in place, but it's such a monumental product for HA on the Mac, we wanted to mention it here. Those that have used it rave about it... and they're just getting started. And, because of the strong support already of AppleScript and XTension, you can do just about anything infrared with it.
You can find out more about The ZephIR! by StudioZee at <http://www.thezephir.com/>.
ReplayTV: The Personal Television Server
One of my absolute favorite, run away useful, geek toys is ReplayTV. If you are like me, you've always been frustrated with cable TV or even VCR interfaces... and dreamed of the day that you could just put a computer interface in front of recording, and record to a hard disk instead of tape. No tape changing, no continuous hassle of programming, just convenience. It's now here.
There are a couple of products out there that allow you to record to hard disk in a consumer product. The one that we looked at was ReplayTV... and frankly, as corny as it sounds, it has completely changed the way I watch TV. It's a tough thing to explain without experiencing it first hand, but I'll give it a shot.
Basically, in tech terms, ReplayTV is a CPU most adept at MPEG II recording and playback. It has significant disk space... mine has two 13 Gigabyte drives. It's got an infrared blaster, and a whole slew of input and output jacks for audio/video and cable. There's a built-in modem as well. It even has a FireWire port for future expansion (although it's not supported as of yet). ReplayTV is both a product, and a service... not to forget an operating system.
That's nice. But, what does it do?
When you set up the unit, it dials into the ReplayTV network and downloads about a week's worth of programming for your area. The first place you probably want to go is to see the "Channel Guide". Here, you can view an online TV guide which is updated each night via the modem to a local number. (If you live in a remote area, you may want to verify that the call is local.)
When you want to record something, say "Ally McBeal", you hit the record button... once for one time recording, and twice for guaranteed recording each week. So far, that sounds not far off from a VCR... except you are now done... forever. For example, you don't have to swap tapes in and out each week. And, you don't have to reset or recheck the VCR each week. The latest Ally McBeal will always be there to watch!
ReplayTV Channel Guide
In addition to what you can program, ReplayTV has "zones" set up for you. This allows you to browse through what is playing even if you don't know what's on.
ReplayTV Replay Zones
Lastly, ReplayTV will allow you to set up "themes". So, for example, let's say I want to see all Star Trek: Voyager episodes, or anything to do with Tennis. I can set up separate themes, say one with the keywords "Star Trek Voyager" and another with the word "Tennis". ReplayTV will search the database it's downloaded from the ReplayTV Network, and create these theme channels for you.
ReplayTV Searching/Theme Channels
ReplayTV can handle virtually any type of source: antennae, satellite, digital cable, analog cable, direct video sources, etc... The ReplayTV Service is a free service... there's no monthly fees. And, in case you are wondering about quality, it has three levels of recording quality... the lowest of which is more than adequate for watching weekly television shows. New versions of the OS are automatically downloaded and installed for you. You can use the skip feature to skip commercials, and the instant replay feature to see the last bit of what you just saw. And, you can watch something while it is recording... even if it's the show you are currently recording!
So, why has this "changed the way I watch television"? Basically, I never watch television any more on the TV's schedule... I watch it on my schedule. When I want to watch something, I simply pull up the Replay Guide to see what I have recorded... and I select something to watch. Think about that. If you have kids, you never get them in bed in time to see the beginning of your show... it's always 10 minutes after the show started. With ReplayTV, you can watch it 10 minutes after it started... no problem.
If this part of the article sounds like a commercial, it's because I really like this product. The only down falls that I've experienced are two fold. First, I didn't like having this unit in my bedroom because the hard drive made noise. That was solvable (see the ChannelPlus section below). Second, the initial version of their OS was limited... and most of the items on my wish list were implemented in version 2.0.
ReplayTV 3030, 30 hours of Recording Time, $599.99. ReplayTV 3020, 20 hours, $499.99. Replay Networks at <http://www.replaytv.com> or 877-ReplayTV
ChannelPlus: Whole House Distribution
When we started the research for this article, we were presented with several issues and possibilities. One of the big ones for me was how to integrate the computer integration with entertainment setups. This not only includes audio and video distribution, but what about an infrared network that will actually work?!
The problem you have is that you have all these devices that output audio/video signals, but you can't figure out how to have them play on all the TVs in your house. Furthermore, for not only the A/V equipment, but also true proliferation of the control that ZephIR! can give you, you need to an infrared network.
Enter ChannelPlus systems.
Basically, here's how it works. You have your central A/V area probably in your family room. This is where your "stack" is VCRs, DVDs, ReplayTV, etc... What you want to do is take the output of some or all of these devices, and have them each appear on their own channel on all the TVs in your house. In my house, channels 80-89 are unused. Skipping one channel between to keep interference at bay, we used channels 80-86. So, I have the ReplayTV on channel 80, the DVD on 82, LaserDisc on 84, and my Home Automation server on 86. The home automation server not only outputs to a computer monitor, but also uses the video output we have built-in to a Performa. This output goes into the ChannelPlus unit and that way, I can see the status of what's on, and what's not, everywhere in the house on channel 86!
Other possible solutions are to have one or more web cams go not only to the web, but to the TV coax network in your house.
ChannelPlus: Distribution Panel
ChannelPlus has a variety of different solutions. They have package solutions (all-in-one, or all-in-two), and they individualized modules. In addition, there are standard modulators, as well as ones that can handle stereo and surround sound.
ChannelPlus: 3400 Series Modulators
If you are looking to just get the basic functionality of moving A/V onto their own channels, then take a serious look at the 3400 series. In this type of network, you get two "boxes". One that goes at your stack where you plug in all the A/V into the modulator. The second goes at your point of distribution (usually in the garage or an attic). This allows the coaxial output of the modulator to be "merged" back into the coax distribution of the house.
ChannelPlus: Infrared Target (#2133)
In this 3445 setup, we simply plugged in a "infrared target" (the 2133) at each location that we wanted to control IR. This is a small box that sits on coax in between the wall jack and your TV. This box takes your IR signal (when you point your remote or ZephIR at it), and converts it into a 5 volt signal and puts it onto your coax "network". In my experience, this methodology works far better than many of the IR -> RF converters that are on the market.
If you are really gung ho on this stuff, and budget is not an issue, you should look at ChannelPlus' best quality stuff. Realize that putting these types of modularized systems does take planning and understanding... and it may be easier to just leave it to a professional installer. Be forewarned, the more modularized systems are complex enough that you are likely to run into minor gotchas here and there. There's nothing wrong with these solutions, but given how many more pieces there are (due to more and higher quality modules), they are simply more complex.
One of the benefits to these higher end systems is that the infrared network is two-way which could be of use to certain types of needs. They also have the obvious advantages to Stereo and Surround Sound.
If you haven't figured it out already, ChannelPlus really shines in conjunction with not only ZephIR!, but also ReplayTV. In fact, it turns ReplayTV into a real "television server" because it gives your house a video network.
Now, in doing this, there are a whole series of issues that you should realize up front. First and foremost is that you are going to need to have an additional run of coax from area near your "stack" to the distribution point. This is for the output of the modulator.
You should also realize that these are all modulators. By definition, they will never output the quality of a DVD they will typically be around the quality of a broadcast signal over analog cable or antennae. They will be much better quality than the Channel 3/4 modulators built-in to your VCRs.
The ChannelPlus systems are really meant for installers to install for you. But, being of the technical crowd, you can likely do it yourself without much difficulty. Be forewarned, the manuals have lots of little tidbits in them scattered all over the page so read the manuals thoroughly before proceeding and you will save yourself a lot of trouble.
Lastly, you are dealing with an analog signal here. So, any thoughts that you might have on splitting signals, etc... are going to cause you trouble. Yes, you can usually split a stereo signal and get away with it. But, video signal is not so forgiving and if it survives one split ok, it definitely won't survive two splits.
Now, there are some folks that wonder what products like the ChannelPlus line of modulators have to do with a magazine like MacTech. I'm sure that you now see that Home Automation is ultimately not about computers, but controlling your environment. And, ChannelPlus gives you a way of interfacing your IR computer control with devices in your home. Furthermore, it allows for you to have a television network to take advantage of other technology. For us, the ChannelPlus network is what ties much of our household network together.
Moving Forward with Home Automation
There are so many things that we didn't cover here. For example, what about HVAC control and duct dampers? Or the long list of automated items: Pet feeders, aquarium equipment, garage door openers, deadbolts, blinds and drapes, alarm/security, driveway sensors, gate openers, etc.
Here at MacTech, we always want to know what you think about articles. But, this article, more than most, really has us curious. We really want to know what you think about this article. Did you find this article interesting? Do you want to see more articles about writing scripts for Thinking Home and XTension? Do you want to see coverage of other technical home products? Let us know at email@example.com, firstname.lastname@example.org, or if you want to send something to me personally, email@example.com.
If you are going to be serious about Home Automation, realize that you need to be prepared to invest the time to make it work. I can tell you that this article was supposed to be written six months ago, but every time we looked around, the project grew and more things were added. Most people will tell you of similar situations.
It can be enormously fun, but it can also be frustrating. Get yourself equipped with the right tools and get help installing the electrical hardware if you aren't used to doing basic electric installations. And, set things up using bridges, filters, and other methodologies to prevent problems from entering into your network.
You should seriously consider joining the mailing lists like XTension list, or the comp.home.automation newsgroup.
And, as for all of the products that are more technical in nature, RTFM... or put more politely, do yourself a favor and read the manuals cover to cover before installation.
But most of all... enjoy your home of tomorrow.
This article was so broad, it drew on a number of sources. Special thanks to the following folks for helping out in the research of this article, or with descriptions: Bob Sherman and Pam Winikoff of Leviton, Pete Schwartz of ChannelPlus, Bruce Lawton of Always Thinking, Michael from Sand Hill Engineering, and last but not least, Jay Pryor and Jeff Brandt who helped with the hard wire installations.
Where to Buy?
There are a large number of places on the web that are sources for X-10/PowerLine products. Here are just a few...
Neil is the Publisher of MacTech Magazine and the CEO of Xplain Corporation. He's been around the Mac developer community for many years with his first Mac program shipping in 1985.