Mister House Install Instructions

This file is for the installation instructions. The main Mister House documentation is in mh.html. A list of update announcements is in updates.html There is also a faq.html to cover misc. topics.


System Requirements

Mister House has been tested on Windows 95, 98, NT, and the unix OSes Linux and AIX. In theory, much of the function should run on any platform that can run Perl.

The core Mister House code will use between 10 and 30 Megabytes of memory. On Windows, the VR (Voice Recognition) function takes about 10 MB and the TTS (Text To Speech) function takes about 15 MB. On Linux, the Festival TTS engine takes about 20-30 MB of memory. So, with TTS enabled, on Windows you can get by with 32 Meg, but you will need 64 Meg or more to run with low speech latency. See FAQ question 1.2 for more info on memory usage.

The cpu time used -vs- loops per second is controllable. On a 100 MHz Pentium with a 100 ms sleep time, mh uses about 20% of the cpu and gets about 8 passes per second.

Quick Install Instructions

These are the quick instructions for those of you who, like me, don't like to read instructions:

This runs all the test scripts in the mh\code\test directory. Point your web browser to http://localhost:8080 and try out a few commands. Also try 'telnet localhost 1234' and type one of the commands you saw on the web interface (e.g. 'say something good to Bruce').


Detailed Install Instructions for Windows users

Step 1, Download and Install Mister House

I you already have perl installed, you only need to download the main misterhouse_src_###.zip package. If you do not have perl installed, you will also need to download the compiled mh.exe file, which is in the misterhouse_win_###.zip package. Both are available from http://misterhouse.net/download.

The 2 MB misterhouse_src_###.zip file installs into 5 MB of disk space. The misterhouse_win_###.zip takes an additional 3 MB of disk space. The compiled version is not any faster, it is just more convenient if you do not need Perl installed for any other programs.

Change to the drive/directory you want mh installed to (e.g. c:\misterhouse). Avoid directories with spaces in the name (e.g. \program files\). Files/dirs with spaces in them complicates perl code, as you have to then quote file names for the space valid. Now unzip the file(s) using your un-zipper of choice (use the -d if using pkunzip to preserve the directory structure). Look in the mh/lib directory to make sure long file names were preserved (e.g. http_server.pl). If not, you can download unzip from http://misterhouse.net/public/unzip.exe.

Step 2, Download and Install Perl

You can skip this step if you downloaded the compiled version of Mister House.

Download and install Perl version 5.005_02 (or higher) from http://www.activestate.com/ActivePerl. The 5 MB zip file installs into about 15 MB of disk space.

After installing the core Perl package, you need to install the Tk package. mh will run without Tk, but the Tk gui interface gives it more function. Activestate has provided ppm (Perl Package Manager), a nifty new way of automatically downloading and installing packages. Do this by logging on to the internet and typing:

The Tk package is about 2 MB, so it will take a while. If you are behind a www proxy firewall, try setting the environment variable http_proxy=http://<proxy-server>:<port>

If you have problems installing the files with ppm over the internet, you can download the files and install them from local storage. For example, to install the Tk package:

All other required packages should either be in the mh distribution or is now installed by default in the standard Activestate distribution.

Step 3, Download and Install the Speech Engines

You can skip this step if you do not want to enable TTS and VR, but much of the fun of Mister House comes from the 2-way speech. If you are running NT 5.0, you should be able to skip this step, as this function should already be installed. The Creative Labs PhoneBlaster software also installs this function.

If you are running Win95, the Perl OLE interface to the MS speech engines require that you have DCOM 1.2 or higher installed. The DCOM 1.3 upgrade is 1.2 Meg and available at http://www.microsoft.com/com/dcom/dcom95/dcom1_3.asp.

If you are running Win98, you will need the DCOM 1.3 update, available from: http://www.microsoft.com/com/dcom/dcom98/dcom1_3.asp. If you don't have this update, mh will run, but you may occasionally see windows (like control pannel or install shield) not start right away, especially if you run without the Tk interface (mh -tk 0).

