The MisterHouse APRS Tracking System, or MHATS, is a system written in Perl, that provides the following services to Amateur Radio Operators currently using software based on the Automatic Packet Reporting System Protocol (APRS) protocol, written by Bob Bruninga, WB4APR:
|Decodes $GPGGA and $GPRMC NMEA-0183 sentences, an industry standard sentence of tracking information from a Global Positioning System (GPS). This decoded information is used to provide visual and audible notifications of station bearings and distances from both the MHATS base station, and other points of interest.|
|Decodes Temperature, Wind Direction, Wind Speed, and hourly/daily rainfall totals from APRS-based weather report packets. This information can be accessed later for retrieval purposes, or as an information source to control X-10 Home Automation Products. (For example: Automatic X-10 Thermostat Setback, and Wind Alarms).|
|Remote Control through the APRS Messaging Protocol of home appliances based on the X-10 system.|
|Automatic events triggering system. For example, if your mobile system comes near your MHATS base station, it can trigger lights/appliances to automatically turn on.|
|Incoming packets are kept in a text file to act as a hotlink to the javAPRS tracking system, to provide mobile station plotting on maps. javAPRS is a Java application that will run right in your Java-enabled web browser.|
|All incoming packets are also sent to any station connected to Mister House’s Telnet port #2, for use in LIVE mapping using javAPRS or full-featured WinAPRS and APRS-Street Atlas tracking programs. This functionality is similar to Steve Dimse’s “APRServe” server application.|
The heart of MHATS is the MisterHouse Home Automation System, written by Bruce Winter. MisterHouse provides the software interface between your X-10 devices, Caller ID, Digital/Analog I/O ports, and your computer. MHATS was specifically written for use with the MisterHouse system, but can be modified for use with any Perl 5.002 application. More about MisterHouse in a following section.
MHATS was developed because basically, the world of computing is turning into the world of the Internet. MHATS, or a system similar to it, will make sure that these highly advanced and useful systems can stay useful even through the development of new technologies.
Background to MHATS
One day in November of 1998, I stumbled across a home automation website that I couldn’t stop reading about. Somebody had developed a system to combine Home Automation with Voice Recognition, Text-to-speech, If..Then logic, and the Internet. Better yet, this system was available as freeware! Other systems on the market that can do these things cost upwards of $650, and can not touch how capable and how modular this system is. Unfortunately, I thought at the time, is you had to know the Perl programming language in able to customize the software for use with your house. Since MisterHouse, written by Bruce Winter in Rochester, Minnesota, was such a robust system, I just couldn’t pass it up! So I was off to download it, and to learn Perl. “Oh great,” I thought. “Another programming language I’ll learn to hate.” Maybe that’s why the only language I ever programmed in was BASIC, because you couldn’t match the features and the ease-of-use with anything out there.
Very quickly, I learned that Perl was going to become my programming language of choice! For those that already know a language, such as BASIC, it is very easy to convert your current programs into Perl. Like any language, there are different programming methods and functions to learn, but much is actually based on BASIC. Better yet, Perl can be used to make scripts for web sites, and is very similar to the Java programming language, so while you’re having fun, you are also giving yourself a very good upgrade path to other popular programming languages.
As I became more and more impressed with the capabilities of MisterHouse, I worked with Bruce Winter, the author, on making improvements for such things as generic serial data input/output and web templates. MisterHouse has constantly grown with features, and after these routines were implemented, I started work on a system that would decode APRS packets and allow wireless home control over radio.
More on Mister House
For use with the Mister House software, you can use several easy-to-obtain hardware modules for your light and appliances control. For the interface between your computer and these modules, you can use several technologies:
|The CM-11a Home Automation Computer Control Interface, from X-10 Powerhouse. Plugs into a wall outlet, and your computer’s serial port. Available in the X-10 Activehome kit from http://www.x10.com for $49.99 (as of December 1998). For that price, you also get a few wireless remotes and a lamp and appliance module to control 1 light and 1 2-prong appliance. In my opinion, this is a great and inexpensive kit. Some people have had problems with the CM-11a falling asleep and not responding after a length of time. I personally have not had this experience with the module.|
|Weeder Technologies kits, available from http://www.weedtech.com. I don’t have personal experience with these kits, but you could ask Bruce. Assemble-yourself kits consist of X-10 Control, Phone, analog, and digital control. The kit is $40.00, and requires a $25 WT-523 module from X-10 Powerhouse.|
|JDS Technologies X-10 interface. Sorry, but I can’t tell you anything about this unit. I believe Bruce Winter was on a mailing list for JDS devices at one time.|
As you can see, X-10 is probably the most frequently used, most inexpensive, and most flexible of all Home Automation infrastructures today. X-10 basically sends data to turn devices on and off, dim and brighten lights, all through your house AC wiring. Need to control another light or appliance? Just buy a $15 module and plug it in. No need to run strands of wiring all over your house.
MisterHouse is one of the first applications available that take advantage of the new Microsoft Whisper and Whistler technologies for voice recognition and text-to-speech. These technologies will likely be introduced in Windows2000 (previously Windows NT 5.0) in a year or two. You simply download the software development kit (SDK) from Microsoft’s Research web site, and MisterHouse will take full advantage of its capabilities. If you think Microsoft has enough market share and enough niches already, then you’ll probably be pretty upset! Microsoft’s voice recognition is the most accurate I’ve ever tried, and will probably become the market share leader in this field too.
With a good quality microphone mixer hooked up to your server PC, you can get MisterHouse to turn lights and appliances on and off just by the sound of your voice. Although most of us aren’t millionaires, I’ve had fun playing just with a local microphone myself!
MisterHouse also comes with a built-in web server, to allow you to control all your stuff through your local web browser. Very handy if you have an internal local area network!
Alright, alright, I’m sure you can’t wait to hear where to get MisterHouse. Go to http://misterhouse.webjump.com/ and pick up your copy today!
On to the Main Event, the MisterHouse APRS Tracking System
Once you have fallen in love with MisterHouse, you are ready to start using MHATS. If you have become proficient with MisterHouse, MHATS is simply an add-in module of Perl code. Copy the tracking.pl file into your CODE directory, and you’re half done!
Let me elaborate more in detail on what exactly the MisterHouse APRS Tracking System requires to operate, and what it is capable of.
|Requires a terminal node controller, or TNC, hooked to a local PC serial port. A TNC is basically a 1200 baud wireless MODEM that communicates using a transport protocol called AX.25. AX.25 has carried messages and emergency traffic over “Packet Radio” for over 10 years. Many manufacturers, such as Kantronics, TAPR, Kenwood, and MFJ make such TNC’s. I presently use a KPC-3, by Kantronics, connected to a Micrologic Supersport GPS receiver to send position reports from my truck. An old KPC-1, also by Kantronics, decodes the AX.25 back at the base station.|
|Information sent over AX.25, specifically GPS and weather information, is decoded by MHATS and communicates with both the text-to-speech interface and the web interface of MisterHouse, to provide audible notification of mobile and temperature locations. Information can be retrieved by MHATS using the local console or any web browser. MHATS also creates a log file of all incoming AX.25 packets, for use with systems such as javAPRS, to actually plot these stations on a map display. Again, the map display is accessed through a web browser, as long as it is Java-enabled.|
|MHATS is capable of sending packets to Kenwood TH-D7a Handheld Transceivers to give an easy-to-use indication on exactly where a mobile APRS station is at. For Example, “N0QVC-9 is 0.1 miles west of Jefferson Elementary” is much easier to decipher than a latitude and longitude!|
|By sending APRS-compatible messages through systems such as DOSAPRS, by Bob Bruninga, WB4APR; WinAPRS, by Mark Sproul, ?????; and APRS+SA; you can easily send X-10 house and unit codes to remotely control home appliances.|
The thing to keep in mind is that the functionality and capabilities of MHATS will be continuously growing! If you know Perl, you can create your own functionality quickly and easily.
Where Can I Find MHATS?
When you download the newest version of MisterHouse, you will find the newest “tracking.pl” file in the “code\public” directory. If you prefer to keep your current version of MisterHouse, you may download MHATS fromhttp://www.faribault.k12.mn.us/brian/aprs.
Installation and Configuration of MHATS
To activate the functionality of MHATS, simply copy the “tracking.pl” module into your C:\mh\code\xxx directory.
With the current version of MHATS, configuration must take place in two different locations. First, you will want to edit your mh.ini file. Make sure your latitude, longitude, and time zone are correct. MHATS relies on accurate information here for all distance calculations. You will want to select a serial port and proper baud rate (ABAUD) to communicate with the TNC in this file as well. Choose DTR handshaking. As an example, here are some lines inmh.ini you will want to check and modify with your own settings:
# Following 2 lines are to enable “APRServe” Emulation
# Set up Serial port and baud rate for TNC
# Next two lines need to be added for use with MHATS
callsign=N0QVC # Your Ham Callsign
speakflag=3 # 0 = No Speaking
# 1 = Speak GPS Reports Only
# 2 = Speak Weather Reports Only
# 3 = All Speaking
Next, you will want to edit tracking.pl itself. The only thing you will have to change in this file is your position line in $tnc_output.
You will want to create your own position file, which is a comma-delimited ASCII file consisting of a list of points of interest. Any location in this list can be used by MHATS when it calculates distances. This way, you can instantly get bearings and distances from any of the locations listed in the file, to aid in you locating mobile stations.
Tracking.pos is also found in the C:\mh\code\xxx directory. Here is an copy of a sample tracking.pos file. Notice that the fields are Landmark Location, decimal latitude, and decimal longitude. Bearings based on these coordinates will be automatically calculated by MHATS.
First United Bank,44.29418,93.27524
Kwik Trip North,44.30317,93.27154
Faribo West Mall,44.29748,93.30265
The thing to keep in mind is that the functionality and capabilities of MHATS will be continuously growing! If you know Perl, you can create your own functionality quickly and easily.
This article in part was published in the July 2001 issue of “Home Automation” magazine. You can click a thumbnail to view the article as it was published, or scroll below to read the full article.
Tracking System (MHATS)
Linking the World of Home
Automation with Amateur
by Brian Klier, N0QVC
Early in the morning, I was driving back in my truck from a great fishing trip on Lake Kabetogama, in Northern Minnesota. I was progressing south down the Interstate on the way home, and I realized it was going to be quite a scorcher that day! Before long, it was 95 degrees, hot and humid. One of those days you feel lucky to have air conditioning in your vehicle! Unfortunately, when you usually come home from a trip with the house closed up, you are greeted by a blast of very sticky, hot air. This is where the remote control abilities of my Home Automation system come in handy. I typed out a message to my house on my laptop to “turn the air conditioning on” using my “MisterHouse/APRS Tracking System”. I smiled as I received the confirmation message “X-10 Message Received” on the display screen. Sure is nice to come home to a cool house after a long drive!
So what makes this possible? The software I wrote, called the MisterHouse/APRS Tracking System, or MHATS, is a module that bridges the gap between the Home Automation world and the Amateur Radio world. Specifically, MHATS works as a “plug-in” to a home automation package called MisterHouse, written by Bruce Winter in Rochester, MN. MisterHouse provides the software interface between your X-10 devices, Caller ID, Digital/Analog I/O ports, and your computer.
MHATS, on one side, plugs into the Home Automation system. So then how do we get the long-range wireless capabilities of MHATS? This is where one of the hottest advancements in the Amateur Radio digital field comes in. It’s called the Automatic Packet Reporting System, or APRS. This protocol, created by Bob Bruninga, an amateur radio operator from Maryland, was created primarily for tracking cars, hot-air balloons, or anything else equipped with a global-positioning system (GPS). With an Amateur Radio license, the GPS, a two-way radio, and a special wireless “MODEM” called a terminal node controller (TNC), anyone can jump on the APRS bandwagon.
Both MisterHouse and APRS are very nice systems. But I thought, “Wouldn’t it be nice to be able to link these applications together, so that one could control a house remotely, or know where one’s vehicle is by having it announced over the P.A. system in the house, or use the weather information sent over APRS to know if it’s cold enough outside to turn on your electric blanket in your bedroom?” This is what the current and future development of the MisterHouse/APRS Tracking System intends to do. Best of all, both MisterHouse and MHATS are free software.
What you will need
· An Amateur Radio License from the FCC
· A Pentium-Class Computer at home installed with the MisterHouse Home Automation System
· A laptop/palmtop computer with a flavor of APRS installed
· X-10 ActiveHome Starter Kit (Computer Interface, Transceiver Module, and Lamp Module) – $49.99
· A pair of TNCs, similar to wireless MODEMs, for your home and vehicle – $200+
· A pair of Amateur Radio Transceivers (two-way radios) – $200+
· A Global Positioning System (GPS) for the vehicle (Optional) – $200-$250
· Miscellaneous Cables
(2) Serial Cables – $10
Other connectors and cables, as needed (dependent on TNC and Transceiver manufacturers)
As there is equipment to assemble, documentation to read, and software to configure, please plan two or three weekends to complete the project.
What you Need to Do
The first thing you will need to do in order to use Amateur Radio frequencies for wireless communication is to get an Amateur Radio license. To get an entry-level license, called the “Technician” license, you will need to pass an examination on basic electronics theory, antenna design, and operating procedure. You no longer are required to learn Morse code. Your local Radio Shack may carry books to help you study for the exam. Also, look in the Helpful Links box to find Amateur Radio Clubs and upcoming exams near you.
You may already have a vast X-10 home automation system in your household. If you don’t, getting into the world of home automation is very simple, and doesn’t cost too much. X-10 has been a standard for controlling lights and appliances from remote locations for 20 years. X-10 sends data to turn devices on and off, dim and brighten lights, all through your existing house AC wiring. Need to control another light or appliance? Just buy a $15 module and plug it in. No need to run strands of wiring all over your house.
To let a computer inside your house take control of your devices, you will need a CM-11a or Firecracker Computer Control Interface, from X-10 Powerhouse. The CM-11a transmits and receives X-10 signals, and plugs into a power receptacle and your computer’s serial port. The Firecracker is a transmit-only device, and gets its power directly from your computer’s serial port. You can get these devices, as well as motion detectors, lamp and appliance modules, and dry contact closures from your local X-10 dealer, or http://www.x10.com. I personally recommend the X-10 Activehome kit (CK-11a) for $49.99, which includes the required computer interface, as well as a transceiver/appliance and lamp module to get you started.
Your computer at home needs to be installed with a piece of software that can tell your X-10 computer interface what light or appliance in your home to turn on or off. The MisterHouse/APRS Tracking System handshakes with the MisterHouse home automation system. Both of these are free software, and are available at http://www.misterhouse.net. When you download MisterHouse, MHATS, in a file called “tracking.pl” will be in the “code\public” directory. MisterHouse is an open-source home automation package, capable of many high-end features found in expensive systems. MisterHouse can use voice recognition packages to turn X-10 devices on and off simply by speaking in a microphone. You can also control your house through a web browser anywhere on the Internet!
Next, you’ll need a “client” program installed on your mobile computer, to talk with your home automation system at home. With APRS gaining popularity worldwide in the Amateur Radio world, you can use almost any platform inside your vehicle to communicate back to your home. Versions are available for 10-year-old laptops running DOS, the newest laptops running Windows, or tiny handheld computers such as the Palm V (see figure 1 and 2). Most of these versions are shareware and are not time limited, so you can use the messaging capability of them to talk back to your house. You can download APRS for your portable computer at http://www.tapr.org.
Now, the equipment that actually allows data transmission at a physical layer between your needs to be purchased and installed. Terminal Node Controllers, or TNCs, are wireless MODEMs for the Amateur Radio world (see figure 3). Your computer sends data to the TNC, and the TNC will convert it to tones that you can hear, and sends them out over the two-way radio. It enables two computers to transfer information using the radios instead of wires.
Almost any pair of 1200 baud TNCs will work for APRS. One of the most popular is the Kantronics KPC-3+. This TNC has two serial ports, so you can attach both your portable computer and your GPS up to it at the same time. You can also take the portable computer in and out of the vehicle without reconfiguring the system. Kantronics has more information about this TNC at http://www.kantronics.com/kpc3+.htm. Another popular TNC manufacturer is PacComm (http://www.paccomm.com/handi.html). Many ham radio operators are starting to use Kenwood transceivers, which have a built-in TNC, for use with APRS. Go to http://www.kenwood.net/ama_page.cfm for more information.
After you purchase your TNCs, attach them to both your home and portable computers with a standard serial cable.
In able for your home and vehicle to “hear” each other, you will need two-meter radios (see figure 3). Generally speaking, the more watts the radio is capable of outputting, the greater your range (and price). If there is a local APRS digipeater in your area, you can get away with radios as little as 1 to 5 watts. These “digipeaters” are like cellular radio towers, expanding the coverage of home and mobile stations much farther than what is normally possible. Almost every state has several of these, and coverage areas are growing all the time (see figure 4). The nationwide radio frequency for APRS is 144.390 MHz.
You will also need an antenna for each radio. After you study for your amateur radio examination, you will have the knowledge to pick a radio and antenna best suited for your situation. Your local amateur radio club will also undoubtedly be able to offer advice on radios and antennas that work the best.
Some manufacturers of transceivers:
· Yaesu (http://www.yaesu.com/amateur/mobile.html and http://www.yaesu.com/amateur/handheld.html)
· Icom America (http://www.icomamerica.com/amateur/2mhand/index.html and http://www.icomamerica.com/amateur/2mmobile/index.html)
· Alinco (http://www.alinco.com/usa.html)
Many ham radio operators are starting to use Kenwood transceivers, which also have a built-in TNC, for use with APRS. Go to http://www.kenwood.net/ama_page.cfm for more information.
After you acquire your transceivers, you’ll need to fabricate a cable between each TNC and Transceiver. This is necessary so the TNC can “key”, or start the radio transmitting. Also, this is the physical media that transfers the modulated/demodulated data between TNC and radio. All TNCs and Transceivers have included diagrams on how to assemble such cables for “Packet Radio” use.
If you want to be able to track where your vehicle is from the Internet and from your house, you will need a GPS that is capable of sending data to a computer device. Most GPS’s will do this. Make sure to look for the statement “NMEA-0183” compatible. If the GPS you purchase does not include a serial data/power cable, make sure to buy one of these so you can attach your GPS to your TNC to send your current position.
What can I do with MHATS?
Wireless controllers you purchase today can only control devices in your house, at most, several hundred feet away. The MisterHouse/APRS Tracking System software lets you do this from several miles away, even 50 to 75 miles away! The quality of the radio and antennas you purchase, as well as the maturity of the APRS network in your area determine the range of the system.
The interconnectivity of the software with home automation and amateur radio offer several more features than just controlling X-10 devices inside your home. MHATS can also decode information sent out by GPS receivers. Using this feature, decoded information is used to provide audible notifications of where your vehicle is located. By using a list of landmarks that you can customize, it can tell you that your car is a half of mile east of the grocery store, or just pulling in your driveway!
In addition to knowing where your vehicle is, many stations on APRS report up-to-the-minute weather information such as temperature, wind direction and speed, and hourly/daily rainfall totals. This information can be accessed through the home automation system if an occupant of the house is curious, or it can be also used as an information source to control X-10 home automation products. For example, knowing it’s below freezing outside so you can turn on your bed heater. If .. Then statements can be created within MisterHouse to do anything you can dream of using weather information.
MHATS provides an interface between other APRS tracking software such as WinAPRS and javAPRS that can take information and plot it on a constantly updated map display. JavAPRS uses Java and can run right in Internet Explorer or Netscape! See figure 5.
In the future, MHATS will be able to turn lights or appliances on or off if your GPS-equipped vehicle comes near your house.
Since several amateur radio operators are developing the APRS protocol, and several others are creating add-ons similar to MHATS, you can expect to see many additions in the future. It is possible to send one-line E-Mails from your vehicle, as well as send comments to people over ICQ. Sign up for the official APRS Special Interest Group at http://www.tapr.org for more information on how to access these services.
There is documentation included with MisterHouse on how to configure MHATS. For more specific information on how to install and configure MHATS, you can point your browser to http://kliernetwork.net/aprs.
Keep in Mind
If you live in a colder climate, keep in mind that cold weather is harsh on portable computers. With this system, it is not necessary to have a brand-new laptop, so go to refurbished computer stores or “hamfests” to find inexpensive 486 or newer computers.
Amateur Radio is a shared system. Others will be able to monitor you sending commands to your home. There are safeguards in place to protect your house from being controlled by somebody other than you, but keep in mind that any information transmitted can be viewed by other APRS users on frequency.
APRS is made possible by the personal contributions of many Amateur Radio operators worldwide. Please respect the bandwidth on the APRS channel and always be sure to use the service appropriately. Join a local club and promote APRS and digital communications.
If you place your transceiver, TNC, and GPS in a concealed location in the vehicle and leave them on when you’re out of the vehicle, you can always keep an eye on where it is. Other than your system at home, if there is a nearby Internet Gateway on your local APRS frequency, sites such as http://www.findu.com can track your vehicle from the Internet. Can you imagine tracking your vehicle and explaining to the Police what corners it’s turning at? Keep that in mind.
The graphic and photo captions are included below. The graphics and photos themselves are separate from this document. They are at a rather high resolution, so you shouldn’t have a problem cropping and resizing them to fit white space. Let me know if you require different versions of any of these.
A laptop computer, used to show the vehicle’s present location, and to send X-10 commands back to the house (figure 1)
Screen snapshot from the DOS version of APRS, running in the truck (figure 2)
A Two-Way Radio and TNC (figure 3)
APRS Coverage Map from http://www.dididahdahdidit.com. Each star signifies an APRS digipeater (figure 4)
The MisterHouse interface running MHATS (figure 5)
· For installation and configuration help, or to find out more technical details about this system, go to http://kliernetwork.net/aprs
· For more pictures and specific equipment I use to make this system possible, point your browser to http://kliernetwork.net/aprs/mine
· You can search for an Amateur Radio Club near you to help you pass the exam.
· When you think you’re all ready to get your license, find a Volunteer Examiner (VE) near you to take the test.
· View what’s going on in the APRS world right now, from any Java-Enabled web browser.