From: Dobrica Pavlinusic Date: Tue, 4 Sep 2018 16:19:32 +0000 (+0200) Subject: don't put channel into tags (and it is string, not number) X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=c5305e404daf5834e08a41b7905dbabbe3934e10;p=rtl433-sensors don't put channel into tags (and it is string, not number) --- diff --git a/mqtt-rtl_433-influx.sh b/mqtt-rtl_433-influx.sh index 26f03ae..892c35f 100755 --- a/mqtt-rtl_433-influx.sh +++ b/mqtt-rtl_433-influx.sh @@ -5,14 +5,11 @@ mosquitto_sub -t rpi2/rtl433/json \ -e 's/ "/ /' -e 's/"=/=/g' -e 's/,"/,/g' \ -e 's/^ *//' \ -e 's/ /\\ /g' \ --e 's/,channel="*\([^,"]*\)"*,/,channel=\1,/' \ +-e 's/,channel="*\([^,"]*\)"*,/,channel="\1",/' \ -e 's/,battery="*\([^,"]*\)"*,/,battery="\1",/' \ -e 's/,id=\([^,]*\),/,id=\1 /' \ -e 's/ rid=\([^,]*\),/,rid=\1 /' \ --e 's/[ ,]channel=\([^,]*\),/,channel=\1 /' \ -e 's/^/rtl_433,/' \ -e 's/"//' \ -e 's/"//' \ -| tee /dev/stderr \ -| tee /dev/shm/433.influx \ | mosquitto_pub -t rpi2/rtl_433/influx -l