Hey there,
Ive kinda jumped in to this , Not entirely knowing what im doing haha. But getting there.
I am looking to export my sensor data to InfluxDB but its not behaving as expected from
reading this post and my understanding of whats happening. I too am trying to
aggregate all my MQTT Data and place it in InfluxDB. Prior to this post I was going to make
separate databases just for each MQTT node. But this is far better to have it under one
database with the measurement being that sensor that supplies these topics..
I have included an attached copy of my flow. Please note I am new to this and still trying to
learn and experiment.
[{"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","2c470efd.7b9f5a","d4d9756.4dd9808"]]},{"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":"f61fed99.013d7","type":"debug","z":"28078c62.9890fc","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1270,"y":780,"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":"a96ec3ec.7df9c","type":"csv","z":"28078c62.9890fc","name":"CSV Node","sep":",","hdrin":true,"hdrout":true,"multi":"one","ret":"\\n","temp":"Sense_1/sensor/DHT221Temp,Sense_1/sensor/DHT221Humi,Sense_1/sensor/DHT222Temp,Sense_1/sensor/DHT222Humi,Sense_1/sensor/DS18B1,Sense_1/sensor/DS18B2,Sense_1/sensor/DS18B3,Sense_1/sensor/DS18B4","skip":"0","strings":true,"x":1090,"y":740,"wires":[["25cf4f08.0d675","f61fed99.013d7"]]},{"id":"25cf4f08.0d675","type":"file","z":"28078c62.9890fc","name":"","filename":"D:\\Data\\Progs\\OneDrive\\Arduino Mega\\new test1.csv","appendNewline":false,"createDir":false,"overwriteFile":"false","encoding":"none","x":1400,"y":740,"wires":[[]]},{"id":"b436276b.bf366","type":"inject","z":"28078c62.9890fc","name":"1","topic":"","payload":"enabled","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":630,"y":1300,"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":630,"y":1340,"wires":[["bd7ffe87.0ab8a"]]},{"id":"3c9ab3a1.4229e4","type":"debug","z":"28078c62.9890fc","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1110,"y":660,"wires":[]},{"id":"1c500d6c.470d33","type":"debug","z":"28078c62.9890fc","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1270,"y":960,"wires":[]},{"id":"e0e42372.bb3868","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"payload.timestamp","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":920,"y":920,"wires":[["fdfc27f0.214f1"]]},{"id":"fdfc27f0.214f1","type":"csv","z":"28078c62.9890fc","name":"","sep":",","hdrin":false,"hdrout":"","multi":"one","ret":"\\n","temp":"timestamp,Sense_1/sensor/DS18B1,Sense_1/sensor/DS18B2,Sense_1/sensor/DS18B3,Sense_1/sensor/DS18B4,Sense_1/sensor/DHT221Temp,Sense_1/sensor/DHT222Temp,Sense_1/sensor/DHT221Humi,Sense_1/sensor/DHT222Humi","skip":"1","strings":true,"x":1110,"y":920,"wires":[["1c500d6c.470d33","5e28c59d.bea594","403ded2e.3c1404"]]},{"id":"5e28c59d.bea594","type":"file","z":"28078c62.9890fc","name":"","filename":"D:\\Data\\Progs\\OneDrive\\Arduino Mega\\log.txt","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":1380,"y":920,"wires":[[]]},{"id":"403ded2e.3c1404","type":"file","z":"28078c62.9890fc","name":"","filename":"D:\\Data\\Progs\\OneDrive\\Arduino Mega\\new test2.csv","appendNewline":false,"createDir":false,"overwriteFile":"false","encoding":"none","x":1400,"y":880,"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":[[]]},{"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":[[]]},{"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":[[]]},{"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":[[]]},{"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":[[]]},{"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":[[]]},{"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":[[]]},{"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":[[]]},{"id":"92c2e55a.ebf19","type":"influxdb out","z":"28078c62.9890fc","influxdb":"386f5ba6.05766c","name":"DHT221_Temp DB","measurement":"DHT221T.","precision":"","retentionPolicy":"","x":1110,"y":540,"wires":[]},{"id":"a01a746b.edaae8","type":"influxdb out","z":"28078c62.9890fc","influxdb":"eae1257.a4e17d8","name":"DHT221_Humi DB","measurement":"DHT221H.","precision":"","retentionPolicy":"","x":1110,"y":580,"wires":[]},{"id":"6a68dc62.c14084","type":"debug","z":"28078c62.9890fc","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1190,"y":320,"wires":[]},{"id":"43a4c02f.0aeb3","type":"influxdb out","z":"28078c62.9890fc","influxdb":"997a1055.eca848","name":"Sensory_Field1 DB","measurement":"Sensor_1","precision":"","retentionPolicy":"","x":1110,"y":500,"wires":[]},{"id":"d4d9756.4dd9808","type":"json","z":"28078c62.9890fc","name":"","property":"payload","action":"","pretty":false,"x":610,"y":240,"wires":[["604917b9.7dcdc8"]]},{"id":"1a701b62.3c767d","type":"debug","z":"28078c62.9890fc","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1050,"y":140,"wires":[]},{"id":"2c470efd.7b9f5a","type":"debug","z":"28078c62.9890fc","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":470,"y":120,"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":840,"y":140,"wires":[["1a701b62.3c767d"]]},{"id":"1a06b381.b17664","type":"debug","z":"28078c62.9890fc","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1010,"y":240,"wires":[]},{"id":"604917b9.7dcdc8","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"DHT221_Temp","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":240,"wires":[["1a06b381.b17664","dd9ce2c7.413d1"]]},{"id":"dd9ce2c7.413d1","type":"function","z":"28078c62.9890fc","name":"Amalgamate Sensory data","func":"context.data = context.data || {};\n\nswitch (msg.topic) {\n\ncase \"DHT221_Temp\":\n context.data.DHT221_Temp = msg.payload;\n msg = null;\n break;\ncase \"bulk\":\n context.data.bulk = msg.payload;\n msg = null;\n break;\ncase \"absorption\":\n context.data.absorption = msg.payload;\n msg = null;\n break;\ncase \"float\":\n context.data.float = msg.payload;\n msg = null;\n break;\ncase \"inverter\":\n context.data.inverter = msg.payload;\n msg = null;\n break;\ncase \"overload\":\n context.data.overload = msg.payload;\n msg = null;\n break;\ncase \"lowbattery\":\n context.data.lowbattery = msg.payload;\n msg = null;\n break;\ncase \"temperature\":\n context.data.temperature = msg.payload;\n msg = null;\n break;\n\ndefault:\n msg = null;\n\tbreak;\n\n}\n\nif(context.data.mains !== null && context.data.bulk !== null && context.data.absorption !== null && context.data.float !== null && context.data.inverter !== null && context.data.overload !== null && context.data.lowbattery !== null && context.data.temperature !== null ) {\n\tmsg2 = {};\nmsg2.payload = {\n mains: context.data.mains,\n bulk: context.data.bulk,\n absorption: context.data.absorption,\n float: context.data.float,\n inverter: context.data.inverter,\n overload: context.data.overload,\n lowbattery: context.data.lowbattery,\n temperature: context.data.temperature\n}\n;\n\ncontext.data=null;\n\treturn msg2;\n}","outputs":1,"noerr":0,"x":960,"y":320,"wires":[["6a68dc62.c14084"]]},{"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":"386f5ba6.05766c","type":"influxdb","z":"","hostname":"127.0.0.1","port":"8086","protocol":"http","database":"DHT221_Temp","name":"","usetls":false,"tls":""},{"id":"eae1257.a4e17d8","type":"influxdb","z":"","hostname":"127.0.0.1","port":"8086","protocol":"http","database":"DHT221_Humi","name":"","usetls":false,"tls":""},{"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.json (26.4 KB)