X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=temp2.gnuplot;h=57931ee8e50eeaab33ad25723897fed2d4feafb7;hb=0f9342d1bd49465a91256be355c20f7931083abc;hp=1f7d6dc3a615af60583d3d4c710207e7968a3508;hpb=b76c806524f3249becb8c2896717226bcca10ac0;p=vaillant-thermostat diff --git a/temp2.gnuplot b/temp2.gnuplot index 1f7d6dc..57931ee 100644 --- a/temp2.gnuplot +++ b/temp2.gnuplot @@ -8,7 +8,11 @@ if ( gray == 1 ) { set xdata time set timefmt "%s" -set xtics format "%H" +if (strlen(interval) > 2) { + set xtics format "%H" +} else { + set xtics format "%H:%M" +} set pointsize 0.2 @@ -31,7 +35,7 @@ if ( gray == 1 ) { if (1) { t_mean=25 -t_spread=25 +t_spread=30 h_mean = 50 h_spread = 50 @@ -42,24 +46,34 @@ print "using default mean and spread" min_t = t_mean - ( t_spread / 2 ) max_t = t_mean + ( t_spread / 2 ) +if ( ! exists("tz_secs") ) { + tz_secs=7200 +} + set ytics nomirror -set y2tics +unset y2tics +set y2range [0:50] plot \ - "/dev/shm/DHT22-temperature" using ($1+7200):($2 > min_t && $2 < max_t ? $2 : '') with dots title "DHT22 unutra" \ -,"/dev/shm/rtl_433-9-172-temperature" using ($1+7200):($2) with dots title "vani" \ -,"/dev/shm/rtl_433-9-75-temperature" using ($1+7200):($2) with dots title "kupaona" \ -,"/dev/shm/rtl_433-9-141-temperature" using ($1+7200):($2) with dots title "kuhinja" \ -,"/dev/shm/DS18B20-temperature" using ($1+7200):($2 > min_t && $2 < max_t ? $2 : '') with dots title "DS18B20 unutra" + "/dev/shm/DHT22-temperature" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with dots title "DHT22 unutra" lt rgb "#ff00ff" \ +,"/dev/shm/DS18B20-temperature" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with dots title "DS18B20 unutra" lt rgb "#880088" \ +,"/dev/shm/rtl_433-kuhinja-temperature" using ($1+tz_secs):($2) with dots title "kuhinja" lt rgb "#ff8844" \ +,"/dev/shm/rtl_433-kupaona-temperature" using ($1+tz_secs):($2) with dots title "kupaona" lt rgb "#8888ff" \ +,"/dev/shm/rtl_433-soba-temperature" using ($1+tz_secs):($2) with dots title "soba" lt rgb "#ffcc00" \ +,"/dev/shm/rtl_433-vani-temperature" using ($1+tz_secs):($2) with dots title "vani" lt rgb "#00cc00" \ +,"/dev/shm/rtl_433-kutija-temperature" using ($1+tz_secs):($2) with dots title "kutija" lt rgb "#0088cc" \ +,"/dev/shm/boiler.d" using ($1+tz_secs):($2 > 0 ? 48 : 2) axes x1y2 with dots title "boiler on/off" lt rgb "#000000" if ( exists("lines") && lines == 1 ) { plot \ - "/dev/shm/DHT22-temperature" using ($1+7200):($2 > min_t && $2 < max_t ? $2 : '') with lines title "DHT22 unutra" \ -,"/dev/shm/rtl_433-9-172-temperature" using ($1+7200):($2) with lines title "vani" \ -,"/dev/shm/rtl_433-9-75-temperature" using ($1+7200):($2) with lines title "kupaona" \ -,"/dev/shm/rtl_433-9-141-temperature" using ($1+7200):($2) with lines title "kuhinja" \ -,"/dev/shm/DS18B20-temperature" using ($1+7200):($2 > min_t && $2 < max_t ? $2 : '') with lines title "DS18B20 unutra" + "/dev/shm/DHT22-temperature" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with lines title "DHT22 unutra" lt rgb "#ff00ff" \ +,"/dev/shm/DS18B20-temperature" using ($1+tz_secs):($2 > min_t && $2 < max_t ? $2 : '') with lines title "DS18B20 unutra" lt rgb "#880088" \ +,"/dev/shm/rtl_433-kuhinja-temperature" using ($1+tz_secs):($2) with lines title "kuhinja" lt rgb "#ff8844" \ +,"/dev/shm/rtl_433-kupaona-temperature" using ($1+tz_secs):($2) with lines title "kupaona" lt rgb "#8888ff" \ +,"/dev/shm/rtl_433-soba-temperature" using ($1+tz_secs):($2) with lines title "soba" lt rgb "#ffcc00" \ +,"/dev/shm/rtl_433-vani-temperature" using ($1+tz_secs):($2) with lines title "vani" lt rgb "#00cc00" \ +,"/dev/shm/rtl_433-kutija-temperature" using ($1+tz_secs):($2) with lines title "kutija" lt rgb "#0088cc" } if ( gray == 1 ) { @@ -72,9 +86,20 @@ min_h = h_mean - h_spread max_h = h_mean + h_spread plot \ - "/dev/shm/DHT22-humidity" using ($1+7200):($2 > min_h && $2 < max_h ? $2 : '') with dots title "DHT22 unutra" \ -,"/dev/shm/rtl_433-9-172-humidity" using ($1+7200):($2) with lines title "vani" \ -,"/dev/shm/rtl_433-9-75-humidity" using ($1+7200):($2) with lines title "kupaona" \ -,"/dev/shm/rtl_433-9-141-humidity" using ($1+7200):($2) with lines title "kuhunja" + "/dev/shm/DHT22-humidity" using ($1+tz_secs):($2 > min_h && $2 < max_h ? $2 : '') with dots title "DHT22 unutra" lt rgb "#ff00ff" \ +,"/dev/shm/rtl_433-kuhinja-humidity" using ($1+tz_secs):($2) with dots title "kuhunja" lt rgb "#ff8844" \ +,"/dev/shm/rtl_433-kupaona-humidity" using ($1+tz_secs):($2) with dots title "kupaona" lt rgb "#8888ff" \ +,"/dev/shm/rtl_433-vani-humidity" using ($1+tz_secs):($2) with dots title "vani" lt rgb "#00cc00 " \ +,"/dev/shm/rtl_433-kutija-humidity" using ($1+tz_secs):($2) with dots title "kutija" lt rgb "#0088cc " \ +,"/dev/shm/boiler.d" using ($1+tz_secs):($2 > 0 ? 48 : 2) axes x1y2 with dots title "boiler on/off" lt rgb "#000000" +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" lt rgb "#ff00ff" \ +,"/dev/shm/rtl_433-kuhinja-humidity" using ($1+tz_secs):($2) with lines title "kuhunja" lt rgb "#ff8844" \ +,"/dev/shm/rtl_433-kupaona-humidity" using ($1+tz_secs):($2) with lines title "kupaona" lt rgb "#8888ff" \ +,"/dev/shm/rtl_433-vani-humidity" using ($1+tz_secs):($2) with lines title "vani" lt rgb "#00cc00 " \ +,"/dev/shm/rtl_433-kutija-humidity" using ($1+tz_secs):($2) with lines title "kutija" lt rgb "#0088cc " + +} unset multiplot