T_H_X10 on Linux Systems
This describes the 'T_H_X10' project, found at
http://www.keryan.us/mike/t_h_x10/t_h_x10.htm
This is Copyrighted by under the GPL: (c) 1999 Michael J. Keryan
For more information, see the file "COPYING" included
with this program.
You are granted permission to use and modify the code with the stipulation
that copyright notices remain and the author is to be notified of any improvements,
bug fixes, etc. Notify the author via e-mail at: mkeryan@pobox.com
Installation:
- Build and Test Transmitters
Install from 1 to 8 T_H_X10 units - see article for more
information
- Install a CM11A unit on Linux box
Plug the CM11A into an outlet, and its serial cable into first serial port
on Linux computer.
If the first port is unavailable, you'll have to issue a '-p' command to
run 'rawx10' -- see listing.
- Source Code - Compilation
Create a directory to hold the source files. Copy these files to it:
Issue the command 'make' to compile and link. After compilation, copy
these files to /usr/local/bin:
rawx10
codex10
t_h_x10
graph_th
- Scripts - Copy them
Copy these scripts to /usr/local/bin:
- Create a new Directory Tree
As root, create a new directory tree at the "/" level. That is:
cd /
mkdir house
cd house
mkdir t_h_x10
cd t_h_x10
mkdir config
mkdir data
mkdir logs
- Copy Config files
Copy these files to /usr/local/t_h_x10/config/
- Customize Config files
Edit the files in the /usr/local/t_h_x10/config/ directory:
- housecode (if you're using a code other than F)
- locations (relate the locations of sensors to rooms)
- residence (your name)
- Install Support Files
If you don't already have them installed, install gnuplot and ppmtogif.
If not installed in /usr/local/bin, then put links there for these
two programs, e.g.:
cd /usr/local/bin
ln -s /whatever/dir/theyarein/gnuplot gnuplot
- Have your Linux box autostart the sequence of programs
The recommended method is to update your 'rc.local'
file to execute the series of programs.
- Reserve tty3 for the data output screen
As root, edit file 'etc/inittab' to stop tty3 from being used for
logins. For example if your normal runlevel is 3, comment out the line for
tty3:
# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
# 3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6
- Create a cron sequence for cleanup, plot creation,
etc.
Edit the file 'crontab' if necessary and as root, install
it:
- Testing
- Reboot
You shold see a message on your first text screen (Ctrl-Alt-F1) about redirecting
output to tty3 - Change screens
Press <Ctrl-Alt-F3>. You should see another message, and temperature/humidity
data when received. - Debug
To debug problems, kill the 3 programs rawx10/codex10/t_h_x10. Then run only
two of them from the command line:
All X-10 codes received will be decoded and printed on the screen.
Web page contents created by m.j.keryan
Copyright ©1998-1999 M.J.Keryan
All rights reserved