X-Git-Url: http://git.rot13.org/?p=GroveSensor;a=blobdiff_plain;f=influx.sh;h=b88c43b1c6e270d6bccc744128415118574eddd2;hp=14bd7430ee743c8847d10dc568f1adef51f2d7a3;hb=0697b11a136573edf998b987440a771024ea9ab5;hpb=b981b4e95e55dc6ad6cd47cc3d209a375156e0cb diff --git a/influx.sh b/influx.sh index 14bd743..b88c43b 100755 --- a/influx.sh +++ b/influx.sh @@ -1,11 +1,11 @@ -#!/bin/sh -e +#!/bin/sh serial=/dev/serial/by-path/platform-xhci-hcd.3.auto-usb-0:2:1.0-port0 stty -F $serial ispeed 115200 cs8 -cstopb -parenb -echo igncr cat $serial | while read line ; do - curl --silent -XPOST "http://10.13.37.92:8086/write?consistency=any&db=rot13" --data-binary "grove,dc=trnjanska,host=$(hostname -s) $line" + curl --silent -XPOST "http://10.60.0.92:8086/write?consistency=any&db=rot13" --data-binary "grove,dc=trnjanska,host=$(hostname -s) $line" light=$( echo $line | sed -e 's/^.*,light=//' -e 's/,.*$//' ) mosquitto_pub -h rpi2 -t grove/light -m $light echo $line > /dev/shm/grove