fix csvs, check ebusctl result when failed, less load when checking scan result, exit error when failed
This commit is contained in:
+24
-5
@@ -207,10 +207,12 @@ w,mc.5,HeatingCurve,,,53,b509,0e3500,curve,m,UIN,100
|
|||||||
w,mc.5#installer,installparam,,,53,b509,0e3f00,param,m,UCH
|
w,mc.5#installer,installparam,,,53,b509,0e3f00,param,m,UCH
|
||||||
EOF
|
EOF
|
||||||
mkdir -p "$PWD/contrib/etc/ebusd/153"
|
mkdir -p "$PWD/contrib/etc/ebusd/153"
|
||||||
cat >"$PWD/contrib/etc/ebusd/153/_templates" <<EOF
|
cat >"$PWD/contrib/etc/ebusd/153/_templates.csv" <<EOF
|
||||||
|
#
|
||||||
temps,SCH,,°C,Temperatur
|
temps,SCH,,°C,Temperatur
|
||||||
EOF
|
EOF
|
||||||
cat >"$PWD/contrib/etc/ebusd/153/36.bbb.csv" <<EOF
|
cat >"$PWD/contrib/etc/ebusd/153/53.bbbbb.csv" <<EOF
|
||||||
|
#
|
||||||
*r,,,,,,"9900",,,,,,,
|
*r,,,,,,"9900",,,,,,,
|
||||||
r,,SoftwareVersion,,,,,"0000",,,HEX:4,,,
|
r,,SoftwareVersion,,,,,"0000",,,HEX:4,,,
|
||||||
EOF
|
EOF
|
||||||
@@ -245,7 +247,6 @@ h
|
|||||||
h r
|
h r
|
||||||
h w
|
h w
|
||||||
h a
|
h a
|
||||||
h a
|
|
||||||
h hex
|
h hex
|
||||||
h f
|
h f
|
||||||
h l
|
h l
|
||||||
@@ -326,7 +327,6 @@ decode -V -N UCH 102030
|
|||||||
encode UCH 10;1
|
encode UCH 10;1
|
||||||
raw bytes
|
raw bytes
|
||||||
raw
|
raw
|
||||||
log all debug
|
|
||||||
nocommand
|
nocommand
|
||||||
EOF
|
EOF
|
||||||
status=1
|
status=1
|
||||||
@@ -355,14 +355,32 @@ for line in "${lines[@]}"; do
|
|||||||
if [ -n "$line" ]; then
|
if [ -n "$line" ]; then
|
||||||
echo `date` "send: $line"
|
echo `date` "send: $line"
|
||||||
./src/tools/ebusctl -p 8877 $line
|
./src/tools/ebusctl -p 8877 $line
|
||||||
|
if [ $? -eq 1 ]; then
|
||||||
|
echo "not connectable, exit"
|
||||||
|
status=1
|
||||||
|
failed=1
|
||||||
|
break
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
scancnt=0
|
||||||
|
failed=0
|
||||||
while [ "$status" = 0 ]; do
|
while [ "$status" = 0 ]; do
|
||||||
|
sleep 3
|
||||||
./src/tools/ebusctl -p 8877 scan result | egrep -q "still running"
|
./src/tools/ebusctl -p 8877 scan result | egrep -q "still running"
|
||||||
status=$?
|
status=$?
|
||||||
|
if [ $status -ne 0 ]; then
|
||||||
|
echo "scan result status=$status"
|
||||||
|
failed=1
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
scancnt=$(( scancnt + 1 ))
|
||||||
done
|
done
|
||||||
echo `date` "scan result:"
|
echo `date` "scan result after $scancnt checks:"
|
||||||
./src/tools/ebusctl -p 8877 scan result
|
./src/tools/ebusctl -p 8877 scan result
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
failed=1
|
||||||
|
fi
|
||||||
curl -s "http://localhost:8878/data/" >/dev/null
|
curl -s "http://localhost:8878/data/" >/dev/null
|
||||||
curl -s "http://localhost:8878/data/broadcast/?since=1&exact=1&required=" >/dev/null
|
curl -s "http://localhost:8878/data/broadcast/?since=1&exact=1&required=" >/dev/null
|
||||||
curl -s "http://localhost:8878/data/mc.4/outsidetemp?poll=1" >/dev/null
|
curl -s "http://localhost:8878/data/mc.4/outsidetemp?poll=1" >/dev/null
|
||||||
@@ -391,3 +409,4 @@ echo `date` "ebusd log:"
|
|||||||
cat "$PWD/ebusd.log"
|
cat "$PWD/ebusd.log"
|
||||||
echo `date` "done."
|
echo `date` "done."
|
||||||
wait $srvpid
|
wait $srvpid
|
||||||
|
exit $failed
|
||||||
|
|||||||
Reference in New Issue
Block a user