Tuesday, November 01, 2011

How to combine Munin and TEMPer (USB Temperature Sensor) ? (part 2 - November 2011)

Last year I posted an article about combining TEMPer and Munin.

A month ago I decided to add a second TEMPer to my configuration so I can keep track of the outside temperature during the winter since I have moved the server outside on the terrace in a special box.

The idea was that this server can keep a normal working temperature by itself in a small box isolated with wooden walls from the outside weather during the winter ( down to -15 C outside temp ) and with an open box's ceiling in the summer ( up to 35 C outside temp ).


(inside view of server's box)

(server's box closed and ready for a snowy winter)

Unfortunately the new TEMPer is using a new chipset which does not work with my Perl drivers and scripts.
After some research I found this C program pcsensor-0.0.1-patched.tar.gz which reads the temperature correctly from the new device.
Here are short steps and updated scripts so you can run the old TEMPer and the new one at the same time.

1) wget -O pcsensor-0.0.1.zip http://www.svilen.com/pcsensor-0.0.1-patched.tar.gz
2) tar zxvf pcsensor-0.0.1-patched.tar.gz
3) cd pcsensor-0.0.1-patched
4) sudo apt-get install libusb-dev
5) make clean
6) make
7) sudo mv pcsensor /usr/bin/
8) sudo mv 99-tempsensor.rules /etc/udev/rules.d/99-tempsensor_new.rules

or create file: /etc/udev/rules.d/99-tempsensor_new.rules
with this line inside:
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="0c45", ATTRS{idProduct}=="7401", MODE="666"

9) sudo /etc/init.d/udev restart

It's time to change Munin's script so that it can show readings from both TEMPers.

10) sudo wget -O /usr/share/munin/plugins/sensors_ http://www.svilen.com/sensors_new_.txt
11) service munin-node stop
12) service munin-node start

Within minutes you should see readings from both sensors in your Munin.



Enjoy!

No comments:

Post a Comment