X-Git-Url: http://git.rot13.org/?p=air-quality;a=blobdiff_plain;f=zph02.pl;fp=zph02.pl;h=8b7018a2fd79c190f885f0d52a303e0259eb252b;hp=44d35ef0e592029baa3353baa191e8f900dcc2c1;hb=4b3c2f6ff428be69aae03d1d0555fb3e71ce2742;hpb=c9bfa79f7249f0963798648a565243e4a3e63161 diff --git a/zph02.pl b/zph02.pl index 44d35ef..8b7018a 100755 --- a/zph02.pl +++ b/zph02.pl @@ -46,7 +46,7 @@ while (1) { if ( $v[0] == 0xff && $sum == $checksum ) { my $influx = "zph02,dc=trnjanska pm25_pcnt=$pcnt $t"; print "$influx\n"; - system "curl --silent -XPOST '$influx_url' --data-binary '$influx'"; + system "curl --max-time 2 --silent -XPOST '$influx_url' --data-binary '$influx'"; system "mosquitto_pub -h rpi2 -t 'air/zph02/pm25' -m $pcnt"; } }