Linux, Virtualization and whatever I find interesting ...

User Tools

Site Tools

Temperature Monitoring using an USB Sensor

  • and statistical detection with munin
Productname Hid TEMPerNTC
Link Producer PCSensor
Amazon Link hear (german)

Detection by your System

  • dmesg when you insert the sensor, you have to check VendorID and ProductID “0C45:7401” because the given C program is only for this.
Jul 17 13:26:37 thor kernel: [1454078.048583] input: RDing TEMPer2V1.0 as /devices/pci0000:00/0000:00:1d.0/usb2/2-2/2-2:1.0/input/input20
Jul 17 13:26:37 thor kernel: [1454078.048860] generic-usb 0003:0C45:7401.0007: input,hidraw0: USB HID v1.10 Keyboard [RDing TEMPer2V1.0] on usb-0000:00:1d.0-2/input0
Jul 17 13:26:37 thor kernel: [1454078.063670] generic-usb 0003:0C45:7401.0008: hiddev96,hidraw1: USB HID v1.10 Device [RDing TEMPer2V1.0] on usb-0000:00:1d.0-2/input1

Compiling Software to read temperature data

  • Perhaps you will need some additional packages when you are using Ubuntu. For Arch no additional packages were needed when I tested it.
apt-get install libusb-dev libhid-dev libusb-1.0-0
wget http://www.isp-sl.com/pcsensor-0.0.1.tgz
tar xvzf pcsensor-0.0.1.tgz
cd pcsensor-0.0.1 
rm pcsensor
#2011/07/17 13:26:42 Temperature 72.61F 22.56C
cp pcsensor /usr/local/bin/
2011/07/17 13:34:42 Temperature 72.61F 22.56C

Munin Plugin

  • Here a plugin for Munin for temperature monitoring
  • Information about Munin you will find here
# Plugin to monitor Temperature with HidTEMPerNTC from pcsensors
# 2011/07/17 EanderAlx
# ln -s /usr/share/munin/plugins/hid-temper-ntc /etc/munin/plugins/hid-temper-ntc
# Magic markers (optional - only used by munin-config and some installation scripts):
#%# family=contrib
if [ "$1" = "config" ]; then
        MODEL="Hid TEMPerNTC"
        LOCATION="Hid TEMPerNTC PC Sensor"
	NAME1="Hid TEMPerNTC USB Temp Sensor"
        echo "graph_title $LOCATION - Temperatur"
        echo "graph_args --base 1000"
        echo "graph_vlabel Celsius"
        echo "graph_category sensors"
        echo "graph_info This graph shows Temperatur data from $LOCATION"
        echo "temp1.label $NAME1"
        echo "temp1.type GAUGE"
        echo "temp1.info Celsius."
        echo "temp1.colour 00ff00"
        echo "temp1.max 50"
        echo "temp1.min -10"
        exit 0
WERT1=`/usr/local/bin/pcsensor | awk '{print $NF}' | cut -d "C" -f1`
echo -ne "temp1.value $WERT1"
/etc/init.d/munin-node restart
telnet 4949
... hid-temper-ntc ...


Error: Call to a member function getTplFile() on null

Error: Call to a member function getTplFile() on null

An unforeseen error has occured. This is most likely a bug somewhere. It might be a problem in the blogtng plugin.

More info has been written to the DokuWiki error log.