Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Node-RED and InfluxDB integration example Flow
[{"id":"9cf79844.811da8","type":"tab","label":"InfluxDB","disabled":false,"info":""},{"id":"fa7003.cd5af","type":"influxdb out","z":"9cf79844.811da8","influxdb":"47a44304.44396c","name":"","measurement":"test","precision":"","retentionPolicy":"","x":730,"y":240,"wires":[]},{"id":"359eb20b.7b519e","type":"function","z":"9cf79844.811da8","name":"single value","func":"msg.payload = Math.random()*10;\nreturn msg;","outputs":1,"noerr":0,"x":417,"y":248,"wires":[["fa7003.cd5af","22509df2.cebb8a"]]},{"id":"3795af09.c58158","type":"inject","z":"9cf79844.811da8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":273,"y":223,"wires":[["359eb20b.7b519e"]]},{"id":"22509df2.cebb8a","type":"debug","z":"9cf79844.811da8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":570,"y":100,"wires":[]},{"id":"dd6779af.77dfe","type":"mqtt in","z":"9cf79844.811da8","name":"Temp 2nd Floor","topic":"tele/D1-2/SENSOR","qos":"1","datatype":"auto","broker":"1c38fbb7.3f203c","x":220,"y":420,"wires":[["59163960.004d7"]]},{"id":"59163960.004d7","type":"json","z":"9cf79844.811da8","name":"","property":"payload","action":"obj","pretty":false,"x":400,"y":500,"wires":[["12e196a4.c09ca1"]]},{"id":"12e196a4.c09ca1","type":"function","z":"9cf79844.811da8","name":"get Temperature from the sensor","func":"// msg.topic = 'currentTemp';\nmsg.payload = msg.payload.AM2301.Temperature;\nreturn msg;","outputs":1,"noerr":0,"x":540,"y":380,"wires":[["fa7003.cd5af","b6a82334.e36db"]]},{"id":"b6a82334.e36db","type":"debug","z":"9cf79844.811da8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","x":790,"y":480,"wires":[]},{"id":"47a44304.44396c","type":"influxdb","z":"9cf79844.811da8","hostname":"10.0.0.2","port":"8086","database":"nodered","name":"nodered","usetls":false,"tls":""},{"id":"1c38fbb7.3f203c","type":"mqtt-broker","z":"","name":"MQTT Server","broker":"10.0.0.2","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","willTopic":"","willQos":"0","willRetain":"false","willPayload":""}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.