About a year ago I decided it would be a good idea to monitor the temperature in different rooms in the house and outside. The motivation was that, later, I might start controlling the heating by computer and the data would be useful.
When we moved in I had already devoted some time and energy to installing CAT5e cabling and RJ45 sockets in each room. With the WiFi there were plenty of free sockets and every socket goes to a central patch panel. I decided that a some of the sockets could be used for temperature sensors.
The sensors I chose are 1-Wire sensors. 1-Wire is a data bus developed and controlled by Dallas Semiconductor. There is one bus controller and the bus can have multiple devices. You can also have switches that can connect, under computer control, one of two downstream buses to the bus going back to the controller. Each device needs to be connected only to signal and ground. When activated the device uses an internal capacitor charged off the signal line as a power source. You can also supply a dedicated power line as well.
I purchased a USB bus controller, a 6 port 1-Wire switch and some DS18S20 temperature sensors. Using 4 conductor telephone wire crimped to RJ45 plugs and soldered to the sensors via a small piece of verostrip I assembled a sensor network. With a small ABS box and a heap of hot glue I also placed a sensor outside.
One tip when drilling a hole for the wire in a window frame is to make the outside hole lower than the one on the inside. This ensures the water doesn’t flow in during wet weather.
I attached the bus controller to my server and installed the owlfs software. Owlfs is an open source application for the USB bus controller that includes several interfaces including a web server and FUSE filesystem. I used the server interface that provides a network server with a custom protocol. There are command line tools to query the server. I used these commands from a munin script to graph the output.
Later I wrote a general purpose Java server that that averages the readings over time and presents the data through a text based network server. This Java server is extensible so that I can use it for energy monitoring and capture to a database. These developments are the topics for future posts.