Working External Linux Thermometer (TEMPer)
2008-10-08 21:01 - Tech
I've got a hefty deal of DIY spirit, and frugality, in my blood. In my current apartment, both the A/C in the summer, and (quite unfortunately) the heat in the winter both go onto my electric bill, both from the same unit built into the apartment. I've had various things controlled by X-10 since my dorm room in college. It's super convenient to, for example, turn the lights off after getting into bed, and never worry about it, or turn on the lights without getting out of my chair.
Turns out my HVAC unit runs off of a dedicated 220V circuit. By its nature, regular X-10 units don't work. I ended up setting up a relay in-line with its power safely, and now I have remote control to turn it on and off. I even did this once across the internet, while sitting in a restaurant — I've got the firecracker X-10 unit hooked to the linux server that runs in my apartment anyway.
This gave me the ability to schedule turning the heating or cooling on and off. I used this to keep comfortable when I was home, but not waste energy and money while I'm out at work, or asleep. What I really wanted, however, was to make a thermostat. Maintaining a particular temperature, not just "on" or "off", on a schedule. Unfortunately, my server had no idea what the temperature was, so it couldn't do this.
I found a cheap USB "TEMPer" device and tried it out. It certainly works, but only on Windows! I found plenty of links, and even a number of other people who wanted to use the device in linux, but nobody that had done so successfully. Reading and working at it for quite a while got me the knowledge that inside this device was a WinChipHead CH341 usb-to-serial adapter, and a simple temperature device hooked to that virtual serial port. Linux even had a driver for the CH341! But this crappy device made its own fake protocol with the CTS/RTS and other control lines, which this driver did not support, just plain data.
Looking again recently, I found that someone had made it work! The program provided there, as source, compiled fine but didn't run: still no control lines. I managed to google up the driver patch. With just a little effort, I applied that patch to my existing kernel (2.6.25), tried again, and the program runs!
Now, I've also had for a while a plain indoor/outdoor thermometer which helps inform, for example, shorts vs. pants, jacket or no, and so forth. Right now, it says that it's 71.6°, while my now-working USB TEMPer says it's 66.65°. Not exactly close. But if I hold the TEMPer between my palms, the temperature pretty quickly rises to just over 81° — probably quite close to the surface temperature of my clasped hands. It's hard to say which is right, or if the truth is in between, but this will probably be close enough to make a thermostat out of!
2008-12-01 18:29 - Jmp478
I just got my TEMPer USB Thermometer in the mail today, hoping that it would work with Mac. Unfortunately, It can't seem to mount it as a serial port when I plug it in.
This shows my built in modem and USB - serial adapter for an LED sign I have plugged in, but I doesn't show the TEMPer device.Is there a driver that needs to be downloaded for this to work and where can I find it?