You can enable the speech functions either by installing the Speech SDK, or by installing the speech engines separately.

Installing the SKD

The current Microsoft Speech Developer Kit (SDK) is Version 4 and weighs in at about about 39 MB! To download, go to http://www.microsoft.com/iit/download/default.htm and pick "Speech SDK 4.0 Suite". Make sure you pick the SUITE version. Since the file is large, you may want to use a program like FileHound or GetRight that can resume interrupted downloads.

After downloading, simply run the file to install. The 4.0 SDK requires about 70 MB of disk space to install, but after installation is complete, you can delete the "Microsoft Speech SDK" directory if you want to save disk space. The files to enable VR and TTS engines are Installed elsewhere.

Installing the speech engines separately

With a little more work, you can save download time by installing just the engines, the speech API, and the MSVoice application. The TTS and VR engines from http://www.microsoft.com/IIT/download/speechengines.htm (between 4 and 15 MB, depending on what and how many engines you pick). The Speech API and MSVoice application are available in speech_api.zip. To install the speech API, run the SPCHAPI.EXE file. To install MSVoice, simply unzip MSVOICE.ZIP to a directory of your choice.

After the install, run the "Microsoft Voice" application (available the bottom of your Programs menu if you installed the SDK). Once running, you can use the "Voice Command Options" menu to pick your default voice.


Detailed Install Instructions for UNIX users

Step 1, Download and Install Mister House

Download the rpm, tar, or zip file from http://misterhouse.net/download.

Install the file as detailed in the quick install instructions.

If you choose to use the zip file instead, make sure you use the -a to automatically get rid of those pesky /r characters that DOS like to add to newlines. Also, the unzip -U switch (contrary to what the help text says), will be needed on newer versions of unzip to preserve case on filenames. Then run the configure script (as root) to delete dos/windows only files, and 'chmod +x' on the files in the bin directory.

Step 2, Download and Compile Perl

Most, if not all, UNIX installations now have perl installed by default. If for some reason, yours does not or if it is an older version of perl, you can downloaded the latest from http://www.perl.com.

Run 'perl -v' to show your version ... anything above 5.005 should be fine. The current Redhat 5.2 version of Linux comes with 5.004. This works OK, but we have had some problems compiling the current Tk interface with 5.004, so you may want to upgraded to 5.005.

If you want to use the Tk interface (used to display logs and various pop-up messages), make sure that the perl Tk package is installed as well. If the Tk is not installed, this test will fail: perl -e "use Tk". If you need it, you can download perl Tk from http://www.perl.com/CPAN/. If you can also try the CPAN installer like this:

Step 3, Download and Install a Speech Engines

You can skip this step if you do not want to enable VR or TTS.

The IBM ViaVoice Voice Recognition engine is available at http://www-4.ibm.com/software/speech/dev/sdk_linux.html Currently the only download available is a large 80 MB tar file, the bulk of which is used for the VR dictation engine that we do not need. The installed/expanded files require about 120 MB of space. Hopefully a smaller package with just the Command and Control engine will become available at some point.

After downloading, install viavoice by running (as root) run tar -xf viavoice_sdk_rtk_2.tar and then follow the tar file readme.txt instructions. Note for our usage, you will not need any of the gui menus, so if rpm tells you that you have down level or missing libraries (e.g. libgdk), you can probably ignore that by adding the tar --nodeps option.

As the readme.txt instructions state, you should probably run the viavoice code as non-root. Here is one way to allow non-root access to the microphone:

The viavoice SDK FAQ can be found here at a href=http://www-4.ibm.com/software/speech/dev/faq_linux.html>http://www-4.ibm.com/software/speech/dev/faq_linux.html. It includes suggestion on what to do if you get rc=90 when you start viavoice_server (you must first enroll that id). The faq also covers how you can move training files and non-English from the (non-free) windows version.

