Had the day off, and figured I would try moving my one wire network from Redhat/OneWireFileSystem/Thermd (you can see that world at
http://thermd.jonfinke.com - at least for a while longer) to Indigo.
I am using DS9490 USB to OneWire adapters. I was able to get digitemp compiled and working. I had some issues with the -i (init rcfile option) but by adding some printf statements - it started working. I am going to guess that something is using un-initialized memory - but that much is working now, so I am not going to look for a better fix.
In all my poking and changing - things are almost working - but... I don't think my version of digitemp is quite in sync with the plugin.
When I run digitemp -i -q, it will write the RC file, but no sensor list is written there. If I run it without the -q, I get the sensor list
- Code: Select all
./digitemp -c digitemp.conf -i
DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane
GNU Public License v2.0 - http://www.digitemp.com
Found DS2490 device #1 at 002/009-04fa-2490-ff-ff
Turning off all DS2409 Couplers
...
Searching the 1-Wire LAN
10819F6B01080027 : DS1820/DS18S20/DS1920 Temperature Sensor
26C058B6000000CD : DS2438 Temperature, A/D Battery Monitor
ROM #0 : 10819F6B01080027
ROM #1 : 26C058B6000000CD
write RC file: digitemp.conf
Wrote digitemp.conf
and the resulting digitemp.conf is
- Code: Select all
more digitemp.conf
TTY USB
READ_TIME 1000
LOG_TYPE 1
LOG_FORMAT "%b %d %H:%M:%S Sensor %s C: %.2C F: %.2F"
CNT_FORMAT "%b %d %H:%M:%S Sensor %s #%n %C"
HUM_FORMAT "%b %d %H:%M:%S Sensor %s C: %.2C F: %.2F H: %h%%"
SENSORS 2
ROM 0 0x10 0x81 0x9F 0x6B 0x01 0x08 0x00 0x27
ROM 1 0x26 0xC0 0x58 0xB6 0x00 0x00 0x00 0xCD
If I run with -q, nothing gets written to stdout - so I am not sure how the plugin expects to get the sensor list.
(BTW - where is current directory when the plugin runs?)
When I run digitemp with -a, I do get one temp reading
- Code: Select all
jons_imac:Server Plugin jon$ ./digitemp -c digitemp.conf -a
DigiTemp v3.5.0 Copyright 1996-2007 by Brian C. Lane
GNU Public License v2.0 - http://www.digitemp.com
Found DS2490 device #1 at 002/009-04fa-2490-ff-ff
Jun 22 00:17:41 Sensor 0 C: 31.75 F: 89.15
jons_imac:Server Plugin jon$ ./digitemp -c digitemp.conf -a -q
Jun 22 00:17:50 Sensor 0 C: 31.75 F: 89.15
jons_imac:Server Plugin jon$
Oh, I am getting the following in the event log:
Jun 22, 2012 12:18:20 AM
DigiTemp Error "Office 2" sensor was not updated at the poll interval.
DigiTemp Error "Office Temp" sensor was not updated at the poll interval.