Temperature monitoring with TEMPer USB thermometer

I like monitoring/graphing data, so I picked up this $10 TEMPer v1 USB thermometer from China for a DIY weather station. It is currently measuring the temperature outside my window.

temper v1

The device is detected out of the box in Ubuntu Linux:

[89921.774619] input: RDing TEMPer1V1.4 as /devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1.1/1-1.1:1.0/input/input18
[89921.775505] hid-generic 0003:0C45:7401.0009: input,hidraw0: USB HID v1.10 Keyboard [RDing TEMPer1V1.4] on usb-0000:00:12.2-1.1/input0
[89921.784326] hid-generic 0003:0C45:7401.000A: hiddev0,hidraw1: USB HID v1.10 Device [RDing TEMPer1V1.4] on usb-0000:00:12.2-1.1/input1

It still needs software to actually read data from the device. A suitable driver can be found here: https://github.com/petervojtek/usb-thermometer

git clone https://github.com/petervojtek/usb-thermometer.git
cd usb-thermometer/
make

Run as ./pcsensor

I needed something that would output in Collectd format, so I made some modifications, adding calibration and Kelvin output just for fun:
https://github.com/somesortoferror/usb-thermometer

New options are:
-k output only in Kelvin
-o offset (in Celsius) added to all temperature readings
-g[n] output for data collection/graphing tools (0=mrtg, 1=collectd)

offset is a floating point number added to all readings for calibration, it can be negative.

In collectd.conf, I run like this:

<Plugin exec>
Exec incognito "/usr/bin/pcsensor" "-g1" "-l10" "-o0.5"
</Plugin>

temper v1 sensor
Probe is stated by vendor to be waterproof. I added some heat shrink just to make sure.

As for accuracy, it seems acceptable. Comparing to UK Met Office readings it is usually +/- 1 C, which is good enough for me.

collected temperature pcsensor

3 Comments

  1. Hey dude. Im trying to get this working and im having alot of trouble. Do you still use this setup? It’s the collectd integration im having difficulty with. Any advice or updates?

    • cognito.me.uk

      Hi, I’m not currently using it but will try to help. Do you get console output from the device? If so, you can feed it to collectd through the exec plugin.

  2. Hey. Thanks for the reply. Ive tried over at the github repo and at collectd irc. It’s strange. pcsensor provides output from the terminal..but once it’s inside collectd it just doesnt work.

Leave a Reply

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