After running the rpm commands, you can find other documentation in /usr/doc/Viavoice. bpreadme.txt shows how to use the /usr/lib/ViaVoice/bin/buildpol tool to improve accuracy on words using phonetic spelling. Section 2 of the skreadme.txt file details how to create a speech and entrollment ids. Here is an example of the commands that I used (as user id bruce, not root):

Lastly, run the /usr/bin/audiog program (requires motif or lesstif from lesstif.org to be installed) to set volume and recording levels, and viavoice is installed. You may want to also use a program like xmixer to select what the sound source is if, for example, you want to monitor the line input instead of or in addition to the mike input.

To enable viavoice from mh, set the viavoice parms in the mh.ini file, run mh/bin/viavoice_server_start, then start mh.

The IBM ViaVoice Outload TTS engine for Linux can also be downloaded from the above IBM sdk url. To use it with mh, you need to install Brad Reed's ViaVoiceTTS.pm module from http://www.reednet.org/ViaVoiceTTS , then set your mh.ini voice_text=vv_tts .

The Festival Speech engine is available from http://www.cstr.ed.ac.uk/projects/festival/download.html There are various voices and languages available. Compiling Fesitval can be a little tricky, so if you can, you will probably want to use the RPM files.

Once you have downloaded in and installed or compiled Festival, you can test it with the following commands:

