Remote Thermostat Control, Part II
Having remote thermostat control has been such a success for us with our beach cottage, I decided it was time to try the same thing at home.
While we leave a PC running at the cottage, for our house server we use a Buffalo LinkStation (a NAS box) running FreeLink, in large part because the NAS consumes a lot less power. (The cottage will likely have to be upgraded fairly soon, assuming this works out.)
Unlike a full PC, the NAS doesn't have any serial or parallel ports, although it does have two USB ports. That's an important difference for this project, because, in the original cottage set-up, I use a serial port to read temperature information, and the parallel port to control the relay board.
USB Parallel Port Replacement
The USB Bit Whacker (UBW) kit is $20 from SparkFun, and was originally conceived as a USB replacement for parallel port devices. It's offered as a very general-purpose module, with I/O pins being terminated on PCB headers only, i.e., there's no parallel port connector or cable.
is roughly the same as the diagonal distance between one mounting hole and one port connector hole.)
In this configuration, the relay board has to be externally powered, as the UBW can't provide the 12v necessary to drive the relays. I found an old wall-wart marked for 12v DC output, and pressed it into service.
USB Serial Port Replacement
The temperature logger's ground is tied to the relay board's ground by connecting ground from one of the temperature logger's headers to the GND connector on the relay board.
I'm quite impressed with FreeLink, the hacked Debian distribution that runs on the LinkStation. Unfortunately, FreeLink isn't quite to the point of being as complete and automated as a standard Linux distribution.
In particular, FreeLink presently runs a kernel that doesn't include a lot of the standard kernel drivers. (I don't honestly understand why this should be. The nas-central.org site is the best source for information, but it all has the flavor of follow-on discussion after a meeting you didn't attend -- there's a lot of "here's the latest update," but not a clear statement of "why are we here." At least, not clear to me.)
The driver for the Prolific USB-to-serial device, the PL2303 driver, isn't available in the stock FreeLink kernel.
Recently there's been some activity making experimental kernels that include more drivers (as modules), and I hope soon to experiment with installing one of these. The problem is, we run a lot of services on this machine that we consider vital to daily life, so experiments that may make those services temporarily unavailable require a bit of planning...