Date: Mon, 18 May 92 09:09:06 EST From: Dwight D. McKay (The Moderator) Reply-To: Suns-at-Home@orchestra.ecn.purdue.edu Subject: Suns-at-Home Digest V5 #21 To: Suns-at-Home-List Suns-at-Home Digest Mon, 18 May 92 Volume 5 : Issue 21 Today's Topics: BSR X-10 stuff (4 messages) X11R5 binaries for Sun 3 [This is essentially an "everything you always wanted to know about X10"] [issue. I've included all of the X10 articles even though there is some] [duplication. --ddm] +--------------------------------------------------------------------+ | Submissions: suns-at-home \ @orchestra.ecn.purdue.edu | | Requests: suns-at-home-request > -- or -- | | Archives: suns-at-home-archives / ...rutgers!pur-ee!... | +--------------------------------------------------------------------+ ---------------------------------------------------------------------- Date: Mon, 11 May 92 10:39:04 PDT From: Michael S. Maiten Subject: BSR X-10 Interface [Suns-at-Home Digest V5 #20] To: Suns-at-Home@ecn.purdue.edu > Date: Mon, 04 May 92 20:20:15 -0400 > From: brad@Cayman.COM > Subject: Suns-at-Home Digest V5 #19 > To: Suns-at-Home@ecn.purdue.edu > > This may seem an odd question (unless you know me ;-) but does anyone know > about controlling those "BSR X10" boxes from a sun? I thought it would > be neat if my sun could turn the light on and off at seemingly random > times when I am away and perhaps run the a/c if it gets too hot. > > -brad > BSR makes a special "BSR X-10 Powerhouse Computer Interface" (Model CP290) which has an RS232 Interface. (It also has an 8 (not 16) button controller mounted on top for human use; However, the computer interface can control everything). It is usually bundled with PC or MAC software for driving the box. If you will be connecting it to a SUN, it should work (I haven't tried it yet). There is a "Programmning Guide" manual included with the box that specifies the message formats used between the box and the cpu. ------------------------------------------------------------------------------ Michael S. Maiten Internet: msm@energetic.com Energetic Systems UUCP: ensys!msm Telephone: +1 415 967-5538 (...!sun!bridge2!ensys!msm) ------------------------------ Date: Tue, 12 May 1992 19:33:23 -0500 From: mckay!dwight@ecn.purdue.edu Subject: BSR X-10 stuff To: Suns-at-Home@orchestra.ecn.purdue.edu I use a X-10 Home Control RS-232 Computer Interface on my home machine. This box talks at 600 baud and uses a very simple protocol. I got it directly from X-10 at: X-10 USA, Inc. Northval, NJ 07547 Ask for model CP 290 and the programmers docs. Another source for X-10 stuff is: Home Automation Laboratories 5500 Highlands Pkwt, Suite 450 Smyrna/Atlanta, GA 30082 1-800-HOMELAB FAX (404) 438-2835 I've never done any business with Home Lab, I usually buy my X-10 switches from the local Radio Shack. #include --ddm (@ home) ------------------------------ Date: Tue, 12 May 92 11:48:14 EDT From: cram@sunpix.East.Sun.COM (Marc Howard - Sun NC Development Center) Subject: Suns-at-Home Digest V5 #20 To: Suns-at-Home@ecn.purdue.edu > From: brad@Cayman.COM > Subject: Suns-at-Home Digest V5 #19 > To: Suns-at-Home@ecn.purdue.edu > > This may seem an odd question (unless you know me ;-) but does anyone know > about controlling those "BSR X10" boxes from a sun? I thought it would > be neat if my sun could turn the light on and off at seemingly random > times when I am away and perhaps run the a/c if it gets too hot. > Nothing odd at all about the request. What you want is called (I think) the X-10 Homeminder. It comes in MacIntosh and IBM-PC versions, you'll want the IBM one (serial interface). I think you'll need a gender bender as well. I know that Heath (-kit, RIP) and DAK sell them as well as some of the Home Automation places. I thought I saw one in a Radio Shack catalog once as well. Anyway, it costs about $59. It comes with a floppy which has a program that lets you run it from a PC. The unit controls 8 devices from the front panel keyboard but you can control all 256 devices via software. And instead of absolute on/off/dim times you can instruct it to turn on a lamp at 7:30 -0/+60 minutes and the unit will do it at a random time in that interval. It has a 9V battery for backup and it doesn't need to be hooked up up to a PC after its' programmed (it does need to be plugged into the wall however ;-). As for doing this on a Sun I have somewhere in my deep dark archives a C program which gives you access to all the functions. If you (or anyone else) is interested I'll try to dig it up. I haven't used it since I retired my Unix PC (w/7 serial ports) since I only have 2 serial ports on a SS2 (sigh). There's no reason it shouldn't run on an Unix as it's pretty vanilla. Marc W. Howard Sun Visualization Products Research Triangle Park, NC cram@sunpix.East.Sun.COM ------------------------------ Date: Sat, 16 May 92 22:23:06 PDT From: Vaughan Pratt Subject: X10 control To: suns-at-home@coraki.Stanford.EDU There is a line of X10 products, I think called PowerHouse, will look it up when I get home. (I'm typing this from my Sun in a Stanford hospital bed where I'm recovering from bypass surgery. The room has an ethernet in it, very nice.) The line includes a controller that you can attach to an RS-232 line. I bought it at Fry's three years ago for around $50, I think they still must sell it. It comes with a nice PC driver, which I chucked out and wrote my own crummy Unix driver, as follows. Typical usage is x10 on a1 a3 c2 c7 x10 off b2 Just now from my hospital bed I turned on a light on the deck at my home, bet that puzzles my wife. The code assumes the controller is attached to a serial line called /dev/x10 (just mv /dev/tty /dev/x10). I use it to control lights around and outside the house, turn on the laserprinter whenever there's a job queued, turn it back off after half an hour of inactivity (it lives inside a slideout cupboard and gets warm after a couple of hours), and turn on and off other Suns than the main one (ethernet 192.i.j.k gets code ck). Sorry there isn't more documentation. If you think you might find it useful I also have an interactive program, x10i, which lets you give the X10 commands interactively and see what the controller spits back. This is helpful in debugging the serial connection, and recently I also found it helpful for debugging the controller itself, which was acting very oddly, eventually fixed just by replacing the main capacitor in the power supply. Never thought I'd be repairing $50 controllers the old-fashioned way at my age (quintuple bypass) and income (Sun founder's stock, I still have uid 11 at Sun). Vaughan Pratt /* x10 driver * Synopsis: x10 {on|off|dim} a1 a2 ... */ #include #include #include struct termios tio; FILE *f; int fd, housecode, on; unsigned char chk, h2i[] = "gockbjfnhpdlaiem", i2h[] = "meckogainfdlphbj"; main(argc, argv) char **argv; { int i, j, n, pid; unsigned char c, buf[80]; if (argc < 3) { printf("Usage: %s on|off|dim modules ...\n", argv[0]); exit(1); } f = fopen("/dev/x10", "r+"); if (f == NULL) { printf("Can't open /dev/x10\n"); exit(1); } fd = fileno(f); tio.c_iflag = tio.c_oflag = tio.c_lflag = 0; tio.c_cflag = B600|CS8|CREAD; ioctl(fd, TCSETS, &tio); on = !strcmp(argv[1], "on")? 2: !strcmp(argv[1], "off")? 3: !strcmp(argv[1], "dim")? 5: 0; for (i = 2; i < argc; i++) { argv[i][0] |= 32, argv[i][1] |= 32; base(argv[i][0]-'a'); sleep(1); cmd(0, on, housecode, 0x8000>>(argv[i][1]-(argv[i][1]>'9'? 'W': '1'))); } } base(house) { int i; housecode = house; for (i = 0; i < 16; i++) out(255); out(0); out((h2i[house]-'a')<<4); } cmd(lev, fun, house, units) char lev, fun, house; unsigned short units; { int i; for (i = 0; i < 16; i++) out(255); out(1); chk = 0; out((lev << 4) + fun); out((h2i[house]-'a') << 4); out(units & 0xf); out(units >> 8); out(chk); } setclock(day, hr, min) int day, hr, min; { int i; for (i = 0; i < 16; i++) out(255); out(2); chk = 0; out(min); out(hr); out(1<= 0) && n) { if (n > sizeof(buf)) n = sizeof(buf); n = read(fd, buf, n); for (i = 0; i < n; i++) printf("%2x ", buf[i]); printf("\n"); } } ------------------------------ Date: Fri, 15 May 1992 09:27:23 -0400 (EDT) From: Mark Madsen Subject: X11R5 binaries for Sun 3 To: Suns-at-Home@orchestra.ecn.purdue.edu We've been running OpenWindows for a while, and want to get rid of it in favor of X11 (preferably R5, though 4 would do). Is there an ftp site anywhere which has the Sun 3 binaries available? We haven't got sufficient disk space to build X, and I can only locate Sparc binaries. Any help would be appreciated. Mark Madsen ------------------------------ End of Suns-at-Home Digest ******************************