hey guys how can i run owfs and owhttp at the same time.
owserver does not mount the diredctorys like owfs
owhttp and owserver work good but i cannot access the temps from bash
scripts
with owfs it works fine. will post code below that i am using,
Also when i do a compare is it normal for the < > to work backwards
from normal math functions? you hopefully will see what i have done in
the code
Code:
#!/bin/bash
chippath="/home/house/public_html/chips";
echo " " > housetemp.txt;
X=$(ls house/*/temperature);
# Trigger conversion
echo "1" > $chippath/simultaneous/temperature
for f in $X; do d=$(dirname $f);
temphigh=$(cat $d/temphigh | sed 's/ //g');
templow=$(cat $d/templow | sed 's/ //g');
actualtempvar=$(cat $d/temperature | sed 's/ //g');
echo "ActualTemp:$actualtempvar";
echo "Temp High:$temphigh";
echo "Temp Low:$templow";
if awk "BEGIN{ exit $actualtempvar > $templow }" ; then
error="too low" ;
elif awk "BEGIN{ exit $actualtempvar < $temphigh }" ; then
error="To High!" ;
else
error="good";
fi
echo "${d##*/}: $actualtempvar $error";
echo "_____________________";
# echo "$d:High:$temphigh:Actual:$actualtemp:Low:$templow" >>
highlow.txt;
done
Result of code:
sensors:/home# bash compare
ActualTemp:11.3125
Temp High:22
Temp Low:6
air_intake: 11.3125 good
_____________________
ActualTemp:24.0625
Temp High:26
Temp Low:18
anthony_bath: 24.0625 good
_____________________
ActualTemp:24.4375
Temp High:27
Temp Low:18
anthony: 24.4375 good
_____________________
ActualTemp:4.625
Temp High:75
Temp Low:-30
attic: 4.625 good
_____________________
ActualTemp:22.6875
Temp High:28
Temp Low:23
basement: 22.6875 too low
_____________________
ActualTemp:25
Temp High:26
Temp Low:18
bathrooms: 25 good
_____________________
ActualTemp:64.125
Temp High:84
Temp Low:48
boiler_out: 64.125 good
_____________________
ActualTemp:56.6875
Temp High:83
Temp Low:48
boiler_return: 56.6875 good
_____________________
ActualTemp:24.75
Temp High:28
Temp Low:17
boiler_room: 24.75 good
_____________________
ActualTemp:15.6875
Temp High:26
Temp Low:2
garage: 15.6875 good
_____________________
ActualTemp:58.25
Temp High:65
Temp Low:25
hot_water_tank: 58.25 good
_____________________
ActualTemp:23.375
Temp High:25
Temp Low:20
jocelyn: 23.375 good
_____________________
ActualTemp:22.4375
Temp High:26
Temp Low:18
kitchen: 22.4375 good
_____________________
ActualTemp:21.9375
Temp High:24
Temp Low:17
mkroom: 21.9375 good
_____________________
ActualTemp:21.875
Temp High:28
Temp Low:16
mudroom: 21.875 good
_____________________
ActualTemp:23.6875
Temp High:28
Temp Low:17
office: 23.6875 good
_____________________
ActualTemp:5.875
Temp High:33
Temp Low:-40
outside: 5.875 good
_____________________
ActualTemp:11.5625
Temp High:24
Temp Low:5
town_water_in: 11.5625 good
_____________________
sensors:/home#
thanks... also any suggestions anyone has to make home monitoring
app better is more than welcome..
Mike
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers