Mitch's Home Automation Page
Many thanks to those who attended my Mac Home Automation talk
at the MacWorld Expo on January 7, 2000. I'm happy with how the
presentation went, especially given the limited amount of time
there was to talk about so much!
I apologize for not having enough handouts; I just didn't realize
the amount of interest. Well over 100 people attended the presentation.
If you didn't get a handout, or if you didn't attend and want
to see what I talked about, I've placed the entire presentation
online here. (This version also corrects one typo in a URL;
MouseHouse is www.mousehouse.net,
NOT www.mousehouse.com as in my original handout - sorry!.)
If you have any questions on anything covered in the presentation,
just let me know!
|
In 1997, I built a new
house. I also began to play with home automation. This page is to
serve as an example of some neat things one can do with home automation.
The system is certainly in constant flux. Over time I'll be adding all
kinds of stuff, and I'll try to keep things relatively up-to-date on
this page. As this page is rapidly growing, I'll soon have to split
it into multiple parts.
If you are new to home automation, Sand
Hill Engineering has a nice introduction.
I hope this can serve of some value to others. If you have any questions
or comments, please drop me a note!
Hey, this site got mentioned on MacOS Rumors on 10/30/98!
Cool!
Contents
Hardware, Software, and general information
Outdoor motion sensor/floodlight
Thermostat setback
Post light
Alarm system integration
Fax software integration
Voice notification
Office system integration
Telephone Integration
Manual control
Garage Doors
Setting the correct time nightly
How to catch CM11 flakiness
Automatic restarting and file sharing
Weather (WX-200) monitor interface
Caller-ID (YoYo) use
Lawn Sprinkler (Irrigation) system
Internet Gateway
Home Theater integration [UPDATED
9/28/99]
Hardware, Software, and general information
My main Home Automation server is a Macintosh IIci with 20MB RAM and
running System 7.6.1. This is a very old model, but is well suited to
the task. I've added an ethernet card, a VideoVision card, and an old
Applied Engineering QuadraLink (four-port serial card). The VideoVision
card provides NTSC output; the computer is located in the family room
and uses the TV as the monitor. Also attached is a FaxModem and a UPS
(keeps the computer on when the power goes out).
[UPDATE] In November, 1999, I received
a nice new G4/450 (pre-downgraded model). I turned my 7500 into the
home automation server (604e/250 processor card, tons of RAM, huge HD).
This is quite a treat with all the spare processor cycles, so I'm finding
new toys to play with. My IIci is now enjoying some time off for the
first time in years. This change will necessitate some changes to this
page, which I'll make when I have a minute.
The software running the home automation stuff is XTension
from Sand Hill Engineering. This
is truly a wonderful application for X-10
interfacing. Not only does it handle the boring act/react functions
of ActiveHome (Windows software
from X-10) but has many other functions, not the least of which is great
use of AppleScript, Apple's standard system scripting language.
I use the CM11A
interface from X-10 to communicate with the power lines. The CM11A is
known for having problems,
and I certainly have them. Every few days it just goes to "sleep".
I've yet to replace it with something better, like the Lynx, out of
hope someone comes out with a working CM11A in the same price range
in the near future. For now, I use whatever tricks I can to keep the
CM11A "awake".
Other software on the system includes Timbuktu
(allows remote use of the system), FaxSTF
(see Fax software integration below), OkeyDokeyPro
(clicks the default button on any dialogs that pop up) and KeepItUp
(makes sure XTension is always running. I used to use it for nightly
restarts, but that caused a big problem - see the automatic
restarting section for details.).
In April, 1999 I added a HomePro
signal repeater/amplifier. This attaches to the breaker box in the
basement, and bridges (and amplifies) signals across the two phases.
Prior to this I was losing occasional signals, but this did the trick.
Expensive ($170) but worth it.
Outdoor motion sensor/floodlight
My first X-10 product with a purpose was the PR511
motion detector/floodlight. It's placed above the garage doors. When
it "sees" motion, it sends an ON signal to XTension and turns
its lights on. After five minutes of inactivity, it sends an OFF signal
and turns its lights off.
Other than logging this activity, I don't currently do anything else
with the PR511.
My opinion of the PR511 is very low. My first was totally dead. This
works well as a dumb motion detector/floodlight, but doesn't always
send the appropriate ON/OFF signals. It also sends random signals every
few days. I've seen many others complain of similar problems. Eventually,
I'll replace this function with an MS12A
motion detector and regular X-10
wall switch.
Thermostat setback
This is a "justification" for home automation - energy savings.
Will I save enough money to justify my entire automation system? Of
course not. But I should save the cost of the setback
controller (about $20).
A thermostat setback is a clever, if clumsy, device. About the size
of a thermostat, it is mounted on a wall just below a regular thermostat.
When powered on (via an appliance module) it gets slightly warm. This
fakes the thermostat into thinking the room is about 10 degrees warmer
than it actually is. As a result, it triggers the heating system for
that zone at a lower temperature, reducing heating costs.
The only thing I dislike about the setback is that it lacks a power
indicator. Since the heat/cool periods are several minutes long, you
can never really tell if it's on or off. An LED and a resistor solved
that problem. (Ran across the low-voltage power where the cord goes
into the setback.)
My house has two heating/AC zones. Currently, I only have a setback
downstairs, which isn't generally occupied at night. I'll be adding
an updairs setback shortly.
XTension has a great scheduling window. At 11:00pm, the setback is
activated (the attached appliance module turned on). At 7:00am, the
setback is deactivated.
The alarm system is now installed, and controlling the setback as well.
(see alarm, below). When I arm the alarm in "away"
mode (when the house is empty) the setback activates. When I return,
the setback deactivates. I still use the timed functions for evening
setback, but I'll probably tie this to the "stay" mode of
the alarm shortly (I've now done this.).
Fancy X-10-controllable digital thermostats definitely exist, but are currently too expensive
to justify. This setup works quite well.
Post light
I have an outdoor post light, halfway down the driveway. My street
has no town-provided streetlights, and this is actually the only post
light on the street. I installed a standard X-10 wall switch to control
the light. XTension has an accurate "sunset" event (based
on date, time, and location as set in the Map control panel) which turns
on the post light. Actually I have it fade up ("Simulate preset
dim" set in the XTension unit dialog), just to impress the neighbors.
I saw no reason to leave it on all night, so at 11:00pm it fades out.
I had some trouble getting the wall switch to fade up after a manual
override (a human pressing the actual wall switch), so I toggle the
control. Unless the light is already on (or off), the light acts normally.
In the stanrdard "sunset" script:
turnoff
"Post light"
turnon "Post light" in 15 --(that's 15 seconds)
and in a scheduled
script which runs at 11:00pm:
turnon
"Post light"
turnoff "Post light" in 15
I recently added an X10 switch to the lights outside the front door,
and added them to the same scripts. They're rather bright (Too bright
for the otherwise unlit street) so I just raise them to 65% in the scripts.
I recently (5/99) added eight outdoor lights, along the walkway, and
they're on the same sequence. Also along the way.
I had some trouble with the newspaper delivery person, who had a tendency
to drive onto my lawn. So by looking at the XTension logs of the driveway
motion sensor, I determined the range in which the paper is delivered.
So the lights go on for about 45 minutes in the early morning. Problem
solved.
Alarm system integration
Here's my theory on alarm systems. To me, a house alarm system is "mission
critical". I never want it to fail. Since computers and X-10 devices
can fail, I've gone the traditional professionally-installed and monitored
route. I had an X-10 compatible alarm system installed. I've programmed
it to send X-10 signals in response to various activity.
In the interest of security (although I'm not sure it makes much difference)
I'm not posting the brand, model, or details of my security system.
The controller is a common brand (not X-10). Many systems support sending
of X-10 events.
The events I've integrated with the alarm system:
- Arming-Stay (arming perimeter, not motion detectors): This is the
mode I use when I'm in bed for the night. Since that means I'm done
downstairs, it will activate the downstairs thermostat setback.
- Arming-Away (entire system armed): This means I've left the house.
Both thermostat setbacks will activate. This will also trigger scripts
to turn interior lights on/off based on a semirandom schedule to simulate
someone being home (made easy with XTension's randomized schedule
function).
- Disarming: Deactivates thermostat setbacks, deactivates automatic
lighting scripts, etc. This will also trigger a "status"
speech script (see below).
- Actual burglar alarm: Hopefully this will never happen, of course.
I'll log the event, but the security system does the rest. If/when
I add cameras, I'll certainly record images.
- Fire alarm: Same as burglar alarm (it's the same system).
- If alarm is in AWAY mode, and either garage door opens, the interior
light just inside the house from the garage turns on.
- And for no reason other than to impress my friends, an announcement
is triggered when any alarm-capable door is opened.
Fax software integration
I work at home, and this same Mac IIci acts as a fax receiving system.
It's running FaxSTF 3.2.5. When
a fax comes in, FaxSTF runs a AppleScript applet to notify XTension.
XTension increments a counter of unread faxes, and alerts me via voice.
To make this work, place your applet in FaxSTF's "Fax In"
folder and select the appet in Fax Settings to process received faxes.
(The ability to run an applet here is an undocumented feature).
The applet:
on
open theList
try
tell application "XTension 1.7.1"
execute script "ReceivedAFax"
end tell
on error
--do nothing
end try
end open
The XTension script:
speak "A
Fax has been received"
set value of "Faxes Waiting" to ((value of "Faxes
Waiting") + 1)
I reset this value from my office Mac (see the Office
system integration section).
If you use FaxSTF on any server, I recommend disabling the FaxStatus
DA and notification of incoming faxes.
Voice notification
My server is in the den, but I'm rarely down there. So I ran a speaker
to my office. The speaker is in the floor, in an abnormally large return
vent drop (far away from air flow). I could easily add other speakers
around the house. I'm currently investigating a means to control active
speakers without the use of additional hardware - by using the Mac's
stereo sound control.
Once per hour, except at night (currently determined by scripting),
I get a status message. Computer speaks the time and lets me know how
many (if any) faxes are waiting.
Over time, I'll add many things to this message, like weather conditions,
sprinkler system activity, etc.
The script, which runs every hour on the hour:
copy (current date) as string to RightNow
copy (word 5 of RightNow) to TheHour
if (word 8 of (RightNow) = "PM") and (TheHour "12") then
copy TheHour + 12 to TheHour
end if
if (word 8 of (RightNow) = "AM") and (TheHour = "12") then
copy TheHour + 12 to TheHour
end if
--only do this after 8am, before 11pm
if (TheHour as number) > 8 and (TheHour as number) < 23 then
copy (current date) as string to RightNow
copy (word 5 of RightNow) to TheHour
copy (word 6 of RightNow) to TheMinute
copy (word 8 of RightNow) to AMPM
if TheMinute = "00" then
copy " oclock " to TheMinute
else
if TheMinute starts with "0" then
copy " oh " & TheMinute to TheMinute
end if
end if
if AMPM = "PM" then
copy "peyem" to AMPM
else
copy "ayem" to AMPM
end if
if (value of "Faxes Waiting") > 0 then
if (value of "Faxes Waiting") = 1 then
copy " facks waiting " to faxstring
else
copy " fackses waiting " to faxstring
end if
speak "It is," & TheHour & " , " & TheMinute & " ," & AMPM & "
, You have " & ((value of "Faxes Waiting") as string) & faxstring
else
speak "It is," & TheHour & " , " & TheMinute & " ," & AMPM
end if
end if
One problem I've run into with XTension: scripts with multiple "speak"
commands only speak the last speak command executed. That's why no speaking
happens until the end.
My server (an old IIci) only has 8-bit sound, making for rather poor
speech. Certainly understandable speech, but much more "computerese"
than I'd like. I can't justify replacing the system just for that, though.
Office system integration
The computer I'm using most often is currently a PowerMac 7600, located
in my office. I like to keep an eye on things with the server. Timbuktu
and XTension's monitoring features are certainly useful, but I don't
want them open all the time. I wanted something small with a minute
interface, just for monitoring and some manual control. After playing
with little AppleScript applets and HyperCard, I realized I had the
perfect tool - OneClick
from WestCode software.
OnsClick is a toolbar/macro program. You create buttons on palettes,
and give them scripts. Palettes can be assigned to applications (only
visible when an application is visible) or global (always visible).
Quicken's toolbar actually uses a runtime OneClick system. Even before
integrating with XTension, I've found OneClick to be well worth the
money ($50-$75 or so), even just for the included buttons/scripts.
OneClick scripts can communicate with other applications (and other
Macs on a network) by using included AppleScript code. A little tacky,
but it does work well. I only started with these buttons two days before
writing this, but already I have five buttons in a small (1"x1")
palette. When I'm not using it, I just reduce it to a small title bar.
It's a global palette, so it's a available.
So far, I'm not using any scheduled scripts. I'll add them once I have
a better idea of what to do with them. As an example, this is the script
of a button to get the current number of unread faxes, and display them
as the text of that button (named "FaxesWaiting"):
Variable anumber
Button("FaxesWaiting").Text = "Hold on!"
Button("FaxesWaiting").Update
AppleScript
--requires the "Login As" OSAX, part of GTQScriptingLibrary
--available at www.scriptweb.com/osaxen/
set RefInfo to (login as "mitch" password "xxxxx")
tell application "XTension 1.7.1" of machine "MitchServe"
copy (value of "Faxes Waiting") to anumber
end tell
logout RefInfo
anumber
End AppleScript
Button("FaxesWaiting").Text = ASResult & " faxes"
The "Login as" function is part of the GTQScriptingLibrary,
an AppleScript Extension ("OSAX"), available at http://www.scriptweb.com/osaxen/.
It allows control of applications on remote servers without the need
to manually "log in" each time. OneClick's "ASResult"
variable contains AppleScript's "result" information; in this
case, the variable "anumber".
This script runs very quickly - the result displays in under one second.
Be sure Program Linking is turned on (File Sharing or Sharing Setup
control panel) and XTension is set to be controlled (Select the XTension
application icon, select Sharing from the File menu).
I also have a button to toggle the power on a laser printer in another
room.
There's a bug in OneClick that generates incorrect compilation errors
when compiling scripts when the Finder is the frontmost application.
If you run into this, just have something else active. The buttons run
fine in the Finder.
Telephone Integration
At this writing, I have no telephone integration, although one feature
is immenent. While I like the hourly spoken status updates, I don't
like them while I'm on the phone. My current thinking is this: Using
a $20 telephone recording control interface (the kind that plugs into
the "remote" jack on a tape recorder), trip a relay on my
ADB-I/O.
The ADB-I/O, from Beehive Technologies,
is a really cool Mac-based real-world control/acquisition box. I'm not
using it for anything at the moment, so this might be a nice (if not
rather menial) task. XTension can easily query a port just before speaking.
Alternatively, I could use a powerflash
interface to signal phone line activity. I don't see a need to do this,
nor do I want to buy a powerflash since I already have the ADB-I/O.
I recently purchased an X-10 Telephone Transponder, but haven't hooked
it up yet..
Manual control
I have a few X-10 remote controls which I use for manual control around
the house. I've reserved the "A" letter code addresses just
for these functions (no actual devices are set to "A"). From
a remote, I can request spoken status, turn the post light on or off,
activate or deactivate the thermostat setback, etc. All buttons control
XTension scripts rather than directly controlling a unit.
I really like X-10's universal remotes. I have two UR19's, which are
non-learning remotes, and one UR24,
which is a learning remote (and has a funky red backlight). The buttons
are very well laid out, especially for satellite receiver use. I also
have a two-button
pocket remote, which isn't too useful due to its limited outdoor
range.
In winter of 98/99, X-10 had bizarre sales where you got a truckload
of free remotes with any purchase. I now have about a dozen UR19's,
and a few "Beer Buddy" remotes; the rest of which I gave away
as Super Bowl Party favors... The Beer Buddy (now called TV Buddy) is
an odd little remote with an integrated bottle opener. Really.
Garage doors
I have a habit of leaving garage doors open. Using two Radio Shack
alarm magnetic alarm contacts and a powerflash, XTension monitors the
doors. If a door is open for more than 30 minutes, I'm notified via
a spoken alert and a light being turned on.
The "On" script (runs when the door closes):
remove event "GarageOpenWarning" --if it exists
turnoff "Appliance/RF"
The "Off" script (runs when the door opens):
remove event "GarageOpenWarning" --if it exists
create event "GarageOpenWarning" that executes unit "WarningAboutGarage" in (30*60)
and the "GarageOpenWarning" script:
speak "Garage has been open too long"
write log "Garage has been open too long"
turnon "Appliance/RF"
Also, if either
door opens while the alarm system is set to AWAY, an interior light
near the garage entrance turns on. It will turn off 30 minutes later,
since I rarely need that light on when I'm in the house.
Setting the correct time nightly
One pet peeve I have is setting all my clocks to the correct time.
Now I can't really solve that with home automation, but it can help.
On the internet, there are several NTP (Network Time Protocol) servers.
These maintain relatively accurate time. With a little scripting, each
night my server connects to the internet, gets the current time, and
disconnects. The whole thing takes about 45 seconds.
This is done with a little help from Vremya,
a scriptable NTP client, and OT/PPP, Apple's PPP implementation. OT/PPP
comes with Systems 7.6 and higher, and is available from Apple's
support area. OT/PPP is easily scriptable through an OSAX installed
along with OT/PPP.
I also have a small application, SetDateTime,
in the Startup Items folder of other Macs. This app gets the current
time from the server Mac, keeping everything in sync.
I have a script, "Nightly Internet Stuff", which is scheduled
for 2:45am each day:
execute script "PPPConnect"
execute script "GetTCPStuff"
execute script "PPPDisconnect"
(I keep the pieces seperate, so I can easily add functions later)
The "PPPConnect" script:
try
PPP connect with quiet mode
on error errmsg number errNum
write log "Error " & errNum & " was encountered when attempting to establish a PPP connection."
end try
The "GetTCPStuff"
script:
set TheStatus to PPP status
if state of TheStatus "idle" then
try
tell application "Vremya"
set TimeDiff to sync "clepsydra.dec.com"
quit
end tell
write log "Time set. Seconds difference: " & TimeDiff
on error
write log "Error trying to set time via NTP!"
end try
else
write log "PPP wasn't connected, couldn't set the time"
end if
And the "PPPDisconnect" script:
if ((state of (PPP status)) "idle") then
try
PPP disconnect
on error
write log "Tried to PPP Disconnect, but got error #" & errnun
end try
end if
Dealing with CM11 flakiness using XTension
Here's a good one. The CM11 interface tends to "go to sleep"
now and then. Most people find this happens about twice a week. Restarting
the host computer seems to wake it up. This is a (messy but functional)
solution. This is a long one - so click here
to see these scripts.
UPDATE: XTension 1.7.3 has integrated a similar function, which toggles
the serial port until the CM11 wakes up. After a few weeks of use, it
seems to do the job well.
Automatic restarting and file sharing
Here's something annoying that I ran into. I use KeepItUp to keep XTension
in the foreground, and relaunch it if it happens to quit. KeepItUp also
has a function to restart the Mac daily. For a while, I also used it
to restart the Mac every night. It worked well except for one serious
problem:
If at the time of restart, another Mac was connected via file sharing,
the restart wouldn't complete. XTension and KeepItUp would quit fine,
but the "Users are connected to your Mac, how long to disconnect?"
dialog appeared. OkeyDokeyPro didn't catch that dialog (a bug I verified
with the author), so that dialog remained up - without XTension running
- until I manually caught it the next day.
My first thought was to force sharing off via AppleScript (and on again
at startup). An applet in the Shutdown Items did the job fine when manually
restarting, but (another verified bug) KeepItUp doesn't run Shutdown
Items scripts at restart. So the script never ran, so the Mac never
restarted.
The solution was the script the restart into XTension.
At 2:15am, XTension runs a script called "System Restart".
ignoring application responses
tell application "System Restart"
run
end tell
end ignoring
This runs an applet called System Restart (isn't that confusing?):
on run
ignoring application responses
try
tell application "Keep It Up (68K)"
quit
end tell
on error
end try
tell application "XTension 1.7.1"
quit
end tell
tell application "Finder"
restart
end tell
end ignoring
end run
The "ignoring" lets the scripts quit without waiting for
a response; since the Mac is restarting, there won't be a response.
Lastly, I have a pair of scripts in the Startup Items and Shutdown
Items folders, within the System Folder. These scripts turn sharing
on and off without any dialog warning.
In the Startup Items:
tell application "Finder"
set file sharing to true
end tell
In the Shutdown Items:
tell application "Finder"
set file sharing to false
end tell
Thus, the restart happens irregardless of anyone using the Mac as a
server. I should say that at 2:15am, if a computer is on, I'm either
asleep or not doing anything on the server anyway. I'm currently looking
for a way to detect active users and kick them off in a friendlier manner.
Weather (WX-200) Weather Monitor
The WX-200 is a Radio Shack product (Actually made by Oregon Scientific)
which provides current weather data collection. Going price is about
$300.00. It measures all sorts of things - temperature, humidity, dew
point, barometer, wind speed and direction, etc. Several measurements
are both indoor and outdoor. It has a nice display itself, but through
the built-in serial port, one can connect it to a computer. It comes
with some lame Windows software (much better
Windows software is available). Sand Hill has a
page on interfacing the WX-200 to XTension, but I'm writing my
own front-end which will eventually do a little more. (It is VERY
early in development.)
Currently my software does nothing more than read the data and display
it on-screen. I plan to add data logging, analysis, internet connectivity,
graphing, etc. It should be pretty cool.
Caller ID
I just bought two YoYos, from Big
Island. The YoYo is a little box that plugs into the Mac ADB port,
and provides Caller-ID (and a few other) features. At a list price of
$120, this was pricey, but I found them in the clearance bin of a computer
store going under - for $35 each. Quite a steal! Since they connect
to ADB, they are daisy-chainable (as opposed to Caller-ID modems which
require a dedicated serial port).
While one can do all sorts of things with the YoYo, all I do is have
the server announce the caller:
on <<event TELECAID>> theCaller
set theCallerIDType to item 1 of theCaller
set theFirstName to item 2 of theCaller
set theLastName to item 3 of theCaller
set theAreaCode to item 4 of theCaller
set theLocalNumber to item 5 of theCaller
if theCallerIDType is "Caller ID" then --We've got good data
tell application "XTension"
speak theFirstName & " " & theLastName
end tell
end if
end if
end <<event TELECAID>>
This script goes into a YoYo-related folder, and is run at each call.
Lawn Sprinkler System
In about a week, I'll be the proud owner of an underground sprinkler
system. Naturally, it should be computer-controlled. As a controller
I chose the IrrMaster,
about $179. It's an 8-zone controller which responds to X10 on/off commands.
It does have some intelligence related to sprinkler systems, which is
why I chose it over the more common universal module method. For example,
it won't let you activate more than one zone at a time, unless specifically
configured. It will also turn off any zone left on for 80 minutes, in
case the X10-OFF command wasn't received.
[UPDATE] The sprinklers are in, and have
been running for about a week. Since it's getting late in the season
(I can't really run the system later than mid-November) I probably won't
implement some of the cool stuff until the Spring. The main script that
runs the system is currently: [It's summer now and I'm still using a
basic schedule; been too busy to set the programming and weather moniting
up the way I'd like.]
--ON script for unit Sprinkler Activate
set newzone to future value of "Sprinkler Activate"
set oldzone to value of "Sprinkler Activate"
if newzone is 0 then
--turn everything off
if oldzone > 0 then --avoid error if already turned off
speak "Zone " & oldzone & ", off"
turnoff "Sprinkler " & (oldzone as string)
end if
turnoff "Sprinkler Enable Perm"
else
if oldzone > 0 then
--another zone was on!
turnoff "Sprinkler " & (oldzone as string) with no script
end if
--test for rain, humidity,temperature
--if above limits use, announce it
remove event "sprinkleroff" --in case another is still there, perhaps a manual switch
if (status of "Sprinkler Enable") is true then --in case it's on bypass
speak "Zone " & newzone & ", on"
turnon "Sprinkler Enable Perm" with no script
turnon "Sprinkler " & newzone in 15
brighten "Current Zone" to newzone with no script
if newzone is 1 then --ten mins for front bed, else twenty
create event "sprinkleroff" that turnsoff unit "Sprinkler Activate" in (10 * 60)
else
create event "sprinkleroff" that turnsoff unit "Sprinkler Activate" in (20 * 60)
end if
end if
end if
The above script is an ON script for a "dimmable" address-less
unit called Sprinkler Activate. It is called from Scheduled Events.
Currently I'm running it every hour (one minute past the hour). The
unit gets "dimmed" to the value of the zone I want to run
(I currently have seven zones; four more will be added in the Spring).
To be extra safe, I power-down the IrrMaster when not in use (using
it's Enable function). This is still a script somewhat in development;
I'll post changes as time goes on.
The only nifty function is a 30-minute disable remote. Since the water
supply comes from a private well, house pressure (available water, really)
goes down when the sprinklers are running. So when someone needs to
shower, there's a remote in the bathroom (one of the ugly X10 wall remotes,
but not mounted) which tells XTension to turnoff the Sprinkler Enable
unit, and it adds a scheduled event to turn it back in 30 minutes later.
I've also programmed a keychain remote to switch zones. I used this
to be sure everything was running right; I'd walk around the backyard,
pressing the remote, and taking notes on which sprinkler heads were
on which zones. I cranked up the speakers so I could hear the computer's
confirmation outside. So the neighbors saw me pressing a remote control,
heard a computer announce "Zone four on!", and then the sprinklers
would kick in. Bet they were amused!
My automation plans for this include:
- Intelligent rain sensor, by way of the WX-200. Not only prevent
use if it rains, but intelligently determine based on how much rain
over what period of time, temperature, humidity, etc.
- Intelligent planning based on forcast data available over the internet.
I'm still figuring out how to do this. Forcast data is easily available
for human readability,
but so far I haven't found a free source for computer readability.
I'll certainly post more on this as things are implemented!
Internet Router
I'm currently testing IPNetRouter, from Sustainable
Softworks. It is a simple internet router. It runs on the server
(along with everything else). If any computer on the network (Mac or
PC, including the Mac server) requests internet access, it connects,
and provides internet access through the server. Speed is excellent
- even though the router runs on the old Mac IIci, throughput is no
lower than with the modem directly connected. All computers have simultaneous
access, as well. IPNetRouter is $89.
The other popular software router is Vicomsoft
Internet Gateway, or their lower-priced SoftRouter. IPNetRouter
is closer in features to SoftRouter (no DHCP server, etc). I tested
the Vicom routers, and had truly horrible throughput on my server. I
should say, though, that several customers are using Vicom's gateways
with good results. Vicom's products are easier to configure, and offer
more features, but are quite a bit more expensive than IPNetRouter.
I came up with some handy scripts to deal with IPNetRouter, so I could
check connection status remotely, as well as force a disconnection/relaunch/etc.
Since IPNetRouter isn't truly scriptable (a future version should be),
doing these things is a bit messy. These use the Login As OSAX, mentioned
above.
IPNetRouter Status (launched on any networked Mac):
set RefInfo to (login as "mitch" password "[password]")
tell application "XTension" of machine "MitchServe"
set displaythingie to "Router is " & (state of (PPP status))
end tell
logout RefInfo
display dialog displaythingie
IPNetRouter Quit (launched on any networked Mac):
display dialog "Are you sure you want to quit IPNetRouter?"
set RefInfo to (login as "mitch" password "[password]")
tell application "XTension" of machine "MitchServe"
execute script "IPNetRouterQuit"
end tell
logout RefInfo
IPNetRouter Launch (launched on any networked Mac):
display dialog "Are you sure you want to launch IPNetRouter?"
set RefInfo to (login as "mitch" password "[password]")
tell application "XTension" of machine "MitchServe"
execute script "ipnetrouterlaunch"
end tell
logout RefInfo
IPNetRouterLaunch (XTension script):
ignoring application responses
tell application "Finder"
open file "MitchServe:IPNetRouter:IPNetRouter68K folder:IPNetRouter.Primenet"
end tell
end ignoring
IPNetRouterQuit (XTension script):
if ((state of (PPP status)) [not-equal] "idle") then
try
PPP disconnect
on error
write log "Tried to PPP Disconnect, but got error #" & errnun
end try
end if
tell application "IPNetRouter.68K"
quit
end tell
I use the Quit/Launch scripts when I need the modem line for something
else, like faxing.
Home Theater Integration
I've purchased an "slink-e", made by Nirvis
Systems. This is pretty much the ultimate home theater interface.
It allows RS-232 control of Sony S-Link protocol devices (most CD changers
and many other Sony products), along with IR in/out. The only Mac program
out there for it is TitleTrack
Jukebox, which I'm also using. It's nice, but is more for the person
with a CD changer on their desk than in a home automation setup. It
also doesn't support any device other than CD changers. It's running
on my IIci along with everything else. The newest version (1.0.1) is
scriptable over a network, which improves its usability in a home automation
setting quite a bit. I've written a very simple OneClick palette for
my office computer to control basic tasks. It lists out the CD choices,
plays, pauses, and stops.
My audio setup is simple, but a bit odd at the moment. The Sony CDX-240
200 CD changer is in the cabinet with everything else, including the
IIci server (I should really put a photo online). Line out from the
changer goes into my Denon receiver/amp. I run a line out from the amp
into two spare pairs of CAT-5 cable, which goes through the walls, patched
in the basement and eventually finding its way to my office. In the
office I have a pair of Bose Video Roommate speakers, which are self-amplifying.
Yes, that's right, I'm using CAT-5 (sharing cable with ethernet!) for
running line-level audio. Not exactly THX-certified but really not all
that bad for casual listening.
My main speakers are by Sound Dynamics, which are really quite nice.
My center channel and surround speakers are B&W. I used real audio
cable with the good stuff...
Eventually I'd like to see the Slink-e as a main control device for
all equipment (which includes an S-Link compatible satellite receiver
and TV). Click a button on a remote and set all equipment for the desired
mode. Program in a schedule of favorite TV shows and radio programs.
Stuff like that.
And that's all I've got so far! Comments? Questions? Drop me a note
at mcohen@proactiveinteractive.com!
|