THUM Shared Library, v1.0


--- What's Included:

libTHUM.so.1
This is the shared library

thumctl 
This is the sample executable utility application.  You can use it to take readings from the THUM device.  Source code is included for this application. 

thumchk.pl
This is a wrapper for thumctl that adds the ability to poll, send email, and check threshold values against a config file.  The portion of the code that actually sends email is currently being bypassed for testing purposes.  However, it will print a message saying that it sent email.  When it's polling values from the THUM, hit ctrl-C to break out of the program.

thumchk.conf 
This is a sample config file for thumchk.pl.  You will need to edit this file to set the address and  server settings for email alerts as well as the alarm thresholds for each reading.  

install 
This script will install the libTHUM.so.1 into /usr/local/lib and install the sample applications into /usr/local/bin, and thumchk.conf into /etc.

uninstall
This script will remove libTHUM.so.1, thumctl, and thumchk.pl.  It will not remove /etc/thumchk.conf.

src/ directory
This directory contains a Makefile and source code for thumctl.


--- System Requirements:
* A Linux distribution running kernel version 2.6 or greater
* udev support is preferred, but not necessary.  The install script will add appropriate entries to your udev configuration to allow the THUM device to be detected.  It will also manually create device nodes in /dev if udev is not available.

--- Supported Distributions:
The shared library should work on recent releases of the following distributions:
Fedora
SuSE
Mandriva
Debian (Ubuntu, etc)


--- Usage:

NOTE: thumctl and thumchk.pl, as well as the install and uninstall scripts must be run as root

Usage for thumctl is as follows:
thumctl <options> where <options> is one or more of the following:
        -H  print this message
        -V  print THUM library version
        -v  use verbose output
        -f  display temperatures in degrees F
        -c  display temperatures in degrees C
        -t  take a temperature reading
		-h  take a relative humudity reading
		-d  take a dew point reading
		-s  take a switch reading
        -2  take a switch reading from switch 2
        -3  take a switch reading from switch 3
		-x  take an external temperature reading
		-i  take an IR proximity reading
		-u  take an ultrasonic reading

Usage for thumchk.pl is as follows:
thumchk.pl <options> where <options> is one or more of the following:
        -v  use verbose output
        -f  display temperatures in degrees F
        -c  display temperatures in degrees C
        -t  take a temperature reading
		-h  take a relative humudity reading
		-d  take a dew point reading
		-s  take a switch reading
        -2  take a switch reading from switch 2
        -3  take a switch reading from switch 3
		-x  take an external temperature reading
		-i  take an IR proximity reading
		-p n specify the polling interval.  Take a reading every n seconds.
		-e email results using email settings from thumchk.conf
		-a email results only when alarm value specified in thumchk.conf is exceeded
