X-Git-Url: http://git.rot13.org/?p=air-quality;a=blobdiff_plain;f=zph02.pl;h=d0797d9db6331be3a5d5117112c60331dc8394e6;hp=731a432b6b561439b3d2177edb7f3e31eeded921;hb=HEAD;hpb=80cbace6598e0bfb9a4798cccfb13611049d2e1b diff --git a/zph02.pl b/zph02.pl index 731a432..10f961e 100755 --- a/zph02.pl +++ b/zph02.pl @@ -43,7 +43,7 @@ while (1) { my $checksum = $v[8]; my $pcnt = $v[3] + ( $v[4] / 100 ); - if ( $v[0] == 0xff && $sum == $checksum ) { + if ( $v[0] == 0xff && $sum == $checksum && $pcnt > 0) { my $influx = "zph02,dc=trnjanska pm25_pcnt=$pcnt $t"; print "$influx\n" if -e '/dev/shm/air-debug'; system "curl --max-time 2 --silent -XPOST '$influx_url' --data-binary '$influx'";