Home » 2005 » January » 26

Daily Archives: Wednesday, January 26, 2005

The Most Versatile VoIP Provider: FREE PORTING

The Ultimate Home Automation Server: Your Shiny, New $500 Mac Mini

If you thought the Mac mini was only an entry-level PC Killer, think again. The Mac mini may just be the perfect server on which to build your dream Home Automation System. Having built one of these using an iMac G5, I’m more than a little jealous that it now can be done for $1,000 less using a Mac mini … or about $5,000 less than what you’d pay an "expert" to build it for you. So let’s get started. Just like baking a cake, we’re going to start with the ingredients, and then we’ll put them together and produce the finished product. When we’re finished, everything in your home or apartment can be controlled and managed from your home automation server, the Mac mini, using the keyboard, automatic timers, a web browser, an email message, or touchtone commands from any telephone in the world. A typical scenario might go something like this. You drive in your driveway after a long day at the office and, yep, the outside lights come on. But that’s not all. Your entire home magically comes alive. The living room, den, and dining room lights all dim to an appropriate level for just after dusk and your favorite after-work album for the 6 p.m. hour begins to play in the kitchen and exercise room. The aquarium lights go on, and, your Mac mini begins downloading all of your personal e-mail for later viewing. An hour later, the outdoor floods turn off. All of the interior lights turn off two hours after no motion has been detected in your home. This is the first of three articles on how to build just such a system.

Required Components. There are a number of components that can be used to build a home automation system. I’m going to break these components down into required, unnecessary, recommended, and optional. As far as required components, you obviously will need a bare bones Mac mini. It will serve as the hub for the Home Automation System. Does it need to be a unit dedicated just to home automation? Probably not, but I recommend it because the home automation system works better with an always-on server. If you’re going to do other things with your Mac mini, invest in some additional RAM. Otherwise, you’re fine with the $499 model as is.

