|
|
| Programs for home automation: relays, heat, tkheat, tstatd | You: 38.107.179.217 | Wednesday Feb 8, 2012 5:23AM PST |
|---|
BackgroundAbout a dozen years ago, I moved from the mild (almost nonexistant) climate of the San Francisco Bay Area to Ithaca, New York. I have never adjusted to the winters here. I start getting cold around November, and don't warm up fully until the following April or May. This is in part due to the fact that the rent includes the cost of heating so I am obliged to keep it low for the sake of my landlord. ...and of course, myself, because if it gets more expensive to heat this place, he'll have to raise the rent, won't he? This would not be so bad if the furnace did not take an hour or two to raise the temperature from 50 to 70. And so, for many years, I set the thermostat down to 50 when I leave for work, and before I retire in the evening. Then, I wake in the morning, or get home from work, and proceed to freeze for at least the next hour. I finally got up enough gumption to order the parts, and write the software to completely control the furnace from my computer. Since the home network's on a fast internet connection, and my cell phone has web and ssh clients, that means from almost literally anywhere in the world. Now, I can call the furnace before I leave work, and tell it to start warming the place up. I also wrote a complete thermostat program that allows one to specify schedules, so that isn't even necessary. I just create schedules that start or stop the furnace early enough that the house is as warm or as cool as it's supposed to be for that time.
HardwarecomputerThe system is based on any old PC with a parallel port. None of them are resource intensive, so they should run on any i386 or above. The tstatd thermostat daemon does a lot of networking, too, but only needs to talk to the localhost, so doesn't require any extra network hardware. Most of the programs run from the command line, so no fancy video is required. Even the tkheat program simply creates a button, so should run on any system with a display that supports tcl/tk. temperature inputI have played with electronics since I was a kid (WN6RJN at age twelve), but don't have the time, patience, or space to be designing and building circuits these days. I just happened to need a new UPS for my network, so paid a few extra bucks and got the accessory with ambient temperature and humidity sensors. Ah simplicity; remove two screws, plug in the module, replace two screws, done. control outputAs mentioned above, I didn't want to build another relay interface, so did a lot of hunting. I found a terrific little relay module at Carl's Electronics. It's simple, inexpensive, and the assembled version is nicely built. I was impressed, I ordered on the web site on the day after Christmas, and it arrived via UPS two days later. I also ordered the killer Universal Wall Adapter Power Supply ($5 off when I ordered the relay box). Plenty of versatility for not much money. (sheesh, am I starting to sound like a commercial?) A quick stop at the local hardware store for some 18 AWG thermostatat wire, and I was ready. The only other thing I needed was a straight-through DB25M->DB25F printer cable. connectionsPretty straightforward; wall brick plugged into a power strip and the relay module, parallel cable from computer to relay module, and thermostat wire in series with the thermostat wires. I connected the thermostat wires to common and normally-closed contacts on the relay so if the relay (computer, program, etc.) failed, it would act as though it wasn't even in the circuit. I then cranked the thermostat up to 85, and was done with the physical construction. ProgramsAll of the software has been built and tested on Intel '86-based computers running OpenBSD and GNU/Linux. I have no experience with other architectures with an I/O interface similar to the PC's parallel (printer) port. Before you ask, although they might run under Windows, I have no interest in porting them or supporting that platform.
updated: Thu Jul 29 21:43:16 EDT 2004
|
||||||||||
...dave
|
|
Top of Page | FEEDBACK Comments, Corrections & Questions welcome |
|