These TEMPer USB Thermometers are cheap and easy to use. Amazon sell them for $24.99 + 2.99 shipping, so they’re great value.
The software included on disk is awful. I mean really really bad. So don’t bother with it. You will however, need the driver on there. The driver software I got was almost entirely in Chinese but once you run it you can see the install button and that’s all you need to click to install the driver.
Once the drivers are successfully installed I suggest unplugging and replugging just to confirm that all is well with the device itself.
The latest UTAC TEMPer software is available on Sourceforge
The UTAC software development was abandoned some time before the end of 2009 but the software is still the best available and contains all the features you’ll probably ever need.
Set the UTAC software up to use the XML web server to present an XML page containing the temperatures for the TEMPer sensor(s)
For this setup I don’t enable the HTTP web server option as the XML will give me all I need. If you want to get to the UTAC graph you can keep the web server enabled.
Remember to allow incoming connections to the XML web server in UTAC through your firewall otherwise you wont get any data.
I also recommend testing the XML server manually by going to http://<your ip address>:5050 and seeing if you get any output.
Some browsers (IE) will not display raw XML so if you get a blank screen that’s actually a good sign. You can usually select to view the source of a web page and you will see the XML there – otherwise use Firefox!
Here’s what the XML should look like if you have two thermometers running:
<utacxmlwebserver> <actual> <temp0>22.94</temp0> <hum0>-99.00</hum0> <timestamp0>03/07/2010 11:46:05</timestamp0> <temp1>18.25</temp1> <hum1>-99.00</hum1> <timestamp1>03/07/2010 11:46:06</timestamp1> </actual> </utacxmlwebserver>
Next you’ll need to create a script file to get the XML page from the UTAC xml webserver and return the result to Cacti
I am running Cacti on Fedora 9 if you’re using a different distribution or version your setup may vary.
I’m not expert in perl so I just knocked up a quick shell script to do this. I’m working on building a super perl script that will do the work without having to save files to disk.
This file should be placed in /usr/share/cacti/scripts/ and I called it temper0.sh
#!/bin/sh wget -q -O /usr/share/cacti/scripts/temp/temper0.txt http://192.168.2.12:5050 grep temp0 /usr/share/cacti/scripts/temp/temper0.txt > /usr/share/cacti/scripts/temp/temp0.txt sed -i 's/<temp0>//g' /usr/share/cacti/scripts/temp/temp0.txt sed -i 's/</temp0>//g' /usr/share/cacti/scripts/temp/temp0.txt cat /usr/share/cacti/scripts/temp/temp0.txt
To get sed the correct permissions to write to the cacti folder I had to make a temp folder under the cacti scripts folder and use chown to give rights to the cacti user.
You’ll need to make sure the script has execute permissions using chmod +x temper0.sh
Once again it’s best to test your script and make sure it works properly and has the right privileges. A quick way to test is to change to the cacti user (using su cacti) and run the script. If you receive any error messages you’ll need to tweak the permissions on the folder.
Kevin der Kinderen has created a nice guide for going from script to graph in Cacti. I followed his guide substituting my script for his random number generator script.
I have set up two thermometers as part of another project which are working well as you can see from the graphs below
Because of the cheap price of the units and the fact that the awesome UTAC software will read multiple devices I’m planning on ordering more for my servers too.
If you’re considering getting a few of these TEMPer USB Thermometers please note that they can be unreliable on long run USB cables so you’ll probably need active USB extension cables or powered hubs every few meters.
2015 Update
We have now ported all our thermometer monitoring to Raspberry Pi’s using the i2c interface. We’ll be preparing an article on this soon.