BTW: Does owshell support the ping packets?
I have helped Christian Schumann with scripts to control his Solar-panel +
rainwater buffer with switches and water-pump.
There are several cronjobs which run every minute, and one of the scripts
frequently return "Data error" when reading a DS2890. Reading the sensor
second time works almost every time.
Christian Schumann created a quick overview of the system, and I added the
temperature's and sensors in the picture with imagemagick.
Take a look at: http://home.mag.cx/sommer/
My scripts looks like this when reading the data:
#!/bin/ash
readsensor () (
VAL=`owread -s 3002 $1/$2 2>&1`
ERR=$?
[ -z "$VAL" -o $ERR != 0 -o ! -z "`echo "$VAL" | grep -i error`" ] && {
date >>$DEBUGFILE
echo >>$DEBUGFILE "ERROR: owread $1 failed 1st time: $VAL"
VAL=`owread -s 3002 $1/$2 2>&1`
ERR=$?
[ -z "$VAL" -o $ERR != 0 -o ! -z "`echo "$VAL" | grep -i error`" ]
&& {
echo >>$DEBUGFILE "ERROR: owread $1 failed 2nd time: $VAL";
false; return;
}
}
# save last value to a file as well (mostly for web-server)
[ "$1" = "temperature" ] && echo "$VAL" > /tmp/last_val.$1.$2
echo "$VAL"
true;
)
export VAL=`readsensor 20.7DBB0A000000 volt2.C`
ERR=$?
[ $ERR != 0 ] && exit 1
/Christian
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul
Alfille
Sent: den 21 augusti 2007 16:10
To: [email protected]
Subject: Re: [Owfs-developers] Error trap works great on NSLU2 with owfs
So you're getting 2 errors a day reading every 2 minutes or so?
Very nice script for using the owshell programs with error checking! It
would be nice to post it in the examples section with some pictures and
graphs.
Paul Alfille
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers