[clug] Linux compatible external Thermometer
Peter Barker
pbarker at barker.dropbear.id.au
Tue Feb 23 13:45:25 MST 2010
On Tue, 23 Feb 2010, Kevin Pulo wrote:
>> Unfortunately, they never appear to have a serial number, so there's no
>> *absolutely* reliable way to ensure you don't get multiple devices out of
>> order on the one machine.
> Hmmm... What about if they went onto separate USB host controllers,
> so that you could have a script which pokes around in /sys to figure
> out which is connected where?
Yep, if y our system is static software and hardware-wise, that will be
OK. Problems happen if you:
- add a hub
- change kernels (rarely! - who remembers the Great Device Renaming a
few years ago?)
- need to do some work on the server, and just yank everything without
labelling them first
> I'm also interested in these things - what driver do you use, and how
> do you read the data out of them?
They actually come in a variety of flavours. The old ones produced a
/dev/ttyUSB device - mine doesn't.
The one I'm using at home I use a package called "temper-1.0" to read.
Simple C program which uses libusb to get the data. You should be able to
google for that package.
I modified the C program such that it simply spat out the answer. Wrote a
perl wrapper suitable for use by snmpd. Modified the snmpd config to use
that wrapper. Used "cacti" (a pre-existing asset in my setup) to graph
the data.
> Kev.
Yours,
--
Peter Barker | Programmer,Sysadmin,Geek.
pbarker at barker.dropbear.id.au | You need a bigger hammer.
:: It's a hack! Expect underscores! - Nigel Williams
More information about the linux
mailing list