my $pcnt = $v[3] + ( $v[4] / 100 );
if ( $v[0] == 0xff && $sum == $checksum ) {
my $influx = "zph02,dc=trnjanska pm25_pcnt=$pcnt $t";
- print "$influx\n";
+ print "$influx\n" if -e '/dev/shm/air-debug';
system "curl --max-time 2 --silent -XPOST '$influx_url' --data-binary '$influx'";
system "mosquitto_pub -h rpi2 -t 'air/zph02/pm25' -m $pcnt";
}