Aggregate MQTT sensor values into influxdb

Hi all,

Ive managed to sort of format the data to something influxdb can take but its not seemingly
getting any of the other values I am joining together but only passing one of them? I have it
I believe in an array? Please let me know possibly where I am going wrong? Or offer any advice
so that I can try to fix this. I am still learning and trying to navigate my way around. Below I've
attached the flow in file and text .

[{"id":"28078c62.9890fc","type":"tab","label":"Sensor_1 proto","disabled":false,"info":""},{"id":"9b6960ea.9750b","type":"ui_gauge","z":"28078c62.9890fc","name":"DHT221 Humi","group":"b551b358.237c68","order":1,"width":0,"height":0,"gtype":"gage","title":"DHT221 Humi","label":"units","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":640,"y":280,"wires":[]},{"id":"9394f77d.13da9","type":"ui_chart","z":"28078c62.9890fc","name":"DHT221 Temp","group":"b551b358.237c68","order":2,"width":0,"height":0,"label":"DHT221 Temp","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"step","nodata":"","dot":false,"ymin":"-2","ymax":"40","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":640,"y":160,"wires":[[]]},{"id":"5350eadd.6fce34","type":"ui_switch","z":"28078c62.9890fc","name":"Lamp Switch","label":"Lamp","tooltip":"","group":"957f84b5.bf5e","order":0,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"arduino_1/led","style":"","onvalue":"on","onvalueType":"str","onicon":"","oncolor":"","offvalue":"off","offvalueType":"str","officon":"","offcolor":"","x":310,"y":80,"wires":[["ea1020e7.70a818"]]},{"id":"41350b33.b685ec","type":"mqtt in","z":"28078c62.9890fc","name":"DHT221 Temp","topic":"Sense_1/sensor/DHT221Temp","qos":"2","datatype":"auto","broker":"647362d8.d9d214","x":310,"y":240,"wires":[["9394f77d.13da9","6247600a.a20038","6e676e51.01b158"]]},{"id":"ab8bd4dd.e756e","type":"mqtt in","z":"28078c62.9890fc","name":"DHT221 Humi","topic":"Sense_1/sensor/DHT221Humi","qos":"2","datatype":"auto","broker":"647362d8.d9d214","x":310,"y":320,"wires":[["9b6960ea.9750b","61f48da7.67078c","e5729d09.e6655"]]},{"id":"ea1020e7.70a818","type":"mqtt out","z":"28078c62.9890fc","name":"Lamp","topic":"arduino_1/led","qos":"2","retain":"","broker":"647362d8.d9d214","x":610,"y":80,"wires":[]},{"id":"20139f14.9cc848","type":"mosca in","z":"28078c62.9890fc","mqtt_port":1883,"mqtt_ws_port":8080,"name":"","username":"","password":"","dburl":"","x":330,"y":40,"wires":[["4498b7b.fbac1c8"]]},{"id":"4498b7b.fbac1c8","type":"debug","z":"28078c62.9890fc","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":570,"y":40,"wires":[]},{"id":"f5f6bb6e.476d2","type":"ui_gauge","z":"28078c62.9890fc","name":"DHT222 Humi","group":"12e2222f.a9959e","order":1,"width":0,"height":0,"gtype":"gage","title":"DHT222 Humi","label":"units","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":640,"y":520,"wires":[]},{"id":"dabda254.b89b38","type":"ui_chart","z":"28078c62.9890fc","name":"DHT222 Temp","group":"12e2222f.a9959e","order":2,"width":0,"height":0,"label":"DHT222 Temp","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"step","nodata":"","dot":false,"ymin":"-2","ymax":"40","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":640,"y":400,"wires":[[]]},{"id":"adf5d6b7.e6a73","type":"mqtt in","z":"28078c62.9890fc","name":"DHT222 Temp","topic":"Sense_1/sensor/DHT222Temp","qos":"2","datatype":"auto","broker":"647362d8.d9d214","x":310,"y":440,"wires":[["dabda254.b89b38","d8a21ac.0cafd68","6e827ee5.1c78f8"]]},{"id":"8c3adb8f.7000c8","type":"mqtt in","z":"28078c62.9890fc","name":"DHT222 Humi","topic":"Sense_1/sensor/DHT222Humi","qos":"2","datatype":"auto","broker":"647362d8.d9d214","x":310,"y":560,"wires":[["f5f6bb6e.476d2","bf37d5d3.204878","4a4a1ac6.4bad7c"]]},{"id":"c9791dfb.b6804","type":"mqtt in","z":"28078c62.9890fc","name":"DS18B201","topic":"Sense_1/sensor/DS18B1","qos":"2","datatype":"auto","broker":"647362d8.d9d214","x":300,"y":680,"wires":[["615e168b.69a2a8","16c0e3a8.d105a4","df0ca26d.99e848","f8df034e.5bb5b8"]]},{"id":"cfdff0cc.6c2da8","type":"mqtt in","z":"28078c62.9890fc","name":"DS18B202","topic":"Sense_1/sensor/DS18B2","qos":"2","datatype":"auto","broker":"647362d8.d9d214","x":300,"y":840,"wires":[["590855a1.812444","be349034.bd826","f7820516.8607a","875ba7a0.7655d"]]},{"id":"c8b2542.a41bba8","type":"mqtt in","z":"28078c62.9890fc","name":"DS18B203","topic":"Sense_1/sensor/DS18B3","qos":"2","datatype":"auto","broker":"647362d8.d9d214","x":300,"y":1000,"wires":[["1845ee8b.392e81","e060b7e1.2fdb38","cf183a1e.a5ed6","62d6280e.f911b"]]},{"id":"92886c00.5ad958","type":"mqtt in","z":"28078c62.9890fc","name":"DS18B204","topic":"Sense_1/sensor/DS18B4","qos":"2","datatype":"auto","broker":"647362d8.d9d214","x":300,"y":1160,"wires":[["2e37575b.b781e","c310da84.ec7b9","6bafb392.257d94","d870c9f6.1fd61"]]},{"id":"16c0e3a8.d105a4","type":"ui_chart","z":"28078c62.9890fc","name":"DS18B1 Temp","group":"cfa35f17.2887d","order":1,"width":0,"height":0,"label":"DS18B1 Temp","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"step","nodata":"","dot":false,"ymin":"-2","ymax":"100","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":640,"y":640,"wires":[[]]},{"id":"2e37575b.b781e","type":"ui_chart","z":"28078c62.9890fc","name":"DS18B4 Temp","group":"cfa35f17.2887d","order":4,"width":0,"height":0,"label":"DS18B4 Temp","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"step","nodata":"","dot":false,"ymin":"-2","ymax":"100","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":640,"y":1120,"wires":[[]]},{"id":"be349034.bd826","type":"ui_chart","z":"28078c62.9890fc","name":"DS18B2 Temp","group":"cfa35f17.2887d","order":2,"width":0,"height":0,"label":"DS18B2 Temp","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"step","nodata":"","dot":false,"ymin":"-2","ymax":"100","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":640,"y":800,"wires":[[]]},{"id":"e060b7e1.2fdb38","type":"ui_chart","z":"28078c62.9890fc","name":"DS18B3 Temp","group":"cfa35f17.2887d","order":3,"width":0,"height":0,"label":"DS18B3 Temp","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"step","nodata":"","dot":false,"ymin":"-2","ymax":"100","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":640,"y":960,"wires":[[]]},{"id":"615e168b.69a2a8","type":"ui_gauge","z":"28078c62.9890fc","name":"DS18B1 Temp","group":"f045d040.9cde18","order":1,"width":0,"height":0,"gtype":"gage","title":"DS18B1 Temp","label":"units","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":640,"y":760,"wires":[]},{"id":"590855a1.812444","type":"ui_gauge","z":"28078c62.9890fc","name":"DS18B2 Temp","group":"f045d040.9cde18","order":3,"width":0,"height":0,"gtype":"gage","title":"DS18B2 Temp","label":"units","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":640,"y":920,"wires":[]},{"id":"c310da84.ec7b9","type":"ui_gauge","z":"28078c62.9890fc","name":"DS18B4 Temp","group":"e41def3e.c1a48","order":2,"width":0,"height":0,"gtype":"gage","title":"DS18B4 Temp","label":"units","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":640,"y":1240,"wires":[]},{"id":"1845ee8b.392e81","type":"ui_gauge","z":"28078c62.9890fc","name":"DS18B3 Temp","group":"e41def3e.c1a48","order":1,"width":0,"height":0,"gtype":"gage","title":"DS18B3 Temp","label":"units","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":640,"y":1080,"wires":[]},{"id":"67b071f9.cbecc8","type":"ui_button","z":"28078c62.9890fc","name":"inject test 1","group":"957f84b5.bf5e","order":1,"width":0,"height":0,"passthru":true,"label":"inject test 1","tooltip":"","color":"","bgcolor":"","icon":"","payload":"25","payloadType":"num","topic":"Sense_1/sensor/DS18B1","x":190,"y":1360,"wires":[["8a47f012.43bf3"]]},{"id":"8a47f012.43bf3","type":"mqtt out","z":"28078c62.9890fc","name":"inject test 1","topic":"Sense_1/sensor/DS18B1","qos":"2","retain":"false","broker":"647362d8.d9d214","x":650,"y":1440,"wires":[]},{"id":"5870c22.057e73c","type":"cpu","z":"28078c62.9890fc","name":"CPU","msgCore":false,"msgOverall":true,"msgArray":false,"msgTemp":false,"x":530,"y":1940,"wires":[["33cfc9b.8b67b36"]]},{"id":"33cfc9b.8b67b36","type":"ui_chart","z":"28078c62.9890fc","name":"CPU Load","group":"e140c582.4168c8","order":4,"width":0,"height":0,"label":"CPU Load","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"step","nodata":"","dot":false,"ymin":"-2","ymax":"100","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":670,"y":1940,"wires":[[]]},{"id":"d8bb4c1a.1cf33","type":"configurable interval","z":"28078c62.9890fc","name":"Read CPU Usage Trigger","interval":"2","onstart":false,"do_enable":true,"msg":"1","showstatus":false,"unit":"seconds","statusformat":"YYYY-MM-D HH:mm:ss","x":350,"y":1940,"wires":[["5870c22.057e73c"]]},{"id":"5e829fb.6476ce","type":"random","z":"28078c62.9890fc","name":"Inject 2 Random","low":"10","high":"90","inte":"true","property":"payload","x":400,"y":1500,"wires":[["cb5e8732.8ba1a"]]},{"id":"cb5e8732.8ba1a","type":"mqtt out","z":"28078c62.9890fc","name":"inject test 2","topic":"Sense_1/sensor/DS18B2","qos":"2","retain":"false","broker":"647362d8.d9d214","x":650,"y":1500,"wires":[]},{"id":"bd7ffe87.0ab8a","type":"configurable interval","z":"28078c62.9890fc","name":"generator trigger 1","interval":"5","onstart":false,"do_enable":false,"msg":"1","showstatus":false,"unit":"seconds","statusformat":"YYYY-MM-D HH:mm:ss","x":130,"y":1540,"wires":[["b4b698cb.0b6688","3a19d962.ff7c46","4b07380f.956cd","a9ddde72.2193d8","9236285.62d81d8","5e829fb.6476ce","3df8ba28.0c4c26","932a92cf.ab1e"]]},{"id":"9236285.62d81d8","type":"random","z":"28078c62.9890fc","name":"Inject 1 Random","low":"10","high":"90","inte":"true","property":"payload","x":400,"y":1440,"wires":[["8a47f012.43bf3"]]},{"id":"3df8ba28.0c4c26","type":"random","z":"28078c62.9890fc","name":"Inject 3 Random","low":"10","high":"90","inte":"true","property":"payload","x":400,"y":1560,"wires":[["a3408327.48e89"]]},{"id":"a3408327.48e89","type":"mqtt out","z":"28078c62.9890fc","name":"inject test 3","topic":"Sense_1/sensor/DS18B3","qos":"2","retain":"false","broker":"647362d8.d9d214","x":650,"y":1560,"wires":[]},{"id":"932a92cf.ab1e","type":"random","z":"28078c62.9890fc","name":"Inject 4 Random","low":"10","high":"90","inte":"true","property":"payload","x":400,"y":1620,"wires":[["604ed26d.e12c7c"]]},{"id":"604ed26d.e12c7c","type":"mqtt out","z":"28078c62.9890fc","name":"inject test 4","topic":"Sense_1/sensor/DS18B4","qos":"2","retain":"false","broker":"647362d8.d9d214","x":650,"y":1620,"wires":[]},{"id":"75c501b0.2b94a","type":"inject","z":"28078c62.9890fc","name":"","topic":"","payload":"","payloadType":"date","repeat":"60","crontab":"","once":false,"onceDelay":0.1,"x":330,"y":2000,"wires":[["fa05999d.ba876"]]},{"id":"fa05999d.ba876","type":"moment","z":"28078c62.9890fc","name":"","topic":"","input":"","inputType":"msg","inTz":"Africa/Cairo","adjAmount":"2","adjType":"hours","adjDir":"add","format":"","locale":"en_SA","output":"","outputType":"msg","outTz":"Africa/Cairo","x":640,"y":2000,"wires":[[]]},{"id":"bc31ec52.5b7518","type":"join","z":"28078c62.9890fc","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"8","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":890,"y":740,"wires":[["3c9ab3a1.4229e4"]]},{"id":"8aab4ba0.abf1","type":"mqtt out","z":"28078c62.9890fc","name":"inject test 5","topic":"Sense_1/sensor/DHT221Temp","qos":"2","retain":"false","broker":"647362d8.d9d214","x":650,"y":1680,"wires":[]},{"id":"792c5362.f3b684","type":"mqtt out","z":"28078c62.9890fc","name":"inject test 6","topic":"Sense_1/sensor/DHT221Humi","qos":"2","retain":"false","broker":"647362d8.d9d214","x":650,"y":1740,"wires":[]},{"id":"3ccaba3c.556386","type":"mqtt out","z":"28078c62.9890fc","name":"inject test 7","topic":"Sense_1/sensor/DHT222Temp","qos":"2","retain":"false","broker":"647362d8.d9d214","x":650,"y":1800,"wires":[]},{"id":"149cbb34.9ebbb5","type":"mqtt out","z":"28078c62.9890fc","name":"inject test 8","topic":"Sense_1/sensor/DHT222Humi","qos":"2","retain":"false","broker":"647362d8.d9d214","x":650,"y":1860,"wires":[]},{"id":"3a19d962.ff7c46","type":"random","z":"28078c62.9890fc","name":"Inject 6 Random","low":"10","high":"90","inte":"true","property":"payload","x":400,"y":1740,"wires":[["792c5362.f3b684"]]},{"id":"b4b698cb.0b6688","type":"random","z":"28078c62.9890fc","name":"Inject 5 Random","low":"10","high":"90","inte":"true","property":"payload","x":400,"y":1680,"wires":[["8aab4ba0.abf1"]]},{"id":"4b07380f.956cd","type":"random","z":"28078c62.9890fc","name":"Inject 7 Random","low":"10","high":"90","inte":"true","property":"payload","x":400,"y":1800,"wires":[["3ccaba3c.556386"]]},{"id":"a9ddde72.2193d8","type":"random","z":"28078c62.9890fc","name":"Inject 8 Random","low":"10","high":"90","inte":"true","property":"payload","x":400,"y":1860,"wires":[["149cbb34.9ebbb5"]]},{"id":"61f48da7.67078c","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"DHT221\" : payload}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":360,"wires":[["bc31ec52.5b7518"]]},{"id":"d8a21ac.0cafd68","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"payload\" : payload}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":480,"wires":[["bc31ec52.5b7518"]]},{"id":"bf37d5d3.204878","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"payload\" : payload}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":600,"wires":[["bc31ec52.5b7518"]]},{"id":"df0ca26d.99e848","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"payload\" : payload}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":720,"wires":[["bc31ec52.5b7518"]]},{"id":"f7820516.8607a","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"payload\" : payload}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":880,"wires":[["bc31ec52.5b7518"]]},{"id":"cf183a1e.a5ed6","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"payload\" : payload}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":1040,"wires":[["bc31ec52.5b7518"]]},{"id":"6bafb392.257d94","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"payload\" : payload}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":1200,"wires":[["bc31ec52.5b7518"]]},{"id":"b436276b.bf366","type":"inject","z":"28078c62.9890fc","name":"1","topic":"","payload":"enabled","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":650,"y":1320,"wires":[["bd7ffe87.0ab8a"]]},{"id":"7b7ee0a0.bb4fd8","type":"inject","z":"28078c62.9890fc","name":"1","topic":"","payload":"disable","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":650,"y":1360,"wires":[["bd7ffe87.0ab8a"]]},{"id":"3c9ab3a1.4229e4","type":"debug","z":"28078c62.9890fc","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1050,"y":740,"wires":[]},{"id":"6247600a.a20038","type":"delay","z":"28078c62.9890fc","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":630,"y":200,"wires":[["d4d9756.4dd9808"]]},{"id":"e5729d09.e6655","type":"delay","z":"28078c62.9890fc","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":320,"wires":[["f30eb7d0.b5cd28"]]},{"id":"6e827ee5.1c78f8","type":"delay","z":"28078c62.9890fc","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":440,"wires":[["812fa40.3a183e"]]},{"id":"4a4a1ac6.4bad7c","type":"delay","z":"28078c62.9890fc","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":560,"wires":[["7160ea16.216a5c"]]},{"id":"f8df034e.5bb5b8","type":"delay","z":"28078c62.9890fc","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":680,"wires":[["dbca3552.edaaf"]]},{"id":"875ba7a0.7655d","type":"delay","z":"28078c62.9890fc","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":840,"wires":[["d79d8f9d.65bb6"]]},{"id":"62d6280e.f911b","type":"delay","z":"28078c62.9890fc","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":1000,"wires":[["9e742ab2.21e8e"]]},{"id":"d870c9f6.1fd61","type":"delay","z":"28078c62.9890fc","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"minute","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":630,"y":1160,"wires":[["37f89ece.9c889a"]]},{"id":"6a68dc62.c14084","type":"debug","z":"28078c62.9890fc","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":850,"y":260,"wires":[]},{"id":"43a4c02f.0aeb3","type":"influxdb out","z":"28078c62.9890fc","influxdb":"997a1055.eca848","name":"Sensory_Field1","measurement":"Sensor_1","precision":"","retentionPolicy":"","x":1400,"y":760,"wires":[]},{"id":"d4d9756.4dd9808","type":"json","z":"28078c62.9890fc","name":"","property":"payload","action":"","pretty":false,"x":830,"y":200,"wires":[["ceeb21e2.f06d28"]]},{"id":"1a701b62.3c767d","type":"debug","z":"28078c62.9890fc","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1250,"y":260,"wires":[]},{"id":"ceeb21e2.f06d28","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"DHT221_Temp","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"{\"DHT221_Temp\" : payload}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":200,"wires":[["1a701b62.3c767d","d29567d.9c14798"]]},{"id":"6e676e51.01b158","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"DHT221_Temp\" : payload}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":240,"wires":[["bc31ec52.5b7518","6a68dc62.c14084"]]},{"id":"d29567d.9c14798","type":"join","z":"28078c62.9890fc","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"8","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1230,"y":760,"wires":[["25061ade.bd16d6","43a4c02f.0aeb3"]]},{"id":"91e6e082.ec76b8","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"DHT221_Humi","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"{\"DHT221_Humi\" : payload}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":320,"wires":[["d29567d.9c14798"]]},{"id":"f30eb7d0.b5cd28","type":"json","z":"28078c62.9890fc","name":"","property":"payload","action":"","pretty":false,"x":830,"y":320,"wires":[["91e6e082.ec76b8"]]},{"id":"25061ade.bd16d6","type":"debug","z":"28078c62.9890fc","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1390,"y":660,"wires":[]},{"id":"812fa40.3a183e","type":"json","z":"28078c62.9890fc","name":"","property":"payload","action":"","pretty":false,"x":830,"y":440,"wires":[["2a9fb93.6a05046"]]},{"id":"7160ea16.216a5c","type":"json","z":"28078c62.9890fc","name":"","property":"payload","action":"","pretty":false,"x":830,"y":560,"wires":[["804354a6.c40cb"]]},{"id":"dbca3552.edaaf","type":"json","z":"28078c62.9890fc","name":"","property":"payload","action":"","pretty":false,"x":830,"y":680,"wires":[["b2c1fd29.e83f1"]]},{"id":"d79d8f9d.65bb6","type":"json","z":"28078c62.9890fc","name":"","property":"payload","action":"","pretty":false,"x":830,"y":840,"wires":[["44073e8b.3b963"]]},{"id":"9e742ab2.21e8e","type":"json","z":"28078c62.9890fc","name":"","property":"payload","action":"","pretty":false,"x":830,"y":1000,"wires":[["38b76a62.fd9efe"]]},{"id":"37f89ece.9c889a","type":"json","z":"28078c62.9890fc","name":"","property":"payload","action":"","pretty":false,"x":830,"y":1160,"wires":[["3e30a73d.bd4898"]]},{"id":"2a9fb93.6a05046","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"DHT222_Temp","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"{\"DHT222_Temp\" : payload}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":440,"wires":[["d29567d.9c14798"]]},{"id":"804354a6.c40cb","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"DHT222_Humi","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"{\"DHT222_Humi\" : payload}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":560,"wires":[["d29567d.9c14798"]]},{"id":"b2c1fd29.e83f1","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"DS18B201","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"{\"DS18B201\" : payload}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":680,"wires":[["d29567d.9c14798"]]},{"id":"44073e8b.3b963","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"DS18B202","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"{\"DS18B202\" : payload}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":840,"wires":[["d29567d.9c14798"]]},{"id":"38b76a62.fd9efe","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"DS18B203","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"{\"DS18B203\" : payload}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":1000,"wires":[["d29567d.9c14798"]]},{"id":"3e30a73d.bd4898","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"DS18B204","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"{\"DS18B204\" : payload}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":1160,"wires":[["d29567d.9c14798"]]},{"id":"b551b358.237c68","type":"ui_group","z":"","name":"DHT221","tab":"dd3b154c.f7d79","order":2,"disp":true,"width":"6","collapse":false},{"id":"957f84b5.bf5e","type":"ui_group","z":"","name":"Interact","tab":"dd3b154c.f7d79","order":7,"disp":true,"width":"6","collapse":false},{"id":"647362d8.d9d214","type":"mqtt-broker","z":"","name":"","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"12e2222f.a9959e","type":"ui_group","z":"","name":"DHT222","tab":"dd3b154c.f7d79","order":3,"disp":true,"width":"6","collapse":false},{"id":"cfa35f17.2887d","type":"ui_group","z":"","name":"charts","tab":"dd3b154c.f7d79","order":1,"disp":true,"width":"6","collapse":false},{"id":"f045d040.9cde18","type":"ui_group","z":"","name":"Probe's_1","tab":"dd3b154c.f7d79","order":4,"disp":true,"width":"6","collapse":false},{"id":"e41def3e.c1a48","type":"ui_group","z":"","name":"Probe's_2","tab":"dd3b154c.f7d79","order":5,"disp":true,"width":"6","collapse":false},{"id":"e140c582.4168c8","type":"ui_group","z":"","name":"Server Info","tab":"dd3b154c.f7d79","order":8,"disp":true,"width":"6","collapse":false},{"id":"997a1055.eca848","type":"influxdb","z":"","hostname":"127.0.0.1","port":"8086","protocol":"http","database":"Sensory_Field1","name":"","usetls":false,"tls":""},{"id":"dd3b154c.f7d79","type":"ui_tab","z":"","name":"Home","icon":"dashboard","order":1,"disabled":false,"hidden":false}] 

flows(3).json (25.6 KB)

We don't need to see a massive flow, show us what you see in a debug node showing what you are sending to influx.

Hi Colin,

Sorry man I am still new to this , I've included the debug after the join to the
influx db.

[{"DHT221_Temp":86},{"DHT221_Humi":52},{"DHT222_Temp":18},{"DHT222_Humi":73},{"DS18B201":32},{"DS18B202":22},{"DS18B203":30},{"DS18B204":55}]

Does this help?

Assuming that each of those keys (eg "DHT221_Temp") is a field name that you want to write the given value to then the bit of the information tab for the influxdb out node that you need to conform with is "If msg.payload is an object containing multiple properties, the fields will be written to the measurement". That means that you need msg.payload to contain not an array but
{"DHT221_Temp":86, "DHT221_Humi":52, ...}
The way I achieve that is to pass to the Join node each value with the field name in the topic, so for the first one the topic would contain "DHT221_Temp" with 86 in the payload. Then configure the Join node in key/value pair mode and it should produce what you want. Also I would not specify "after a number of message parts" but instead would say after a timeout following the last message of 15 seconds (or whatever is appropriate for you). The problem with using the number of message parts is that if one channel is not producing values for some reason then it might cause the Join node to wait forever and no data would be written at all.

Hi Colin,

Wanted to let you know this worked perfectly and I am now able to properly use my InfluxDB.
I am going to find a way to have some sort of "if" argument to get rid of "null" value since its not
recorded and doesn't get processed in the flow, Causes some errors.

Thanks for your help It was really appreciated.
Its really cool what can be done.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.