Monday, July 14, 2008

1Wire Deployment

The last few days, I started deploying 1Wire temperature sensors around the house. I've had the serial port interface and a bunch of DS18S20 sensors lying around for a while but I never got around to installing them. Our current system uses LM34 sensors hooked to the analog inputs of the JDS TimeCommander+, but they only have 2 degree accuracy and I've lived with that for 10+ years. Since I've been on my automation surge of late, I figured it was time to install the 1Wire stuff.

I tried putting the serial interface on an EdgePort at the end of the extended USB run in the garage, but for whatever reasons, the PC was unable to communicate consistently with it. It ended up back in the office, near the HA server. I decided I was going to gradually phase them in, which meant leaving the LM34s wired and running, while I tested out 1Wire. This made me clear out more wires in the wiring closet, at least temporarily, until I can shut down the LM34s. While I was cleaning that up, I decided to map out every wire in each of the 15 Cat-5 cables connected to the patch panel. (When we bought the house in 1999, 15 runs of Cat-5 seemed plenty. Now, I know better... *sigh*). I was able to free up some extra wires everywhere I needed them.

After the cleaning and mapping was done, I had time to solder and wire up 4 sensors - the living room, the master bedroom, the office and our daughter's room. There's still our son's room, the family room, the garage and outside left to do. If there's extra sensors, and I'm feeling adventurous drilling holes and running wire, I may try putting one in the attic.

Installing the 1Wire software wasn't as easy as the wiring. The 1Wire API, OWAPI, is some Java stuff and it relied on the Microsoft JVM, which they are no longer allowed to distribute. Anyway, after digging around the 'Net and iterating on the install process, I was able to get OWAPI operational. I had planned to integrate this all into starCOMUltra, but there's so much lag polling the sensors, I'm probably going to write a separate app to poll the sensors. I'm leaning toward making it directly interface it to sCU instead of using xPL as an intermediate step.

No comments:

Post a Comment