Table of Contents

Temperature Monitoring using an USB Sensor

Productname Hid TEMPerNTC
Link Producer PCSensor
Amazon Link hear (german)

Detection by your System

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

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
make
./pcsensor
#2011/07/17 13:26:42 Temperature 72.61F 22.56C
cp pcsensor /usr/local/bin/
pcsensor
2011/07/17 13:34:42 Temperature 72.61F 22.56C

Munin Plugin

hid-temper-ntc
#!/bin/sh
#
# 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
fi
WERT1=`/usr/local/bin/pcsensor | awk '{print $NF}' | cut -d "C" -f1`
echo -ne "temp1.value $WERT1"
/etc/init.d/munin-node restart
telnet 127.0.0.1 4949
list
... hid-temper-ntc ...