Saturday, September 25, 2010

How to combine Munin and TEMPer (USB Temperature Sensor) ?

Long long ago I always wrote about technical stuff in my computer experience.
It's about time to write something on that topic again and the story is about Munin (example) and TEMPer (USB Temperature Sensor).

I decided that I want to keep an eye on the room's temperature and I searched for the cheapest possible external (USB) Termal Sensor. That's how I get hands on one of these TEMPer termal sensors.
It turns out that the sensor is great for the job except it's installation under linux (Ubuntu) in my case.

So here are the steps for installing it under Ubuntu and adding a patched "sensors_" plugin for Munin.

First you need to install ""

1) sudo apt-get install libusb-dev
2) sudo cpan -fi ExtUtils::MakeMaker
3) sudo cpan -fi Inline::MakeMaker
4) sudo cpan -fi Device::USB
5) sudo cpan -fi Device::USB::PCSensor::HidTEMPer
6) wget -O
(alternative: wget -O

7) chmod a+x
8) run: sudo ./
(you should see temperature readings now)

9) sudo cp ./ /usr/bin/
(this is needed for the Munin plugin)

10) sudo wget -O /etc/udev/rules.d/99-tempsensor.rules

or create file: /etc/udev/rules.d/99-tempsensor.rules
with this line inside:
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="1130", ATTRS{idProduct}=="660c", MODE="666"

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

Now you should have fully running "" script which will give you readings from the USB Temper device.

Next step is to backup and replace Munin's "sensors_" plugin in /usr/share/munin/plugins

1) sudo mv /usr/share/munin/plugins/sensors_ /usr/share/munin/plugins/sensors_old
2) sudo wget -O /usr/share/munin/plugins/sensors_
3) service munin-node stop
4) service munin-node start

Now wait 5-10min and you should have reading in your Munin graphics.



  1. Anonymous12:40 AM

    Thanks for this post, exactly what I was looking for. Ben

  2. Thanks a lot - works perfectly. Ambiant temperature is a significant factor regarding in-case temperatures.

  3. Great! I am glad my post was helpful to you.

    You can check my next one on this topic:

  4. any idea why i don't get any images after do all your steps ? pcsensor working fine.

  5. Thank for this, it was really helpful.

    Unfortunately I got stuck at '4) sudo cpan -fi Device::USB' which now gives an error '4) sudo cpan -fi Device::USB'. A bit of digging around lead me to which makes it sound like Device::USB is not compatible with the more recent versions of libusb. Hopefully someone can patch that up in the next couple of weeks, my Perl is not great so it would be an uphill struggle for me to have a go.