projects
/
GroveSensor
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68e1054
)
send serial output to influxdb
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 11 Dec 2020 10:34:26 +0000
(11:34 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 11 Dec 2020 10:34:26 +0000
(11:34 +0100)
influx.sh
[new file with mode: 0755]
patch
|
blob
diff --git a/influx.sh
b/influx.sh
new file mode 100755
(executable)
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