Cheap USB temperature logging

At they sell a cheap USB thermometer dongle. Thanks to Revalak there is a driver available for linux. This makes it very easy to setup temperature monitoring using munin.

Get the device working

Download the temper source code here: temper-1.0.tar.gz. Compile it using make, plug in the devices and see somthing like:

Be sure to have sufficient rights or use sudo to run the program. You now have a working thermometer. The output of temper however is not sitable for munin read out directly. I have made some changes to the source to only have put a number on screen. Download the modfied source here. Compile a gain and run. Now you should only see the temperature:

Setup munin

If you do not have munin running yet setup it up using a guide or howto found on the internet.

Then to enable the temperature logging simply add a script named temp in /etc/munin/plugins/ with the following in it:

Be sure to replace /path/to/temper/ with the path temper is in.

Then in /etc/munin/plugin-conf.d/munin-node add:

This will make munin to run temper as root and thus having sufficient permissions to the USB device.

Now restart munin and wait for the data to be gathered, see picture at top o the post.

Leave a Reply

Your email address will not be published. Required fields are marked *