Aggregating sensor data with time stamp to save in excel

Hi All,

Glad to be here and part of the community. I had been getting stuck into Node Red for a few
weeks now but it seems I am now stuck. So I have 8 sensor values coming in from an Arduino
using MQTT. These are just values from the sensors with no other information.Just relevant
topics to identify the incoming data. I have the data coming into a join node and first noticed
that its not displaying all 8 topics/data on the debug. is there a problem here?

I had tried to somehow add timestamp to the join node before/after but I am at a loss.
Any advice too that you could give me in getting this data to excel and maybe how to
generate new files.

I had been watching Steve Cope on youtube who'd helped a lot.

Thanks all, Really appreciate any help given or pointing me in the right direction.

Welcome @Jonathan95,

An easy way to add a timestamp is by using the switch node with below configuration.

a-01

I jut can´t comment on below point without having a look at your flow. Do you mind sharing it ?

Hello @Andrei !,

Thank you I will edit my flow to test that out.

Sure I don't mind at all, I am not able to upload the Json but I will make a quote.
I am currently generating random data mimicking the Arduino.

[{"id":"28078c62.9890fc","type":"tab","label":"Flow 1","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":480,"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":360,"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":260,"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":360,"wires":[["9394f77d.13da9","bc31ec52.5b7518"]]},{"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":480,"wires":[["9b6960ea.9750b","bc31ec52.5b7518"]]},{"id":"ea1020e7.70a818","type":"mqtt out","z":"28078c62.9890fc","name":"Lamp","topic":"arduino_1/led","qos":"2","retain":"","broker":"647362d8.d9d214","x":610,"y":260,"wires":[]},{"id":"20139f14.9cc848","type":"mosca in","z":"28078c62.9890fc","mqtt_port":1883,"mqtt_ws_port":8080,"name":"","username":"","password":"","dburl":"","x":330,"y":160,"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":160,"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":720,"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":600,"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":600,"wires":[["dabda254.b89b38","bc31ec52.5b7518"]]},{"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":720,"wires":[["f5f6bb6e.476d2","bc31ec52.5b7518"]]},{"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":820,"wires":[["615e168b.69a2a8","16c0e3a8.d105a4","bc31ec52.5b7518"]]},{"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":880,"wires":[["590855a1.812444","be349034.bd826","bc31ec52.5b7518"]]},{"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":940,"wires":[["1845ee8b.392e81","e060b7e1.2fdb38","bc31ec52.5b7518"]]},{"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":1000,"wires":[["2e37575b.b781e","c310da84.ec7b9","bc31ec52.5b7518"]]},{"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":780,"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":1020,"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":860,"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":940,"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":820,"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":900,"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":1060,"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":980,"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":310,"y":1060,"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":1120,"wires":[]},{"id":"5870c22.057e73c","type":"cpu","z":"28078c62.9890fc","name":"CPU","msgCore":false,"msgOverall":true,"msgArray":false,"msgTemp":false,"x":530,"y":1680,"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":1680,"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":1680,"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":1180,"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":1180,"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":1220,"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":1120,"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":1240,"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":1240,"wires":[]},{"id":"932a92cf.ab1e","type":"random","z":"28078c62.9890fc","name":"Inject 4 Random","low":"10","high":"90","inte":"true","property":"payload","x":400,"y":1300,"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":1300,"wires":[]},{"id":"f61fed99.013d7","type":"debug","z":"28078c62.9890fc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1050,"y":660,"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":1740,"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":1740,"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":"4","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":630,"y":660,"wires":[["f61fed99.013d7"]]},{"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":1360,"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":1420,"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":1480,"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":1540,"wires":[]},{"id":"3a19d962.ff7c46","type":"random","z":"28078c62.9890fc","name":"Inject 6 Random","low":"10","high":"90","inte":"true","property":"payload","x":400,"y":1420,"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":1360,"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":1480,"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":1540,"wires":[["149cbb34.9ebbb5"]]},{"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":"dd3b154c.f7d79","type":"ui_tab","z":"","name":"Home","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

Nice flow, you are doing well.

The configuration window is telling the join node to group 4 messages and so this is what you see in the debug panel. Change it to 8 and see the difference.

r-02

Now, to add the timestamp to your flow the change node could be configured as below.

It uses a JSONata expression. Something a little bit more advanced but not highly complex for your use case.

and a testing flow could be:

[{"id":"6902adfa.22b954","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"2afbed3a.425482","type":"mqtt in","z":"6902adfa.22b954","name":"DHT221 Temp","topic":"Sense_1/sensor/DHT221Temp","qos":"2","datatype":"auto","broker":"2d8b1882.e0cef8","x":350,"y":300,"wires":[["3db5d5eb.38929a"]]},{"id":"52e095df.3ac7dc","type":"mqtt in","z":"6902adfa.22b954","name":"DHT221 Humi","topic":"Sense_1/sensor/DHT221Humi","qos":"2","datatype":"auto","broker":"2d8b1882.e0cef8","x":350,"y":360,"wires":[["be131bb1.9a08b8"]]},{"id":"62bacd6f.8f1444","type":"mosca in","z":"6902adfa.22b954","mqtt_port":1883,"mqtt_ws_port":8080,"name":"","username":"","password":"","dburl":"","x":370,"y":100,"wires":[["d579d461.ee0268"]]},{"id":"d579d461.ee0268","type":"debug","z":"6902adfa.22b954","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":610,"y":100,"wires":[]},{"id":"b3f4bcb4.6dcd4","type":"mqtt in","z":"6902adfa.22b954","name":"DHT222 Temp","topic":"Sense_1/sensor/DHT222Temp","qos":"2","datatype":"auto","broker":"2d8b1882.e0cef8","x":350,"y":420,"wires":[["57ef6e92.d0308"]]},{"id":"bab275a1.99d218","type":"mqtt in","z":"6902adfa.22b954","name":"DHT222 Humi","topic":"Sense_1/sensor/DHT222Humi","qos":"2","datatype":"auto","broker":"2d8b1882.e0cef8","x":350,"y":480,"wires":[["ff0f1c2d.e72ca"]]},{"id":"2dd6c649.f240da","type":"mqtt in","z":"6902adfa.22b954","name":"DS18B201","topic":"Sense_1/sensor/DS18B1","qos":"2","datatype":"auto","broker":"2d8b1882.e0cef8","x":340,"y":540,"wires":[["1c57eb6a.534345"]]},{"id":"3a72fd5a.f19712","type":"mqtt in","z":"6902adfa.22b954","name":"DS18B202","topic":"Sense_1/sensor/DS18B2","qos":"2","datatype":"auto","broker":"2d8b1882.e0cef8","x":340,"y":600,"wires":[["e7ca5009.3de37"]]},{"id":"39bd125c.f8880e","type":"mqtt in","z":"6902adfa.22b954","name":"DS18B203","topic":"Sense_1/sensor/DS18B3","qos":"2","datatype":"auto","broker":"2d8b1882.e0cef8","x":340,"y":660,"wires":[["e41ab23f.2acea"]]},{"id":"6d7590de.0786d","type":"mqtt in","z":"6902adfa.22b954","name":"DS18B204","topic":"Sense_1/sensor/DS18B4","qos":"2","datatype":"auto","broker":"2d8b1882.e0cef8","x":340,"y":720,"wires":[["1f5aae39.f54102"]]},{"id":"5852af35.e757e","type":"mqtt out","z":"6902adfa.22b954","name":"inject test 1","topic":"Sense_1/sensor/DS18B1","qos":"2","retain":"false","broker":"2d8b1882.e0cef8","x":870,"y":880,"wires":[]},{"id":"fb1349b9.025cb8","type":"random","z":"6902adfa.22b954","name":"Inject 2 Random","low":"10","high":"90","inte":"true","property":"payload","x":476.25000762939453,"y":942.5000076293945,"wires":[["127e3eaa.792dc1"]]},{"id":"e841e68c.20eeb8","type":"mqtt out","z":"6902adfa.22b954","name":"inject test 2","topic":"Sense_1/sensor/DS18B2","qos":"2","retain":"false","broker":"2d8b1882.e0cef8","x":870,"y":940,"wires":[]},{"id":"9b8c430f.fbe46","type":"random","z":"6902adfa.22b954","name":"Inject 1 Random","low":"10","high":"90","inte":"true","property":"payload","x":476.25000762939453,"y":882.5000076293945,"wires":[["4a76e949.c6db28"]]},{"id":"ebdaac3.60de15","type":"random","z":"6902adfa.22b954","name":"Inject 3 Random","low":"10","high":"90","inte":"true","property":"payload","x":476.25000762939453,"y":1002.5000076293945,"wires":[["41cba7fe.c08078"]]},{"id":"9b34361c.6ff658","type":"mqtt out","z":"6902adfa.22b954","name":"inject test 3","topic":"Sense_1/sensor/DS18B3","qos":"2","retain":"false","broker":"2d8b1882.e0cef8","x":870,"y":1000,"wires":[]},{"id":"373a4746.2fe8a8","type":"random","z":"6902adfa.22b954","name":"Inject 4 Random","low":"10","high":"90","inte":"true","property":"payload","x":476.25000762939453,"y":1062.5000076293945,"wires":[["ce04133b.95433"]]},{"id":"1e72bf65.dabda1","type":"mqtt out","z":"6902adfa.22b954","name":"inject test 4","topic":"Sense_1/sensor/DS18B4","qos":"2","retain":"false","broker":"2d8b1882.e0cef8","x":870,"y":1060,"wires":[]},{"id":"779452be.41e81c","type":"debug","z":"6902adfa.22b954","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":990,"y":500,"wires":[]},{"id":"e5e48aa.0d37e78","type":"join","z":"6902adfa.22b954","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":850,"y":500,"wires":[["779452be.41e81c"]]},{"id":"1f2788de.f3b4e7","type":"mqtt out","z":"6902adfa.22b954","name":"inject test 5","topic":"Sense_1/sensor/DHT221Temp","qos":"2","retain":"false","broker":"2d8b1882.e0cef8","x":870,"y":1120,"wires":[]},{"id":"ed036ff9.084af","type":"mqtt out","z":"6902adfa.22b954","name":"inject test 6","topic":"Sense_1/sensor/DHT221Humi","qos":"2","retain":"false","broker":"2d8b1882.e0cef8","x":870,"y":1180,"wires":[]},{"id":"718ff907.e53e18","type":"mqtt out","z":"6902adfa.22b954","name":"inject test 7","topic":"Sense_1/sensor/DHT222Temp","qos":"2","retain":"false","broker":"2d8b1882.e0cef8","x":870,"y":1240,"wires":[]},{"id":"f59d8ed2.2d0f5","type":"mqtt out","z":"6902adfa.22b954","name":"inject test 8","topic":"Sense_1/sensor/DHT222Humi","qos":"2","retain":"false","broker":"2d8b1882.e0cef8","x":870,"y":1300,"wires":[]},{"id":"712cd06.fadef3","type":"random","z":"6902adfa.22b954","name":"Inject 6 Random","low":"10","high":"90","inte":"true","property":"payload","x":476.25000762939453,"y":1182.5000076293945,"wires":[["bf6f2f7f.1f2ab"]]},{"id":"6cc5e93d.28e168","type":"random","z":"6902adfa.22b954","name":"Inject 5 Random","low":"10","high":"90","inte":"true","property":"payload","x":476.25000762939453,"y":1122.5000076293945,"wires":[["ce047083.c902b"]]},{"id":"fc42352f.2e0788","type":"random","z":"6902adfa.22b954","name":"Inject 7 Random","low":"10","high":"90","inte":"true","property":"payload","x":476.25000762939453,"y":1242.5000076293945,"wires":[["62a0d428.34c5ac"]]},{"id":"bc997e58.813ae","type":"random","z":"6902adfa.22b954","name":"Inject 8 Random","low":"10","high":"90","inte":"true","property":"payload","x":476.25000762939453,"y":1302.5000076293945,"wires":[["5356191d.dfc358"]]},{"id":"3068a98d.1fc626","type":"inject","z":"6902adfa.22b954","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":236.25000762939453,"y":1082.5000076293945,"wires":[["9b8c430f.fbe46","fb1349b9.025cb8","ebdaac3.60de15","373a4746.2fe8a8","6cc5e93d.28e168","712cd06.fadef3","fc42352f.2e0788","bc997e58.813ae"]]},{"id":"3db5d5eb.38929a","type":"change","z":"6902adfa.22b954","name":"","rules":[{"t":"set","p":"timestamp","pt":"msg","to":"","tot":"date"},{"t":"set","p":"payload","pt":"msg","to":"{\"payload\" : payload, \"timestamp\" : timestamp}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":300,"wires":[["e5e48aa.0d37e78"]]},{"id":"be131bb1.9a08b8","type":"change","z":"6902adfa.22b954","name":"","rules":[{"t":"set","p":"timestamp","pt":"msg","to":"","tot":"date"},{"t":"set","p":"payload","pt":"msg","to":"{\"payload\" : payload, \"timestamp\" : timestamp}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":360,"wires":[["e5e48aa.0d37e78"]]},{"id":"57ef6e92.d0308","type":"change","z":"6902adfa.22b954","name":"","rules":[{"t":"set","p":"timestamp","pt":"msg","to":"","tot":"date"},{"t":"set","p":"payload","pt":"msg","to":"{\"payload\" : payload, \"timestamp\" : timestamp}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":420,"wires":[["e5e48aa.0d37e78"]]},{"id":"ff0f1c2d.e72ca","type":"change","z":"6902adfa.22b954","name":"","rules":[{"t":"set","p":"timestamp","pt":"msg","to":"","tot":"date"},{"t":"set","p":"payload","pt":"msg","to":"{\"payload\" : payload, \"timestamp\" : timestamp}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":480,"wires":[["e5e48aa.0d37e78"]]},{"id":"1c57eb6a.534345","type":"change","z":"6902adfa.22b954","name":"","rules":[{"t":"set","p":"timestamp","pt":"msg","to":"","tot":"date"},{"t":"set","p":"payload","pt":"msg","to":"{\"payload\" : payload, \"timestamp\" : timestamp}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":540,"wires":[["e5e48aa.0d37e78"]]},{"id":"e7ca5009.3de37","type":"change","z":"6902adfa.22b954","name":"","rules":[{"t":"set","p":"timestamp","pt":"msg","to":"","tot":"date"},{"t":"set","p":"payload","pt":"msg","to":"{\"payload\" : payload, \"timestamp\" : timestamp}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":600,"wires":[["e5e48aa.0d37e78"]]},{"id":"e41ab23f.2acea","type":"change","z":"6902adfa.22b954","name":"","rules":[{"t":"set","p":"timestamp","pt":"msg","to":"","tot":"date"},{"t":"set","p":"payload","pt":"msg","to":"{\"payload\" : payload, \"timestamp\" : timestamp}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":660,"wires":[["e5e48aa.0d37e78"]]},{"id":"1f5aae39.f54102","type":"change","z":"6902adfa.22b954","name":"","rules":[{"t":"set","p":"timestamp","pt":"msg","to":"","tot":"date"},{"t":"set","p":"payload","pt":"msg","to":"{\"payload\" : payload, \"timestamp\" : timestamp}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":520,"y":720,"wires":[["e5e48aa.0d37e78"]]},{"id":"4a76e949.c6db28","type":"delay","z":"6902adfa.22b954","name":"","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"100","randomLast":"3000","randomUnits":"milliseconds","drop":false,"x":680,"y":880,"wires":[["5852af35.e757e"]]},{"id":"127e3eaa.792dc1","type":"delay","z":"6902adfa.22b954","name":"","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"100","randomLast":"3000","randomUnits":"milliseconds","drop":false,"x":680,"y":940,"wires":[["e841e68c.20eeb8"]]},{"id":"41cba7fe.c08078","type":"delay","z":"6902adfa.22b954","name":"","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"100","randomLast":"3000","randomUnits":"milliseconds","drop":false,"x":680,"y":1000,"wires":[["9b34361c.6ff658"]]},{"id":"ce04133b.95433","type":"delay","z":"6902adfa.22b954","name":"","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"100","randomLast":"3000","randomUnits":"milliseconds","drop":false,"x":680,"y":1060,"wires":[["1e72bf65.dabda1"]]},{"id":"ce047083.c902b","type":"delay","z":"6902adfa.22b954","name":"","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"100","randomLast":"3000","randomUnits":"milliseconds","drop":false,"x":680,"y":1120,"wires":[["1f2788de.f3b4e7"]]},{"id":"bf6f2f7f.1f2ab","type":"delay","z":"6902adfa.22b954","name":"","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"100","randomLast":"3000","randomUnits":"milliseconds","drop":false,"x":680,"y":1180,"wires":[["ed036ff9.084af"]]},{"id":"62a0d428.34c5ac","type":"delay","z":"6902adfa.22b954","name":"","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"100","randomLast":"3000","randomUnits":"milliseconds","drop":false,"x":680,"y":1240,"wires":[["718ff907.e53e18"]]},{"id":"5356191d.dfc358","type":"delay","z":"6902adfa.22b954","name":"","pauseType":"random","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"100","randomLast":"3000","randomUnits":"milliseconds","drop":false,"x":680,"y":1300,"wires":[["f59d8ed2.2d0f5"]]},{"id":"2d8b1882.e0cef8","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":""}]

As you want to save the joined data in excel it will be necessary to convert the object to CSV. If that is the case it would be easy to modify the flow.

@Andrei

Thanks its been an interesting Journey so far. But its really interesting and Node Red seems
to have so many possible features.

Arge no way, That feels like such a blind moment haha. Atleast it is easy to solve.

I have a 2nd flow for testing things I'd found whilst exploring Node Red. So ill add
this there and check it out. Would it be advised that I also begin learning Java to
better use the function node?

Yeah definitely intend to still save the incoming information in excel. I see some people
have used a local DB to save their data . I find it a little daunting to try get that right ,Is
it better to save the data to a local database then export from there or is it all good doing
it the way I am trying to implement ?

To convert the object to CSV try the CSV node :slight_smile: and then a file out node to append it to a file.
Is fine for the basic logging you are doing right now.
Databases are great when you want to start querying that data in more complex ways.

1 Like

@dceejay
I've since given it a try in my flow and the excel file seems to think there's something wrong with the
file and I cant open it? There is no error on Node-Red, I first accidentally didn't configure the columns
separation properly early but think i fixed that since debug isnt coming up with that error anymore.
interestingly im curious how it would pass the time into the csv as its not an object?

Thanks. Oh yes do I have to worry about file sizes or to manually change out the file?

If I make the last section like this

[{"id":"be17e4f1.74bed8","type":"debug","z":"9aa69cf7.d01cf","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1270,"y":700,"wires":[]},{"id":"55a5cc59.b04344","type":"join","z":"9aa69cf7.d01cf","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":630,"y":660,"wires":[["3aac5c83.4e9554"]]},{"id":"3aac5c83.4e9554","type":"change","z":"9aa69cf7.d01cf","name":"","rules":[{"t":"set","p":"payload.timestamp","pt":"msg","to":"","tot":"date"}],"action":"","property":"","from":"","to":"","reg":false,"x":880,"y":660,"wires":[["5738dd0a.e45354"]]},{"id":"5738dd0a.e45354","type":"csv","z":"9aa69cf7.d01cf","name":"","sep":",","hdrin":"","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/DHT221Humi,Sense_1/sensor/DHT222Temp,Sense_1/sensor/DHT222Humi","skip":"0","strings":true,"x":1090,"y":660,"wires":[["be17e4f1.74bed8","94b269e5.679c48"]]},{"id":"94b269e5.679c48","type":"file","z":"9aa69cf7.d01cf","name":"","filename":"/tmp/log.txt","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":1270,"y":660,"wires":[[]]}]

With this added to the flow it loses the first line topic/object names.
The CSV file has the names of the relevant columns . Does it not
print the values in the corresponding column?

Well it doesn't lose them as they are never there - it is appending data one line at a time so doesn't know when the file was started... or what is in there already... can either pre-create the empty file with just the headings in already - then go from there - or have an inject node on start that sends that same line once at start to the file... - but if you then restart you would get that "header" line sent again.

1 Like

Think the best would be to have the sheet formated with column names already.
seems to work for what i need . Here is my flow as of the moment with testing .

[{"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":440,"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":360,"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":360,"wires":[["9394f77d.13da9","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":440,"wires":[["9b6960ea.9750b","61f48da7.67078c"]]},{"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":600,"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":520,"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":520,"wires":[["dabda254.b89b38","d8a21ac.0cafd68"]]},{"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":600,"wires":[["f5f6bb6e.476d2","bf37d5d3.204878"]]},{"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":720,"wires":[["615e168b.69a2a8","16c0e3a8.d105a4","df0ca26d.99e848"]]},{"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"]]},{"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":960,"wires":[["1845ee8b.392e81","e060b7e1.2fdb38","cf183a1e.a5ed6"]]},{"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":1080,"wires":[["2e37575b.b781e","c310da84.ec7b9","6bafb392.257d94"]]},{"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":680,"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":1040,"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":920,"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":880,"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":1120,"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":1000,"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":1200,"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":1280,"wires":[]},{"id":"5870c22.057e73c","type":"cpu","z":"28078c62.9890fc","name":"CPU","msgCore":false,"msgOverall":true,"msgArray":false,"msgTemp":false,"x":530,"y":1780,"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":1780,"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":1780,"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":1340,"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":1340,"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":1380,"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":1280,"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":1400,"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":1400,"wires":[]},{"id":"932a92cf.ab1e","type":"random","z":"28078c62.9890fc","name":"Inject 4 Random","low":"10","high":"90","inte":"true","property":"payload","x":400,"y":1460,"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":1460,"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":1840,"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":1840,"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":[["a96ec3ec.7df9c","3c9ab3a1.4229e4","e0e42372.bb3868"]]},{"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":1520,"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":1580,"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":1640,"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":1700,"wires":[]},{"id":"3a19d962.ff7c46","type":"random","z":"28078c62.9890fc","name":"Inject 6 Random","low":"10","high":"90","inte":"true","property":"payload","x":400,"y":1580,"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":1520,"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":1640,"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":1700,"wires":[["149cbb34.9ebbb5"]]},{"id":"6e676e51.01b158","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"timestamp","pt":"msg","to":"","tot":"date"},{"t":"set","p":"payload","pt":"msg","to":"{\"payload\" : payload, \"timestamp\" : timestamp}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":400,"wires":[["bc31ec52.5b7518"]]},{"id":"61f48da7.67078c","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"timestamp","pt":"msg","to":"","tot":"date"},{"t":"set","p":"payload","pt":"msg","to":"{\"payload\" : payload, \"timestamp\" : timestamp}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":480,"wires":[["bc31ec52.5b7518"]]},{"id":"d8a21ac.0cafd68","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"timestamp","pt":"msg","to":"","tot":"date"},{"t":"set","p":"payload","pt":"msg","to":"{\"payload\" : payload, \"timestamp\" : timestamp}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":560,"wires":[["bc31ec52.5b7518"]]},{"id":"bf37d5d3.204878","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"timestamp","pt":"msg","to":"","tot":"date"},{"t":"set","p":"payload","pt":"msg","to":"{\"payload\" : payload, \"timestamp\" : timestamp}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":640,"wires":[["bc31ec52.5b7518"]]},{"id":"df0ca26d.99e848","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"timestamp","pt":"msg","to":"","tot":"date"},{"t":"set","p":"payload","pt":"msg","to":"{\"payload\" : payload, \"timestamp\" : timestamp}","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":"timestamp","pt":"msg","to":"","tot":"date"},{"t":"set","p":"payload","pt":"msg","to":"{\"payload\" : payload, \"timestamp\" : timestamp}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":840,"wires":[["bc31ec52.5b7518"]]},{"id":"cf183a1e.a5ed6","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"timestamp","pt":"msg","to":"","tot":"date"},{"t":"set","p":"payload","pt":"msg","to":"{\"payload\" : payload, \"timestamp\" : timestamp}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":960,"wires":[["bc31ec52.5b7518"]]},{"id":"6bafb392.257d94","type":"change","z":"28078c62.9890fc","name":"","rules":[{"t":"set","p":"timestamp","pt":"msg","to":"","tot":"date"},{"t":"set","p":"payload","pt":"msg","to":"{\"payload\" : payload, \"timestamp\" : timestamp}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":640,"y":1080,"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":650,"y":1160,"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":1200,"wires":[["bd7ffe87.0ab8a"]]},{"id":"3c9ab3a1.4229e4","type":"debug","z":"28078c62.9890fc","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1270,"y":820,"wires":[]},{"id":"1c500d6c.470d33","type":"debug","z":"28078c62.9890fc","name":"","active":true,"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/DHT221Humi,Sense_1/sensor/DHT222Temp,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":"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":"dd3b154c.f7d79","type":"ui_tab","z":"","name":"Home","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

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