Hello friends,
I'm sending a json line as follows. mqtt broker takes this line and translates as json.
Then I want to save the line that I translated into influxdb but don't save it?
Json string: { "nodename": "cihaz1", "nodeabone": "123456", "endeks": "210" }
node:
[{"id":"555092b5.57397c","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"ed2ad8b1.8df8e8","type":"mqtt in","z":"555092b5.57397c","name":"","topic":"/deneme/#","qos":"0","broker":"f35383e5.cc1d5","x":80,"y":100,"wires":[["1db520db.022daf"]]},{"id":"8b88bdbb.c410c","type":"influxdb out","z":"555092b5.57397c","influxdb":"41b4c349.309a4c","name":"","measurement":"sistem","precision":"","retentionPolicy":"","x":720,"y":80,"wires":[]},{"id":"1db520db.022daf","type":"json","z":"555092b5.57397c","name":"","property":"payload","action":"","pretty":false,"x":240,"y":100,"wires":[["79f3bb2e.9dbb34","8ea62c9b.6de7d"]]},{"id":"79f3bb2e.9dbb34","type":"debug","z":"555092b5.57397c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":390,"y":120,"wires":[]},{"id":"8ea62c9b.6de7d","type":"function","z":"555092b5.57397c","name":"MQTT to InfluxDB","func":"var topic = msg.topic.split("/");\nvar dest = tokens[tokens.length-1];\n\nmsg.payload = topic[2] + \n",nodename=" + msg.payload.nodename + \n",nodeabone=" + msg.payload.nodeabone + \n" endeks=" + msg.payload.endeks;\n\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":80,"wires":[["2498d973.882296","8b88bdbb.c410c"]]},{"id":"2498d973.882296","type":"debug","z":"555092b5.57397c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":610,"y":120,"wires":[]},{"id":"f35383e5.cc1d5","type":"mqtt-broker","z":"555092b5.57397c","name":"centos","broker":"192.168.241.132","port":"1883","clientid":"node-red","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":"15","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closePayload":"","willTopic":"","willQos":"0","willRetain":"false","willPayload":""},{"id":"41b4c349.309a4c","type":"influxdb","z":"","hostname":"192.168.241.132","port":"8086","protocol":"http","database":"SAYACSISTEMI","name":"","usetls":false,"tls":""}]