Hi,
Rob Conway:
> if [ $TEMPtest -gt 50 ] || [ $TEMPtest -lt 5 ]; then
You forgot quoting. If there's an error which results in nothing beibng
reported, you need to explicitly catch that, otherwise the thing will
complain.
Correct:
> if [ -z "$TEMPtest" -o "$TEMPtest" -gt 50 -o "$TEMPtest" -lt 5 ]; then
NB: Instead of fixed limits, I would read twice and check whether the
values are close to each other.
> Does anybody have any other idea's on how to trap a read error within
> my bash script. The values are fed into a trend package and I average
> three readings every 5 minutes and store to an rrd database. When I
> get a read error it produces a spike in my trend.
>
You can configure RRD to ignore that.
As for the solenoids, I'd run their power supply through an inductor
coil that blocks the spikes, and/or put a capacitor in front of them to
buffer the initial power surge. That surge is a sharp decrease of
voltage, so a diode cannot help you.
--
Matthias Urlichs | {M:U} IT Design @ m-u-it.de | [EMAIL PROTECTED]
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
- -
Be both a speaker of words and a doer of deeds.
-- Homer
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers