From: Dobrica Pavlinusic Date: Wed, 19 Feb 2020 20:51:28 +0000 (+0100) Subject: added consistency=any X-Git-Url: http://git.rot13.org/?p=air-quality;a=commitdiff_plain;h=42b7874fd94e776acce9f6fcbea694474d848368 added consistency=any --- diff --git a/audio2influx.sh b/audio2influx.sh index ee76625..a8a49cc 100755 --- a/audio2influx.sh +++ b/audio2influx.sh @@ -5,6 +5,6 @@ while true ; do arecord -d 1 -r 96000 /dev/shm/tmp.wav 2>/dev/null time=`date +'%s%N'` info=`sox /dev/shm/tmp.wav -n stat 2>&1 | grep '[0-9][0-9][0-9]*$' | sed -e 's/[()]//g' -e 's/: */=/' -e 's/ */_/g' | tee /dev/shm/audio | tr '\n' ',' | sed 's/[, ]*$//'` -curl --silent -XPOST http://10.60.0.92:8086/write?db=rot13 --data-binary "fan,dc=trnjanska $info $time" +curl --silent -XPOST 'http://10.60.0.92:8086/write?consistency=any&db=rot13' --data-binary "fan,dc=trnjanska $info $time" done diff --git a/dsm501.pl b/dsm501.pl index 3b2f914..e61e2be 100755 --- a/dsm501.pl +++ b/dsm501.pl @@ -7,8 +7,7 @@ use Time::HiRes; use Data::Dump qw(dump); my $port = shift @ARGV || '/dev/serial/by-path/pci-0000:00:1a.7-usb-0:5.1.3:1.0-port0'; -my $influx_url = shift @ARGV || 'http://10.13.37.229:8186/write?db=telegraf'; -$influx_url = 'http://10.13.37.92:8086/write?db=rot13'; +my $influx_url = shift @ARGV || 'http://10.13.37.92:8086/write?consistency=any&db=rot13'; my $measurement = $ENV{MEASUREMENT} || 'dsm501'; my $s = new Device::SerialPort( $port ) || die $!; diff --git a/mh-z19b.pl b/mh-z19b.pl index c2f8ffe..8edaa3f 100755 --- a/mh-z19b.pl +++ b/mh-z19b.pl @@ -7,8 +7,7 @@ use Time::HiRes; use Data::Dump qw(dump); my $port = shift @ARGV || '/dev/serial/by-path/pci-0000:00:1a.7-usb-0:5.3.4:1.2'; -my $influx_url = shift @ARGV || 'http://10.13.37.229:8186/write?db=telegraf'; -$influx_url = 'http://10.13.37.92:8086/write?db=rot13'; +my $influx_url = shift @ARGV || 'http://10.13.37.92:8086/write?consistency=any&db=rot13'; my $s = new Device::SerialPort( $port ) || die $!; $s->baudrate(9600); diff --git a/pms3003.pl b/pms3003.pl index 7c0205e..0f73e96 100755 --- a/pms3003.pl +++ b/pms3003.pl @@ -7,8 +7,7 @@ use Time::HiRes; use Data::Dump qw(dump); my $port = shift @ARGV || '/dev/ttyUSB0'; -my $influx_url = shift @ARGV || 'http://10.13.37.229:8186/write?db=telegraf'; -$influx_url = 'http://10.13.37.92:8086/write?db=rot13'; +my $influx_url = shift @ARGV || 'http://10.13.37.92:8086/write?consistency=any&db=rot13'; my $debug = $ENV{DEBUG} || 0; diff --git a/zph02.pl b/zph02.pl index 0e329fd..81ad4dc 100755 --- a/zph02.pl +++ b/zph02.pl @@ -7,8 +7,7 @@ use Time::HiRes; use Data::Dump qw(dump); my $port = shift @ARGV || '/dev/serial/by-path/pci-0000:00:1a.7-usb-0:5.3.4:1.0'; -my $influx_url = shift @ARGV || 'http://10.13.37.229:8186/write?db=telegraf'; -$influx_url = 'http://10.13.37.92:8086/write?db=rot13'; +my $influx_url = shift @ARGV || 'http://10.13.37.92:8086/write?consistency=any&db=rot13'; my $s = new Device::SerialPort( $port ) || die $!; $s->baudrate(9600);