X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=pms3003.pl;h=cb68af2bfab78bf353d55e5bf6f1779b177ceb50;hb=921f4897fcc86708684b85328496a74b2dc6349f;hp=f1d458ab6914a10597fa61f883785e965495059a;hpb=c2240722beacb995b93da993a446348f8571f23d;p=air-quality diff --git a/pms3003.pl b/pms3003.pl index f1d458a..cb68af2 100755 --- a/pms3003.pl +++ b/pms3003.pl @@ -7,7 +7,7 @@ use Time::HiRes; use Data::Dump qw(dump); my $port = shift @ARGV || '/dev/serial/by-path/platform-3f980000.usb-usb-0:1.3:1.0-port0'; -my $influx_url = shift @ARGV || 'http://10.13.37.92:8086/write?consistency=any&db=rot13'; +my $influx_url = shift @ARGV || 'http://10.60.0.92:8086/write?consistency=any&db=rot13'; my $debug = $ENV{DEBUG} || 0; @@ -59,7 +59,7 @@ while (1) { }; $influx =~ s/,$//; $influx .= " $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'" } }