We’re going to build this system using X10 technology so you need some software to control the timing of home automation tasks and to send X10 signals over the existing electrical wiring in your home. These signals control turning lights on and off as well as dimming them. And they can control appliances and thermostats. Combinations of tasks can be sent from the server to dim the lights, turn on your home entertainment system, choose a playlist from iTunes, and draw the drapes. It all depends upon how spiffy you want your ultimate system to be. Now that you have your Mac mini, the next required component is the X10 control software, an extremely powerful, well-supported product called Indigo. It costs $89.95 and is available with a 3o-day free trial directly from the author. Next, you’ll need a PowerLinc USB device, which is the device to which Indigo sends device instructions at scheduled times specifying when particular events should occur (e.g. driving in the driveway, sunset, or two hours after no motion is detected on motion sensors #1, #2, and #3). The PowerLinc device then sends the actual X10 signals down your power lines to individual X10 devices which control each light, or appliance, or outlet in your house .

When you buy Indigo, you get a special price on the PowerLinc device and one lamp module so here’s the link to get the deal. The cost is $35. You’re also going to need a USB hub to expand the number of USB ports on the Mac mini. A $10 4-port, bus-powered USB hub from CompUSA will suffice; however, make certain you plug the PowerLinc device into a dedicated USB port on the Mac mini, not into the hub! If you only want to control one light in your home, your required components are complete so get those pieces ordered first. However, we set out to build the ultimate Home Automation System so I’m assuming you probably don’t want to invest $635 and stop reading just yet. There are cheaper ways to dim one lamp, but you knew that.

Unnecessary Components. PowerLinc also makes a new device with memory called a PowerLinc Controller. This can be used to control X10 devices in your home without a computer even being on. Indigo can download the desired X10 commands, times, and triggers into the controller, and then you can shut down your computer. You lose some functionality with the controller, but not a lot. For example, the controller doesn’t know what time sunset is each day, but it does have an internal clock. So Indigo will handle the translation to an actual time and send the time of sunset today to the controller. This usually will suffice for a month or two at a time without another brain dump from Indigo. I’d recommend you skip this component for the time being and leave your computer on. You can always add it later when you decide to turn your Mac mini into a media center. Also in the unnecessary category is a UPS for your Mac mini. Unless your home is run by a generator when the power is off, a UPS doesn’t buy you much for reasons which should be obvious. A UPS also may cause interference which can scramble the X10 signals and produce undesired results. A power strip with surge protection should suffice for the Mac mini. Note that the PowerLinc USB device needs to be plugged directly into an AC outlet. For best results at lowest cost, the preferred location for the Mac mini and the PowerLink USB device is somewhere fairly close to the circuit breaker box in your home.

Intermission: Some X10 Theory. Let’s take a break from our buying spree long enough to talk about some of the problems you’ll encounter in an X10 Home Automation System. X10 systems suffer from two problems: line noise or interference and weak signal strength typically due to distance limitations. Large appliances, particularly older televisions, generate lots of "noise" on the power lines in your home. UPS systems and many no-name-special computers do the same thing. This causes X10 signals to get scrambled leading to undesirable or even no results. Weak signals are generally caused by one of two things: distance or too many X10 devices. Each X10 device absorbs part of the X10 signals on the line. You may not know it but there usually are two 120 volt runs of power in your home. To get a signal from an outlet on one run to an outlet on the other, that signal has to travel outside your house to the nearest transformer and back … unless you know the magic trick. Generally, you solve noise and interference problems with filters. And you solve diminished signal problems with signal boosters or the magic trick that we’ll get to in a minute.

The best way to install a problem-free X10 system is to build the server, load Indigo, and plug in your PowerLinc USB device and connect it to your computer. Get those three components working reliably first. Then turn off every other circuit breaker in your house. Now plug a lamp into your one lamp module, and then plug the module into an outlet near your computer. Enable the breaker that controls that outlet. Set the desired X10 address for this module by creating a new device in Indigo which matches the specs of your lamp module and then assign it a device address. Turn the lamp OFF at the lamp switch and then turn it back ON. Move immediately to Indigo and turn the device on three consecutive times in rapid succession. This will set the lamp module to whatever device address you configured in Indigo. There are 256 unique addresses so you don’t have to worry about running short. Turn the device off and on several times using Indigo to make sure it works reliably. If not, repeat the above steps.

Once the lamp can be reliably controlled from Indigo, unplug the lamp and lamp module and move them to five or six different areas of your home. Plug the lamp into the lamp module and the lamp module into a new outlet. Enable this outlet on the breaker box, and then turn the lamp on and off from Indigo. Repeat the test several times. If it works every time, move on to your next location. Here’s the magic trick. If it fails, turn on your electric clothes dryer (after enabling it on the breaker box), and repeat the test. If it still fails, you will need a repeater between the location of the computer and the location of the outlet. All you do is plug the repeater in to various outlets along the way, and repeat the test. If the lamp works after turning on the dryer and repeating the test, it doesn’t mean you have to run your dryer forever more just to turn your lights on. Instead, just buy an inexpensive phase coupler that matches the outlet on your dryer. If your house is larger than 3,000 square feet or is laid out in such a way that a heavy smoker would be out of breath when he or she got to the other end, I’d recommend you purchase a coupler-repeater instead of a phase coupler. This boosts the signal in addition to connecting the two 120 volt runs in your house. Turn off your clothes dryer now, move to the next location for testing, enable the breaker for the outlet, and repeat the testing procedure above. This sounds harder than it actually is. The good news is that, when you are finished, you will have isolated most of the signal strength problems in your house. As you add more devices, you may find that the signal diminishes below reliable levels again. At this juncture, you simply purchase another repeater and install it in various outlets between the source and destination until the problem goes away. A good rule of thumb is to buy one repeater for every thousand square feet in your house.

Now that the weak signal problemss have been addressed, you’re ready to tackle the line noise and interference issues. Make sure you’re back to square one in the breaker box with no breakers enabled except the one controlling the computer and PowerLinc device and one additional breaker controlling the outlet where you are going to plug in your lamp module and lamp to begin testing. Be sure you can turn the lamp on and off with Indigo several times. If not, go back to the tests outlined above. If all is well, turn on one additional breaker at a time and repeat the lamp testing. I’d start with the appliance breakers that typically cause the most problems: circuits with old TVs, circuits with a UPS device, and circuits with a computer. If you cannot turn on the lamp reliably using Indigo, then you need a noise filter on the circuit with the noisy appliance that is controlled by the breaker you have enabled. Turn off that breaker and proceed to the next breaker. Once you complete testing all the breakers, move the lamp and lamp module to another section of the house and repeat the tests outlined above again. It is quite possible to have a noise problem in one area of your house (which requires a filter) and not see the problem in other outlets so don’t get lazy and skip any testing steps, or you’ll be absolutely miserable down the road. In the event you run into problems or get frustrated, here’s a more detailed analysis of what I’ve covered in summary. You do not need to buy a signal meter to diagnose X10 problems. You just have to perform the above tests carefully and methodically. If you’re just curious later and want to verify whether a particular appliance is "noisy," use a battery-operated radio, tune it to a low AM frequency that is clear of noise, turn up the volume, and hold it close to each appliance and outlet you want to test. You’ll know instantly if there’s significant noise being generated by a particular appliance, and you just avoided making a $300 investment in testing equipment. If you want a more in-depth review of X10 home automation technology, SmartHome.com is a great place to start.

Stay Tuned. Your eyes are probably glazing over by now so we’ll save a discussion of the recommended and optional hardware for your Home Automation System for tomorrow. Then, in our third installment, we’ll connect all the dots and you’ll see what a truly incredible Home Automation System you’ve been able to build using a $500 Mac mini for your foundation. The moral of the story thus far is simple: start small and thoroughly test your outlets to find potential trouble spots. Don’t buy 50 home automation components and install them all thinking everything will work just fine. They won’t. If you’ve ever had a marine aquarium and tried to populate it with a dozen new fish in one fell swoop, then you already appreciate the virtue of patience. Otherwise, save yourself some grief, and just trust me on this.