projects
/
rtl433-sensors
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
record tele topic and content
[rtl433-sensors]
/
mqtt-tele-pgsql.sh
1
#!/bin/sh -x
2
3
mosquitto_sub -h 10.13.37.5 -t 'tele/#' -v | while read topic json ; do
4
echo $json > /dev/shm/tele.json
5
# psql -c "copy tele (json) from '/dev/shm/tele.json'" rot13
6
psql -c "insert into tele (topic,json) values ('$topic','$json');" rot13
7
done