You can also run the client, or a simple telnet, from a different box, but you first have to create a /usr/lib/festival/lib/siteinit.scm file with a list of boxes that you want to give authority to. (e.g. (set! server_access_list '("localhost" "house\\.isl\\.net")) ). See the festival documentation for more details.

David L. reports that there is a different engine for festival called MBROLA at http://tcts.fpms.ac.be/synthesis/mbrola.html that has a very nice US english male and female voice.

Once you have the festival server running, you can enable mh to use it with mh.ini parms voice_text and festival_port.


Testing Mister House

Edit x:\mh\bin\mh.ini and change the appropriate parms. It should run just fine with the default parms, although your sunrise/sunset times will be for Rochester, MN :)

If you decide to use mh, you will want to copy the parms you change to your own parm file and point to that with the mh_parm environmental variable (see the mh.ini header for details).

If you are on Windows and you are not using the compiled mh.exe, you may need to edit the last record of the mh.bat file to point to the correct directories where Perl and the mh are installed.

Next, cd to x:\mh\bin and then type: mh hello_print.pl. This will load the x:\mh\code\test\hello_print.pl file which is a simple event that prints some uptime info every 30 seconds. Since we did not include the tk*.pl members, the tk interface will not be displayed

From the console window, hit the ENTER key to bring up a control menu, then select the "Exit menu" item to exit. Or use Ctl-C.

Next, if you have installed the speech engines, try the hello_speak.pl event (e.g. mh hello_speak.pl). This will speak the time and date once a minute. It also creates one VR command. If you are a Windows user and have the VR engine installed, make sure the green MSVoice V icon is in the "Listening for Voice Commands" mode, try saying, "What time is it?" You can list all the available commands by right clicking on the V and picking "What can I say?"

To run all of the sample code in the test directory, do not specify any files (e.g. just type mh). Here are a few of the commands enabled by files in the test directory:

If you are logged onto the internet, you can try these commands:

You can control any of your serial, X10, and voice items with a frames capable web browser by pointing it to http://localhost:8080 . Note, the port number is controllable via mh.ini http_port parm. If you do not have any other web server running, you may want to change it from the default of 8080 to 80 so that you can use a simpler address of http://localhost .

You can also tailor the web interface to your liking by creating a new member in the \mh\web\mh directory and changing the html_file mh.ini parm. For example, you can preview an alternate interfaces with mh_brian/index_2.html, or mh_brian/index_3.html

Windows users can also setup a Windows Active Desktop entry so this interface is available all the time on your desktop!

In addition to the voice and web interfaces, you can type these commands on the Tk "Enter Command" field or from the DOS command line using the house command. For example, from a DOS command prompt, try typing: 'house Show the top 10 list' You can also speak or display any arbitrary phrase or file with the commands "Display file" or "Speak phrase" (e.g. 'house speak hi there'). These commands are simple bat files that create commands in the "xcmd_file", whose location is controlled with a mh.ini parm. You can have your own program put commands in this file as well. Lastly, you can type all these commands via a telnet localhost session or via a socket port, if you have the telnet.pl member enabled.

Here is a summary of the different ways you can control mh:

Use your favorite editor to review and try some changes to any or all test members. On the Mister House window, use the F1 key to re-load your changed code. If you introduced an error, it will sound a long beep, spit out some errata showing the error, and then it re-loads the old error-free code. There is lots of other code you can peruse in the mh\code\Bruce directory. This is all the code that runs our house!


Installing Hardware

Without any interface hardware, mh is pretty limited. It can do some simple time of day based events and voice based events, but that is about it. Currently, Mister House supports the X10 CM11 (aka ActiveHome) and CM17 (aka Firecracker) interfaces and all the Weeder kits (analog, digital, x10, phone, available from from http://www.weedtech.com ). Other supported hardware is listed in mh/docs/mh.html

Currently, the X10 guys have a $50 deal for an ActiveHome kit, which includes the CM11 interface. Check it out at http://www.x10.com. See FAQ question 6.5 for more info on X10.

If you want more than just X10, you may want to go with the Weeder X10 Kit, as all of the Weeder kits can share the same serial port. The X10 kit sells for $40, $25 for a WT523 module (if you don't already have that), $10 for a serial and a phone cable, and about an hour with a soldering iron.

After plugging in the Weeder X10 kit or a CM11 interface into a free serial port, update the Weeder_port or cm11_port parm in the mh.ini file to point to that port and try a simple example, like test_x10.pl in the test directory.

Support for any serial port device can be coded by using the generic Serial_Item objects. For example, a ham radio enthusiast has interfaced to his GPS (Global Positioning Satellite) to keep track of his car's location (see his tracking.pl code in the code/Public directory)

Support for any device that speaks with sockets over your network can be added using the Socket_Item objects.

Coding your own events

After you have played with the the default test code for a bit, you will want to start setting up your own code directory. Assuming you have mh installed in c:\misterhouse\mh, the steps might looks something like this (using the DOS commands, as I think unix guys can make the translation :):


 mkdir c:\misterhouse\code 

 copy  c:\misterhouse\mh\test\trivia.pl c:\misterhouse\code

 copy  c:\misterhouse\mh\bin\mh.ini c:\misterhouse\mh.ini

 edit  c:\misterhouse\mh.ini
   - Delete all the records from your mh.ini that you don't change 
     since the default mh\bin\mh.ini will also be read.
     Set code_dir=c:\misterhouse\code

 On windows, add this to your autoexec.bat:
   set mh_parms=c:\MisterHouse\mh.ini

 On unix, add this to /etc/profile or like place:
   export mh_parms=/prog/Misterhouse/mh.ini
       

Now when you run mh, it will read just the *.pl files in c:\misterhouse\code. After mh is up and running, copy in the other members from mh/code/test that you think might be useful and click the Reload button to read them in. Adding a member a few at a time might be useful if you are trying to find an error. By default, the code files in mh/code/common are always read (you can disable this or point to a different directory with the mh.ini code_dir_common parm).

The first thing you will want to do is create an items.pl file that declares all your X10 items (see mh/code/Bruce/items.mht for an example). Alternativly, you can declare each of your X10 items in the first code member you use it in. In either case you can use the "List X10 items" command created in mh_control.pl to review all your X10 items.

When you want to upgrade to a newer verion of mh, follow these steps:


 cd \misterhouse
 rename mh mh_old
 unzip \downloads\misterhouse_src_###.zip
 unzip \downloads\misterhouse_win_###.zip


#
# Document Change Log
#
# $Log: install.html,v $
# Revision 1.20  2000/10/22 16:48:29  winter
# - 2.32 release
#
# Revision 1.19  2000/10/09 02:31:13  winter
# - 2.30 update
#
# Revision 1.18  2000/10/01 23:36:21  winter
# - 2.29 release
#
# Revision 1.17  2000/09/09 21:20:03  winter
# - 2.28 release
#
# Revision 1.16  2000/08/19 01:22:35  winter
# - 2.27 release
#
# Revision 1.15  2000/05/27 16:40:09  winter
# - 2.20 release
#
# Revision 1.14  2000/05/06 16:41:43  winter
# - 2.15 release
#
# Revision 1.13  2000/04/09 18:03:19  winter
# - 2.13 release
#
# Revision 1.12  2000/03/10 04:09:01  winter
# - Add Ibutton support and more web changes
#
# Revision 1.11  2000/02/12 06:11:36  winter
# - commit lots of changes, in preperation for mh release 2.0
#
# Revision 1.10  2000/01/27 13:36:43  winter
# - update version number
#
# Revision 1.9  2000/01/13 13:35:30  winter
# - add some ViaVoice info
#
# Revision 1.8  1999/12/12 23:48:50  winter
# - added unzip -U and viavoice FAQ tips
#
# Revision 1.7  1999/11/21 02:52:26  winter
# - add viavoice instructions
#
# Revision 1.6  1999/09/27 03:08:20  winter
# - add note on dcom 1.3 win98 fix
#
# Revision 1.5  1999/09/12 16:10:05  winter
# - added FAQ pointer.  Change some web addresses.
#
# Revision 1.4  1999/08/01 01:15:49  winter
# - add 'check for long filename'.  add ppm install DB_file.  Change index_# pointers.
#
# Revision 1.3  1999/07/05 22:28:04  winter
# - Change DCOM and MS SDK links.  Other minor changes
#
# Revision 1.2  1999/06/20 22:28:44  winter
# - pint to updated ms speech urls.  Change to _src_ distributions.
#
# Revision 1.1  1999/05/30 21:11:30  winter
# - renamed from README.html
#
# Revision 1.18  1999/03/21 17:39:57  winter
# - email change.
#
# Revision 1.17  1999/02/08 00:35:05  winter
# - add system requirements section.  Add note on linux redhat perl version
#
# Revision 1.16  1999/02/04 14:22:24  winter
# - Take out 'mkdir mh' intstructions, since zip now includes mh
#
# Revision 1.15  1999/02/01 00:08:42  winter
# - add linux configure note.
#
# Revision 1.14  1999/01/30 19:59:23  winter
# - add linux unzip -a tip.
#
# Revision 1.13  1999/01/23 23:08:04  winter
# - add instructions for UNIX/linux users, including how to install the Festival TTS
#
# Revision 1.12  1999/01/13 14:15:55  winter
# - add telent info
#
# Revision 1.11  1999/01/08 14:25:05  winter
# - add pointer to mh.html.  A few more examples.  Change quick instructions
#   to default to running all the test code.
#
# Revision 1.10  1999/01/07 01:53:12  winter
# - add urls to severl example web interfaces
#
# Revision 1.9  1998/12/10 14:33:44  winter
# - add new web interface info.  List out different command control options.
#
# Revision 1.8  1998/12/08 01:58:18  winter
# - add more internet example code
#
# Revision 1.7  1998/11/30 04:41:15  winter
# - add tips on how to use the web and command interfaces.  Add pointers
#   to some of the example code.
#
# Revision 1.6  1998/11/16 01:18:17  winter
# - updated instructions on how to use the perl ppm commnad
# - add instructions on how to install the speech engines without install the SDK
#
# Revision 1.5  1998/09/12 22:26:40  winter
# - add section on how to use a web browser to control items.
#
# Revision 1.4  1998/09/02 13:29:08  winter
# - minor changes.  Move DCOM note to the perl install section.
#
# Revision 1.3  1998/08/30 15:01:35  winter
# - add pointer to DCOM 1.2 upgrade
#
# Revision 1.2  1998/08/30 00:05:05  winter
# - Change to html.  Add info on compile and cm11 options.
#