+fi
+
+#Beispielausgabe USB-WDE1:
+# $1;1;;13,8;22,7;22,6;17,8;22,2;21,2;22,9;;59;35;38;49;38;40;35;;;;;;;0
+# Doku des Formats in 92030_USB_WDE1_V1.0_UM.pdf bei elv.de verfügbar
+# Format ist "Logview openformat"
+# http://www.logview.info/cms/d_formatbeschreibung.phtml
+
+
+#split by semicolons
+OLDIFS="$IFS"
+IFS=";"
+read -r sign state timestamp\
+ t0 t1 t2 t3 t4 t5 t6 t7\
+ h0 h1 h2 h3 h4 h5 h6 h7\
+ tc hc ws ns rain checksum\
+ < "$logfile"
+IFS=$OLDIFS
+
+if [ "$sign" != '$1' ]; then
+ echo Log line does not begin with \$1
+ exit 2
+fi
+
+curdate=`date +%s`
+if [ "$timestamp" -lt `expr $curdate - 600` ]; then
+ #timestamp is too old, data are too old
+ exit
+fi
+
+
+if [ "$TYPE" = "temperature" ]; then
+ varprefix=t
+else
+ varprefix=h
+fi
+
+
+for i in $sensors; do
+ eval "value=\$$varprefix$i"
+ value=`echo $value|sed s/,/./`
+ echo "sensor$i.value $value"
+done