From 0401b1143987069030039b6fafc300560d512566 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Fri, 11 Dec 2020 11:34:26 +0100 Subject: [PATCH] send serial output to influxdb --- influx.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 influx.sh diff --git a/influx.sh b/influx.sh new file mode 100755 index 0000000..ce6f761 --- /dev/null +++ b/influx.sh @@ -0,0 +1,7 @@ +#!/bin/sh -e + +stty -F /dev/ttyUSB0 ispeed 115200 cs8 -cstopb -parenb -echo igncr + +cat /dev/ttyUSB0 | while read line ; do + curl -XPOST "http://10.13.37.92:8086/write?consistency=any&db=rot13" --data-binary "grove,dc=trnjanska,host=$(hostname -s) $line" +done -- 2.20.1