# Temperature sensor for Linux

I'm looking for a temperature sensor, that can be connected to a computer over an interface that is ubiquitous, like USB. I'd like to read the temperature data over the command line.

Any suggestions what I could use?

All I plan to do, is measure the ambient temperature in the vicinity of the computer, for instance 2m above it.

I can access internal sensors with sensors, of the lm_sensors package. If possible, I'd like a similar interface.

-
You probably wont find a "sensors" like command for what you are looking for, you may be able to write a quick script that will poll your USB/I2C adapter or serial port and print it to the CLI –  jsolarski Mar 22 '11 at 11:44

One option would be an i2c temperature sensor along with a USB to i2c adapter. Plenty of different devices are listed as supported.

http://www.harbaum.org/till/i2c_tiny_usb/index.shtml

-
Exactly (and more) what I was looking for. I have experience programming micro controllers. This is the best solution for me. Thanks. –  polemon Mar 25 '11 at 10:24

Consider getting a TI Launchpad. TI is selling them cheap and one of the micros comes with a built-in temperature sensor. It comes with a board with USB and you can load a firmware that will send the temperature value to the computer.

-
The launchpad is targeted at $4.30, if you buy from sparkfun it is$5 and change. You can buy several for the cost of an arduino, or one for the fraction of the cost of an arduino. Dallas, now maxim, used to have a serial to one wire dongle for next to nothing that you could use with their one wire temp sensors, I imagine they have an alternate solution or here again just use an msp430. –  dwelch Mar 23 '11 at 1:16
I actually have two of those launchpads. I didn't do much with it, but for that thermometer thing, I'd rather use a tiny adapter directly connected to USB. –  polemon Apr 28 '11 at 17:38

This is the one we got for monitoring server room temperature with nagios and cacti: http://www.dealextreme.com/p/usb-digital-thermometer-dongle-software-displays-temperature-7003 (but from a different supplier).

There is an article in linux journal with some software to interface with it using perl to read the temperature, I'll see if I can dig it up.

-
Does it run under Linux? –  polemon Mar 22 '11 at 15:56
Nevermind, just found the post about the Linux driver. –  polemon Mar 22 '11 at 15:58
I was able to get it up and running on a debian server in about 5 minutes. –  pfyon Mar 22 '11 at 20:29
This is exactly what I used (sensor off ebay though) to monitor server room temp on a linux box. –  Linker3000 Mar 22 '11 at 23:04

Arduino is great for this, and it will give you a chance to learn the basics of microconrollers.

Looks like the launchpad is a pretty good alternative but the launchpad is not as friendly to beginners as the arduino.

-
Sounds like overkill though when you can get a USB thermal sensor unit on ebay dirt cheap (is there an echo in here!?) –  Linker3000 Mar 22 '11 at 23:02
I do program microcontrollers. I just need a solution, that would fit in with lm_sensors –  polemon Mar 22 '11 at 23:12