if (1) {
t_mean=25
-t_spread=25
+t_spread=30
h_mean = 50
h_spread = 50
"/dev/shm/DHT22-temperature" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with dots title "DHT22 unutra" \
,"/dev/shm/rtl_433-9-172-temperature" using ($1+tz_secs):($2) with dots title "vani" \
,"/dev/shm/rtl_433-9-75-temperature" using ($1+tz_secs):($2) with dots title "kupaona" \
-,"/dev/shm/rtl_433-9-141-temperature" using ($1+tz_secs):($2) with dots title "kuhinja" \
+,"/dev/shm/rtl_433-9-143-temperature" using ($1+tz_secs):($2) with dots title "kuhinja" \
,"/dev/shm/DS18B20-temperature" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with dots title "DS18B20 unutra" \
,"/dev/shm/rtl_433-183-temperature" using ($1+tz_secs):($2) with dots title "soba" lt rgb "#808000"
"/dev/shm/DHT22-temperature" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with lines title "DHT22 unutra" \
,"/dev/shm/rtl_433-9-172-temperature" using ($1+tz_secs):($2) with lines title "vani" \
,"/dev/shm/rtl_433-9-75-temperature" using ($1+tz_secs):($2) with lines title "kupaona" \
-,"/dev/shm/rtl_433-9-141-temperature" using ($1+tz_secs):($2) with lines title "kuhinja" \
+,"/dev/shm/rtl_433-9-143-temperature" using ($1+tz_secs):($2) with lines title "kuhinja" \
,"/dev/shm/DS18B20-temperature" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with lines title "DS18B20 unutra" \
,"/dev/shm/rtl_433-183-temperature" using ($1+tz_secs):($2) with lines title "soba" lt rgb "#808000"
}
"/dev/shm/DHT22-humidity" using ($1+tz_secs):($2 > min_h && $2 < max_h ? $2 : '') with dots title "DHT22 unutra" \
,"/dev/shm/rtl_433-9-172-humidity" using ($1+tz_secs):($2) with lines title "vani" \
,"/dev/shm/rtl_433-9-75-humidity" using ($1+tz_secs):($2) with lines title "kupaona" \
-,"/dev/shm/rtl_433-9-141-humidity" using ($1+tz_secs):($2) with lines title "kuhunja"
+,"/dev/shm/rtl_433-9-143-humidity" using ($1+tz_secs):($2) with lines title "kuhunja"
if ( exists("lines") && lines == 1 ) {
plot \
- "/dev/shm/DHT22-humidity" using ($1+tz_secs):($2 > min_h && $2 < max_h ? $2 : '') with lines title "DHT22 unutra"
+ "/dev/shm/DHT22-humidity" using ($1+tz_secs):($2 > min_h && $2 < max_h ? $2 : '') with lines title "DHT22 unutra" \
+,"/dev/shm/rtl_433-9-172-humidity" using ($1+tz_secs):($2) with lines title "vani" \
+,"/dev/shm/rtl_433-9-75-humidity" using ($1+tz_secs):($2) with lines title "kupaona" \
+,"/dev/shm/rtl_433-9-143-humidity" using ($1+tz_secs):($2) with lines title "kuhunja"
}
unset multiplot
#curl -G 'http://10.60.0.89:8086/query' --data-urlencode "db=telegraf" --data-urlencode "epoch=s" --data-urlencode "q=SELECT \"temperature_C\" FROM \"rtl_433\" WHERE time > now() - $INTERVAL AND \"topic\"='rpi2/rtl_433/influx' AND \"id\" = '5'" | sed -e 's/^.*"values":\[\[//' -e 's/\],\[/\n/g' -e 's/,/ /g' -e 's/]].*$//' > /dev/shm/rtl_433-temperature
curl -G 'http://10.60.0.89:8086/query' --data-urlencode "db=telegraf" --data-urlencode "epoch=s" --data-urlencode "q=SELECT \"temperature_C\" FROM \"rtl_433\" WHERE time > now() - $INTERVAL AND \"topic\"='rpi2/rtl_433/influx' AND \"rid\" = '172'" | sed -e 's/^.*"values":\[\[//' -e 's/\],\[/\n/g' -e 's/,/ /g' -e 's/]].*$//' | tr -d '\\"' > /dev/shm/rtl_433-9-172-temperature
curl -G 'http://10.60.0.89:8086/query' --data-urlencode "db=telegraf" --data-urlencode "epoch=s" --data-urlencode "q=SELECT \"temperature_C\" FROM \"rtl_433\" WHERE time > now() - $INTERVAL AND \"topic\"='rpi2/rtl_433/influx' AND \"rid\" = '75'" | sed -e 's/^.*"values":\[\[//' -e 's/\],\[/\n/g' -e 's/,/ /g' -e 's/]].*$//' | tr -d '\\"' > /dev/shm/rtl_433-9-75-temperature
-curl -G 'http://10.60.0.89:8086/query' --data-urlencode "db=telegraf" --data-urlencode "epoch=s" --data-urlencode "q=SELECT \"temperature_C\" FROM \"rtl_433\" WHERE time > now() - $INTERVAL AND \"topic\"='rpi2/rtl_433/influx' AND \"rid\" = '141'" | sed -e 's/^.*"values":\[\[//' -e 's/\],\[/\n/g' -e 's/,/ /g' -e 's/]].*$//' | tr -d '\\"' > /dev/shm/rtl_433-9-141-temperature
+curl -G 'http://10.60.0.89:8086/query' --data-urlencode "db=telegraf" --data-urlencode "epoch=s" --data-urlencode "q=SELECT \"temperature_C\" FROM \"rtl_433\" WHERE time > now() - $INTERVAL AND \"topic\"='rpi2/rtl_433/influx' AND \"rid\" = '143'" | sed -e 's/^.*"values":\[\[//' -e 's/\],\[/\n/g' -e 's/,/ /g' -e 's/]].*$//' | tr -d '\\"' > /dev/shm/rtl_433-9-143-temperature
curl -G 'http://10.60.0.89:8086/query' --data-urlencode "db=telegraf" --data-urlencode "epoch=s" --data-urlencode "q=SELECT \"temperature_C\" FROM \"rtl_433\" WHERE time > now() - $INTERVAL AND \"topic\"='rpi2/rtl_433/influx' AND \"rid\" = '82'" | sed -e 's/^.*"values":\[\[//' -e 's/\],\[/\n/g' -e 's/,/ /g' -e 's/]].*$//' | tr -d '\\"' > /dev/shm/rtl_433-183-temperature
#curl -G 'http://10.60.0.89:8086/query' --data-urlencode "db=telegraf" --data-urlencode "epoch=s" --data-urlencode "q=SELECT \"humidity\",\"channel\" FROM \"rtl_433\" WHERE time > now() - $INTERVAL AND \"topic\"='rpi2/rtl_433/influx' AND \"id\" = '9'" | sed -e 's/^.*"values":\[\[//' -e 's/\],\[/\n/g' -e 's/,/ /g' -e 's/]].*$//' | tr -d '\\"' > /dev/shm/rtl_433-9-humidity
curl -G 'http://10.60.0.89:8086/query' --data-urlencode "db=telegraf" --data-urlencode "epoch=s" --data-urlencode "q=SELECT \"humidity\",\"channel\" FROM \"rtl_433\" WHERE time > now() - $INTERVAL AND \"topic\"='rpi2/rtl_433/influx' AND \"rid\" = '172'" | sed -e 's/^.*"values":\[\[//' -e 's/\],\[/\n/g' -e 's/,/ /g' -e 's/]].*$//' | tr -d '\\"' > /dev/shm/rtl_433-9-172-humidity
curl -G 'http://10.60.0.89:8086/query' --data-urlencode "db=telegraf" --data-urlencode "epoch=s" --data-urlencode "q=SELECT \"humidity\",\"channel\" FROM \"rtl_433\" WHERE time > now() - $INTERVAL AND \"topic\"='rpi2/rtl_433/influx' AND \"rid\" = '75'" | sed -e 's/^.*"values":\[\[//' -e 's/\],\[/\n/g' -e 's/,/ /g' -e 's/]].*$//' | tr -d '\\"' > /dev/shm/rtl_433-9-75-humidity
-curl -G 'http://10.60.0.89:8086/query' --data-urlencode "db=telegraf" --data-urlencode "epoch=s" --data-urlencode "q=SELECT \"humidity\",\"channel\" FROM \"rtl_433\" WHERE time > now() - $INTERVAL AND \"topic\"='rpi2/rtl_433/influx' AND \"rid\" = '141'" | sed -e 's/^.*"values":\[\[//' -e 's/\],\[/\n/g' -e 's/,/ /g' -e 's/]].*$//' | tr -d '\\"' > /dev/shm/rtl_433-9-141-humidity
+curl -G 'http://10.60.0.89:8086/query' --data-urlencode "db=telegraf" --data-urlencode "epoch=s" --data-urlencode "q=SELECT \"humidity\",\"channel\" FROM \"rtl_433\" WHERE time > now() - $INTERVAL AND \"topic\"='rpi2/rtl_433/influx' AND \"rid\" = '143'" | sed -e 's/^.*"values":\[\[//' -e 's/\],\[/\n/g' -e 's/,/ /g' -e 's/]].*$//' | tr -d '\\"' > /dev/shm/rtl_433-9-143-humidity
GRAY=`echo $QUERY_STRING | grep -i gray | wc -l`