Friday, March 28, 2008

Get Internet Temperature Data for Automation

We had been using a Sine Systems CTI-2 temperature interface to get the outdoor temperature into our automation system. We recently developed a cable problem between the probe and the interface which prevented accurate readings. After some thought, I wrote this little program to simulate the response of the unit while getting temperature data from the National Weather Service. We have been using it for a couple of months now, and even though it only updates once an hour, it seems to provide a reasonable reading for the temperature. It could really be used with any program that is compatible with the CTI-2.

The software runs on a Windows PC with the Microsoft .NET 2.0 software installed. It will communicate on a pair of hardware serial ports if you have two to spare and can loop from one to the other. Or, what we did is use a virtual serial driver (com0com) to create a pair of serial ports in software, one for the program and the other for the automation system. This works great and you can install as many pairs as you might possibly need.

The download includes the source and a compiled executable that you can configure at runtime. It should hopefully be mostly self explanatory.

No comments: