Exporting data from ds18b20

Hello,
i have two ds18b20 sensors and want to export the data of my two temperature curves so i can put them into excel for example.
Is that possible?

Definitely. If you search the forum you'll find others that have already done this...

Is this by chance a school project? I saw an almost identical question about a week ago. Have you tried using the forum search already?

Yes. Can you help me with my problem? I tried a file node but it only saves my temperature oand not the time

Your ds18b20 won't send you the time, so you will need to add it yourself. You can either do that using javascript in a function node or you could look at using the node-red-contrib-moment node

When asking a question it's useful if you include what the actual question is in the title which doesn't mention time at all.

and where is my csv node saved?

you are going to have to explain what you mean.

Have you checked the info panel for each node yet? When you click a node the info panel is shown in the sidebar.
https://nodered.org/docs/user-guide/editor/sidebar/
For the csv node in the core library, it shows a filename property if I remember correctly. But at the very least it will explain the what and how of the usage. Including how/where the file is saved, and how to configure that.

'''
[{"id":"e56a2129.2d864","type":"tab","label":"Flow 3","disabled":false,"info":""},{"id":"26a3da89.2c0dc6","type":"inject","z":"e56a2129.2d864","name":"","topic":"","payload":"","payloadType":"date","repeat":"10","crontab":"","once":false,"onceDelay":0.1,"x":204.5,"y":119,"wires":[["57ca2195.166ab"]]},{"id":"57ca2195.166ab","type":"rpi-ds18b20","z":"e56a2129.2d864","topic":"","array":false,"name":"","x":515.5,"y":127,"wires":[["b49b0b8e.970aa8","cd4e41df.9aea4","68190ba5.39b314","2d9ea03e.e2e3c"]]},{"id":"68190ba5.39b314","type":"debug","z":"e56a2129.2d864","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1017.5,"y":177,"wires":},{"id":"b49b0b8e.970aa8","type":"ui_chart","z":"e56a2129.2d864","name":"","group":"ef2bf784.b388a8","order":0,"width":0,"height":0,"label":"Temperaturverlauf","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"80","removeOlder":"2","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":939.5,"y":384,"wires":[]},{"id":"c89041ec.d0efb","type":"ui_gauge","z":"e56a2129.2d864","name":"","group":"ef2bf784.b388a8","order":2,"width":0,"height":0,"gtype":"gage","title":"Innentemperatur","label":"Grad Celsius","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":928.5,"y":428,"wires":},{"id":"22c9403e.ae8c6","type":"ui_gauge","z":"e56a2129.2d864","name":"","group":"ef2bf784.b388a8","order":2,"width":0,"height":0,"gtype":"gage","title":"Außentemperatur","label":"Grad Celsius","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":938.5,"y":474,"wires":},{"id":"cd4e41df.9aea4","type":"switch","z":"e56a2129.2d864","name":"","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"8A1579970203","vt":"str"},{"t":"eq","v":"AAF8E0521401","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":728,"y":450,"wires":[["c89041ec.d0efb"],["22c9403e.ae8c6"]]},{"id":"2d9ea03e.e2e3c","type":"file","z":"e56a2129.2d864","name":"","filename":"test.csv","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":1020,"y":237,"wires":[]},{"id":"ef2bf784.b388a8","type":"ui_group","z":"","name":"Default","tab":"f5b991a8.313f3","disp":true,"width":"6","collapse":false},{"id":"f5b991a8.313f3","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]
'''
I try to get a csv file with three columns. In the first should be the time, in the second temp. 1 and in the third temp. 2

Unfortunately your flow isn't currently importable.Please read the following post How to share code or flow json and then edit the above message.

[{"id":"e56a2129.2d864","type":"tab","label":"Flow 3","disabled":false,"info":""},{"id":"26a3da89.2c0dc6","type":"inject","z":"e56a2129.2d864","name":"","topic":"","payload":"","payloadType":"date","repeat":"10","crontab":"","once":false,"onceDelay":0.1,"x":204.5,"y":119,"wires":[["57ca2195.166ab"]]},{"id":"57ca2195.166ab","type":"rpi-ds18b20","z":"e56a2129.2d864","topic":"","array":false,"name":"","x":515.5,"y":127,"wires":[["b49b0b8e.970aa8","cd4e41df.9aea4","68190ba5.39b314","2d9ea03e.e2e3c"]]},{"id":"68190ba5.39b314","type":"debug","z":"e56a2129.2d864","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1017.5,"y":177,"wires":[]},{"id":"b49b0b8e.970aa8","type":"ui_chart","z":"e56a2129.2d864","name":"","group":"ef2bf784.b388a8","order":0,"width":0,"height":0,"label":"Temperaturverlauf","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"80","removeOlder":"2","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":939.5,"y":384,"wires":[[]]},{"id":"c89041ec.d0efb","type":"ui_gauge","z":"e56a2129.2d864","name":"","group":"ef2bf784.b388a8","order":2,"width":0,"height":0,"gtype":"gage","title":"Innentemperatur","label":"Grad Celsius","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":928.5,"y":428,"wires":[]},{"id":"22c9403e.ae8c6","type":"ui_gauge","z":"e56a2129.2d864","name":"","group":"ef2bf784.b388a8","order":2,"width":0,"height":0,"gtype":"gage","title":"Außentemperatur","label":"Grad Celsius","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":938.5,"y":474,"wires":[]},{"id":"cd4e41df.9aea4","type":"switch","z":"e56a2129.2d864","name":"","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"8A1579970203","vt":"str"},{"t":"eq","v":"AAF8E0521401","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":728,"y":450,"wires":[["c89041ec.d0efb"],["22c9403e.ae8c6"]]},{"id":"2d9ea03e.e2e3c","type":"file","z":"e56a2129.2d864","name":"","filename":"test.csv","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":1020,"y":237,"wires":[[]]},{"id":"ef2bf784.b388a8","type":"ui_group","z":"","name":"Default","tab":"f5b991a8.313f3","disp":true,"width":"6","collapse":false},{"id":"f5b991a8.313f3","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

now?

OK, so you can get the time from the timestamp, see earlier post if you want it formatted nicer.
You need to understand the data format of the message coming out of your ds18 node.

Try also reading the info panel for the file node...

i already read it. I get every ten secs the temperature of both sensors in my file. but how can i get the time?

As I already said

Good luck with your project

and how does the java script looks like

I'd recommend using the moment node, honestly. It's an excellent contrib node. If a javascript style timestamp is sufficient (as in you don't need it to be human readable) you can also pass the message through a change node set to set your desired property to a timestamp.

Okay i just installed the moment node. But how i have to connect it with my other nodes?

Play with it some. Do some searching on here to see how others have used it.

1 Like

Same thing applies again. Start with the info panel, then do a forum search if more help is needed.

i nearly solved the problem. I only have one question. How can i get my 3 values in 3 different columns in my csv file?