The MisterHouse/APRS Tracking System: Linking the World of Home Automation with Amateur Radio

Introduction

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 https://misterhouse.sourceforge.net/ 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.

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:

Latitude=44.304
longitude=93.428
time_zone=6
city=Faribault
state=MN

# Following 2 lines are to enable “APRServe” Emulation
server2_port=14439
server2_echo=1

# Set up Serial port and baud rate for TNC
serial1_port=COM2
serial1_baudrate=9600
serial1_handshake=dtr

# 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
McDonalds,44.29438,93.27628
Minnicks,44.29782,93.28647
Lincoln School,44.29545,93.28612
McKinley School,44.3007,93.27451
Kwik Trip North,44.30317,93.27154
District Office,44.31982,93.27016
Faribo West Mall,44.29748,93.30265
Spikes,44.29047,93.29115

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.