EanderAlx.org

Linux, Virtualization and whatever I find interesting ...

User Tools


Site Tools


linux:hid_temper_pc_sensor

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
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

  • Here a plugin for Munin for temperature monitoring
  • Information about Munin you will find here
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 ...

Comments

Hi,

Thanks for this great post !

pcsensor works also on a Mandriva 2010.2 x64, so probably on most RedHat/Fedore like systems.

Thanks again, Pascal

1 |
Pascal
| 21.08.2011 11:30 | reply

Works fine on Fedora Core 16….

2 |
Simon Greenaway
| 29.11.2011 12:41 | reply

Is there a way to getthis working on a TEMPer2 probe with outside sensor?

Thanks

Ed

3 |
pedrosk
| 10.03.2012 08:53 | reply

Unfortunately, I have no device to test a TEMPer2.

On Problem I had and perhaps you have the same is the changed ventor ID. Perhaps you could use the same software after compiled it with an other ventor ID.

#orginal code pcsensor.c 
#define VENDOR_ID  0x0c45
#define PRODUCT_ID 0x7401
4 |
EanderAlx
| 19.04.2012 21:40 | reply

Hello, i try to modify the pcsensor.c for using TEMPer2 but no succes

my dmesg

[1647374.229322] usb 1-1.4: new low speed USB device number 13 using orion-ehci [1647374.349822] input: RDing TEMPer2V1.3 as /devices/platform/orion-ehci.0/usb1/1-1/1-1.4/1-1.4:1.0/input/input9 [1647374.350179] generic-usb 0003:0C45:7401.0013: input: USB HID v1.10 Keyboard [RDing TEMPer2V1.3] on usb-orion-ehci.0-1.4/input0 [1647374.353892] generic-usb 0003:0C45:7401.0014: hiddev0: USB HID v1.10 Device [RDing TEMPer2V1.3] on usb-orion-ehci.0-1.4/input1 [1647747.063073] usb 1-1.4: new low speed USB device number 14 using orion-ehci [1647747.184213] input: RDing TEMPer2V1.3 as /devices/platform/orion-ehci.0/usb1/1-1/1-1.4/1-1.4:1.0/input/input10 [1647747.184753] generic-usb 0003:0C45:7401.0015: input: USB HID v1.10 Keyboard [RDing TEMPer2V1.3] on usb-orion-ehci.0-1.4/input0 [1647747.189790] generic-usb 0003:0C45:7401.0016: hiddev0: USB HID v1.10 Device [RDing TEMPer2V1.3] on usb-orion-ehci.0-1.4/input1

i think we need to use the second input

Have you an idea ?

Sorry for my english i'm french

5 |
max
| 03.05.2012 17:27 | reply

Thank you very much for posting your work, it works beautifully for the RDing TEMPer1V1.1 (non-removable tethered sensor) I got off eBay.

6 |
Brains
| 23.05.2012 02:43 | reply

Just got my TEMPur today. Grabbed pcsensor and it worked like a charm. Always great to have some nice tools out there without having to re-invent the wheel.

Headless Lubuntu in my garage P4/233 1.2G of mem. Ft Worth Texas pcsensor -l600 2012/06/24 01:43:23 Temperature 90.05F 32.25C

Thanks again!

7 |
Julez
| 24.06.2012 08:46 | reply
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
linux/hid_temper_pc_sensor.txt · Last modified: 23.03.2013 18:45 by eanderalx