Trying to use a TEMPer USB Thermometer with Ubuntu
I have a $12 USB stick that records temperatures (on the device itself).
For details, see http://www.pcsensor.com/usb-thermometers/gold-temper.html
I downloaded its software, and it works fine in Windows - currently Win-10 Insider Preview 17945 or whatever the latest "FAST" Win-10 is... (Now, I'm currently in Linux)
When I boot into Ubuntu 17.10, and compile the supplied software (makefile, C-program etc) I get
$ temper232
/dev/ttyUSB0: No such file or directory
An lsusb
shows
Bus 002 Device 004: ID 0c45:7401 Microdia TEMPer Temperature Sensor
The C program has a line:
#define MODEMDEVICE "/dev/ttyUSB0"
$ dmesg | grep -i temper shows
[ 2.490091] usb 2-5.4: Product: TEMPerV1.4
[ 2.493187] input: RDing TEMPerV1.4 as /devices/pci0000:00/0000:00:13.2/usb2/2-5/2-5.4/2-5.4:1.0/0003:0C45:7401.0003/input/input5
[ 2.553603] hid-generic 0003:0C45:7401.0003: input,hidraw2: USB HID v1.10 Keyboard [RDing TEMPerV1.4] on usb-0000:00:13.2-5.4/input0
[ 2.555527] hid-generic 0003:0C45:7401.0004: hiddev1,hidraw3: USB HID v1.10 Device [RDing TEMPerV1.4] on usb-0000:00:13.2-5.4/input1
So where can I go from here? It seems to be some USB / Serial port thing. I haven't used serial ports since floppy disks on Win 3.1!
There is a lot of info on the internet on this device, but most of it involves Python, Github, Raspberry-PI LAMPs (which I also have), PERL (gads!), and something called a "mock", which I never heard of before! Must read-up on it!
I just want the basic device to respond with a temperature, at least in a terminal!
More info can be supplied! Just ask!
Solution 1:
This worked for me on CentOS but it should be the same on Ubuntu.
First install with pip install temperusb
(if this fails try pip2 install temperusb
to explicitly request the usage of python2 pip)
Then you just run temper-poll
and it will prints the current reading.