level="$(echo "$line" | cut -f 2)"
echo -ne "$time\t$date\t$(date '+%F%t%T')\t"
test "$level" -gt "$tresh" && {
- echo -n "Nothing detected...";
+ echo -n "0 Nothing detected...";
$screen && xset dpms force off || true;
} || {
- echo -n "Motion detected!!!!";
+ echo -n "1 Motion detected!!!!";
$screen && xset dpms force on;
}
test "$lastdate" != 0 && {
echo -ne "\t$level After $after secs";
}
echo;
+ ./sleepplot.sh "$out" &>/dev/null;
lastdate="$date";
done | tee "$out"
kill $!