set pointsize 0.2
set output '/dev/shm/1.png'
-plot "/dev/shm/temp.tsv" using 1:2 with points title "DS18B20 deg. C"
+plot "/dev/shm/temp.tsv" using 1:2 with points title "DS18B20 deg. C","/dev/shm/temp.tsv" using 1:($3 > 1 && $3 < 45 ? $3 : '') with dots title "DHT22 deg. C"
set output '/dev/shm/2.png'
-plot "/dev/shm/temp.tsv" using 1:($3 > 1 ? $3 : '') with dots title "DHT22 deg. C"
+plot "/dev/shm/temp.tsv" using 1:($3 > 1 && $3 < 45 ? $3 : '') with dots title "DHT22 deg. C"
set output '/dev/shm/3.png'
plot "/dev/shm/temp.tsv" using 1:($4 > 3 ? $4 : '') with dots title "DHT22 % hum"
#!/bin/sh -x
+kindle=192.168.3.100
+
#ssh rpi 'cat `ls -t /dev/shm/vaillant.* | head -1` | sed "s/ .*| */ /"' > /dev/shm/temp.tsv
-cat `ls -t /dev/shm/vaillant.* | head -1` | sed "s/ .*| */ /" > /dev/shm/temp.tsv
+tail -8640 `ls -t /dev/shm/vaillant.* | head -1` | sed "s/ .*| */ /" > /dev/shm/temp.tsv
gnuplot temp.gnuplot
montage /dev/shm/[1-3].png -tile 1x3 -geometry +0+0 /tmp/m1.png
convert /tmp/m1.png -gravity center -extent 600x800 /tmp/m1.pgm
#display /tmp/m1.pgm
-./pgm2fb.pl /tmp/m1.pgm | ssh root@192.168.3.100 'dd of=/dev/fb0 ; echo 2 > /proc/eink_fb/update_display'
+
+if ping $kindle ; then
+ ./pgm2fb.pl /tmp/m1.pgm | ssh root@$kindle 'dd of=/dev/fb0 ; echo 2 > /proc/eink_fb/update_display'
+fi