# Is it Possible to Collect Datas with Visualizing with Nodered

**URL:** <https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818>\
**Category:** Dashboard\
**Created:** [9 October 2018 10:27 UTC](https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818 "2018-10-09T10:27:11Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![wtrk](https://avatars.discourse-cdn.com/v4/letter/w/97f17d/32.png) [@wtrk](https://discourse.nodered.org/u/wtrk)\
**Post date:** [9 October 2018 10:27 UTC](https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818/1 "2018-10-09T10:27:11Z")

</div>

I done something with dsm node and when the device shut down and up it is showing in dashboard.

My question is this is it possible to any statistic showing with nodered like acronis dashboard pict below?

 ![Untitled](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/a/a89d92df00a237391f111423a7066860e3eef46f.png)

---

<div class="post-metadata">

**Author:** ![JayDickson](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jaydickson/32/90592_2.png) [@JayDickson](https://discourse.nodered.org/u/JayDickson)\
**Post date:** [9 October 2018 12:39 UTC](https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818/2 "2018-10-09T12:39:23Z")

</div>

It is possible to do entirely within dashboard using the template node, but it'd be up to you to write the necessary javascript to get it looking just like this. If you need statistical analysis and visualization that you can navigate on demand, I'd recommend using Node-red to feed the data to some sort of database that can then be used by a visualization tool like grafana or graphite.

---

<div class="post-metadata">

**Author:** ![wtrk](https://avatars.discourse-cdn.com/v4/letter/w/97f17d/32.png) [@wtrk](https://discourse.nodered.org/u/wtrk)\
**Post date:** [9 October 2018 14:09 UTC](https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818/3 "2018-10-09T14:09:18Z")

</div>

Dear @JayDickson coluld you please share with me if you have database and javascript code examples. Now I dont have enogh experince and I dont know how can I create DB and feed it and then visualizing it

---

<div class="post-metadata">

**Author:** ![JayDickson](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jaydickson/32/90592_2.png) [@JayDickson](https://discourse.nodered.org/u/JayDickson)\
**Post date:** [9 October 2018 14:15 UTC](https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818/4 "2018-10-09T14:15:37Z")

</div>

That much background assistance is really getting outside the scope of this forum. My experience in doing javascript dashboard template based widgets is also extremely limited. If you're looking to build up some basic historical analysis and visualization skills you may be well served by doing some research/reading on the TIG stack, and once you get more comfortable with the base tools start experimenting with using node-red to feed it data and drive rule-based actions.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [10 October 2018 06:39 UTC](https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818/5 "2018-10-10T06:39:20Z")

</div>

> [@wtrk](#):
>
> coluld you please share with me if you have database and javascript code examples. Now I dont have enogh experince and I dont know how can I create DB and feed it and then visualizing it

Break the problem down into pieces and you will get through it in no time. Start by working out what data you need to capture in order to build up your dashboard. Then you will need to choose a database. SQLite is good for small-ish amounts of data or even just dumping some JSON to a file. But once you start to consider extended amounts of data, you need a management system and should look at MariaDB (for tabular type data), MongoDB or similar for JSON type data or InfluxDB for timeseries data.

InfluxDB is especially good for working with the Graphana dashboard tool as they work closely together.

---

<div class="post-metadata">

**Author:** ![wtrk](https://avatars.discourse-cdn.com/v4/letter/w/97f17d/32.png) [@wtrk](https://discourse.nodered.org/u/wtrk)\
**Post date:** [16 October 2018 11:54 UTC](https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818/6 "2018-10-16T11:54:28Z")

</div>

SO one more question, iit possible to make some maths in node red, for example plus / minus / times, or any other formulas can make it ?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [16 October 2018 13:57 UTC](https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818/7 "2018-10-16T13:57:44Z")

</div>

Yes, in a Function node you have full access to the javascript language to do anything like this you want. Also if all you want to do is scale and/or offset a value then you can use the Range node.

---

<div class="post-metadata">

**Author:** ![wtrk](https://avatars.discourse-cdn.com/v4/letter/w/97f17d/32.png) [@wtrk](https://discourse.nodered.org/u/wtrk)\
**Post date:** [16 October 2018 14:07 UTC](https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818/8 "2018-10-16T14:07:26Z")

</div>

Thank you very much for your reply.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [17 October 2018 15:24 UTC](https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818/9 "2018-10-17T15:24:44Z")

</div>

JSONata can also be used in conjunction with the change node.

---

<div class="post-metadata">

**Author:** ![wtrk](https://avatars.discourse-cdn.com/v4/letter/w/97f17d/32.png) [@wtrk](https://discourse.nodered.org/u/wtrk)\
**Post date:** [17 October 2018 17:00 UTC](https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818/10 "2018-10-17T17:00:34Z")

</div>

I need one more information, Is it possible to logging data ( temp and humidity) with time and hours. Also saving in RPI 3 sd card ?

It should save in .txt or csv file

like

Temp : 26C 17.10.2018- 21.33.22  
Humidity : 48% 17.10.2018- 21.33.22

Lazer 1 : Down 17.10.2018- 21.33.22  
Lazer 1 : UP 17.10.2018- 21.35.40

Thanks for your advance

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [17 October 2018 17:30 UTC](https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818/11 "2018-10-17T17:30:59Z")

</div>

You can write to a file using the file out node in append mode.

---

<div class="post-metadata">

**Author:** ![wtrk](https://avatars.discourse-cdn.com/v4/letter/w/97f17d/32.png) [@wtrk](https://discourse.nodered.org/u/wtrk)\
**Post date:** [17 October 2018 17:49 UTC](https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818/12 "2018-10-17T17:49:14Z")

</div>

> [@Colin](#):
>
> You can write to a file using the file out node in append mode.

Dear @Colin I already did it but the data saving format is so long and complicated.  
I just want to basic log files which is like I said before my post.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [17 October 2018 17:57 UTC](https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818/13 "2018-10-17T17:57:04Z")

</div>

The file node will write whatever you have in msg.payload to the file. If you want a particular format, you should get it into that format before passing to the file node.

Depending on your requirements, you could use a Function node, Template node, or maybe the CSV node.

---

<div class="post-metadata">

**Author:** ![wtrk](https://avatars.discourse-cdn.com/v4/letter/w/97f17d/32.png) [@wtrk](https://discourse.nodered.org/u/wtrk)\
**Post date:** [17 October 2018 18:18 UTC](https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818/14 "2018-10-17T18:18:41Z")

</div>

My node is this

```auto
[{"id":"4d41326.b19a5cc","type":"rpi-gpio in","z":"21cd0d76.58b4c2","name":"","pin":"40","intype":"tri","debounce":"25","read":false,"x":192.5,"y":43,"wires":[["87014208.fe969"]]},{"id":"87014208.fe969","type":"dsm","z":"21cd0d76.58b4c2","name":"DSM","sm_config":"{\n \"triggerInput\": \"payload\",\n \"currentState\": \"running\",\n \"states\": {\n \"stopped\": {\n \"0\": \"running\"\n },\n \"running\": {\n \"1\": \"stopped\"\n }\n },\n \"methods\": {\n \"onBeforeTransition\": \"msg.pyload = msg.payload.toString();\",\n \"0\": \"sta.fill='green';msg.background='green';msg.label='Lazer 1 Çalışıyor';\",\n \"1\": \"sta.fill='red';msg.background='red';msg.label='Lazer 1 Arızalı!!!';\"\n }\n}","x":358.5,"y":44,"wires":[["56a1f1b0.29ade"]]},{"id":"56a1f1b0.29ade","type":"ui_button","z":"21cd0d76.58b4c2","name":"Lazer 1","group":"31462797.454d08","order":0,"width":"6","height":"1","passthru":false,"label":"{{msg.label}}","color":"","bgcolor":"{{msg.background}}","icon":"","payload":"","payloadType":"date","topic":"","x":527.5,"y":44,"wires":[[]]},{"id":"c6dd9e15.51aa","type":"rpi-gpio in","z":"21cd0d76.58b4c2","name":"","pin":"38","intype":"tri","debounce":"25","read":false,"x":195,"y":88,"wires":[["b60728a8.434258"]]},{"id":"b60728a8.434258","type":"dsm","z":"21cd0d76.58b4c2","name":"DSM","sm_config":"{\n \"triggerInput\": \"payload\",\n \"currentState\": \"running\",\n \"states\": {\n \"stopped\": {\n \"0\": \"running\"\n },\n \"running\": {\n \"1\": \"stopped\"\n }\n },\n \"methods\": {\n \"onBeforeTransition\": \"msg.pyload = msg.payload.toString();\",\n \"0\": \"sta.fill='green';msg.background='green';msg.label='Lazer 2 Çalışıyor';\",\n \"1\": \"sta.fill='red';msg.background='red';msg.label='Lazer 2 Arızalı!!!';\"\n }\n}","x":361,"y":89,"wires":[["7a7ea53.8f4495c"]]},{"id":"7a7ea53.8f4495c","type":"ui_button","z":"21cd0d76.58b4c2","name":"Lazer 2","group":"31462797.454d08","order":0,"width":"6","height":"1","passthru":false,"label":"{{msg.label}}","color":"","bgcolor":"{{msg.background}}","icon":"","payload":"","payloadType":"str","topic":"","x":530,"y":89,"wires":[[]]},{"id":"a1a2894c.6a74b8","type":"rpi-gpio in","z":"21cd0d76.58b4c2","name":"","pin":"37","intype":"tri","debounce":"25","read":false,"x":193,"y":126,"wires":[["680c1e13.8aa17"]]},{"id":"680c1e13.8aa17","type":"dsm","z":"21cd0d76.58b4c2","name":"DSM","sm_config":"{\n \"triggerInput\": \"payload\",\n \"currentState\": \"running\",\n \"states\": {\n \"stopped\": {\n \"0\": \"running\"\n },\n \"running\": {\n \"1\": \"stopped\"\n }\n },\n \"methods\": {\n \"onBeforeTransition\": \"msg.pyload = msg.payload.toString();\",\n \"0\": \"sta.fill='green';msg.background='green';msg.label='Lazer 3 Çalışıyor';\",\n \"1\": \"sta.fill='red';msg.background='red';msg.label='Lazer 3 Arızalı!!!';\"\n }\n}","x":359,"y":127,"wires":[["220c3375.4107dc"]]},{"id":"220c3375.4107dc","type":"ui_button","z":"21cd0d76.58b4c2","name":"Lazer 3","group":"31462797.454d08","order":0,"width":"6","height":"1","passthru":false,"label":"{{msg.label}}","color":"","bgcolor":"{{msg.background}}","icon":"","payload":"","payloadType":"str","topic":"","x":528,"y":127,"wires":[[]]},{"id":"6956815.dc08d8","type":"rpi-gpio in","z":"21cd0d76.58b4c2","name":"","pin":"36","intype":"tri","debounce":"25","read":false,"x":191,"y":161,"wires":[["af3cc48f.88f988"]]},{"id":"af3cc48f.88f988","type":"dsm","z":"21cd0d76.58b4c2","name":"DSM","sm_config":"{\n \"triggerInput\": \"payload\",\n \"currentState\": \"running\",\n \"states\": {\n \"stopped\": {\n \"0\": \"running\"\n },\n \"running\": {\n \"1\": \"stopped\"\n }\n },\n \"methods\": {\n \"onBeforeTransition\": \"msg.pyload = msg.payload.toString();\",\n \"0\": \"sta.fill='green';msg.background='green';msg.label='Lazer 4 Çalışıyor';\",\n \"1\": \"sta.fill='red';msg.background='red';msg.label='Lazer 4 Arızalı!!!';\"\n }\n}","x":357,"y":162,"wires":[["3efe00d5.6d938"]]},{"id":"3efe00d5.6d938","type":"ui_button","z":"21cd0d76.58b4c2","name":"Lazer 4","group":"31462797.454d08","order":0,"width":"6","height":"1","passthru":false,"label":"{{msg.label}}","color":"","bgcolor":"{{msg.background}}","icon":"","payload":"","payloadType":"str","topic":"","x":526,"y":162,"wires":[[]]},{"id":"9e7211ec.5284a","type":"rpi-gpio in","z":"21cd0d76.58b4c2","name":"","pin":"35","intype":"tri","debounce":"25","read":false,"x":194,"y":199,"wires":[["fe45fc3d.f6d65"]]},{"id":"fe45fc3d.f6d65","type":"dsm","z":"21cd0d76.58b4c2","name":"DSM","sm_config":"{\n \"triggerInput\": \"payload\",\n \"currentState\": \"running\",\n \"states\": {\n \"stopped\": {\n \"0\": \"running\"\n },\n \"running\": {\n \"1\": \"stopped\"\n }\n },\n \"methods\": {\n \"onBeforeTransition\": \"msg.pyload = msg.payload.toString();\",\n \"0\": \"sta.fill='green';msg.background='green';msg.label='Lazer 5 Çalışıyor';\",\n \"1\": \"sta.fill='red';msg.background='red';msg.label='Lazer 5 Arızalı!!!';\"\n }\n}","x":360,"y":200,"wires":[["b5168542.d94388"]]},{"id":"b5168542.d94388","type":"ui_button","z":"21cd0d76.58b4c2","name":"Lazer 5","group":"31462797.454d08","order":0,"width":"6","height":"1","passthru":false,"label":"{{msg.label}}","color":"","bgcolor":"{{msg.background}}","icon":"","payload":"","payloadType":"str","topic":"","x":529,"y":200,"wires":[[]]},{"id":"f2bc90af.f7e3b","type":"rpi-gpio in","z":"21cd0d76.58b4c2","name":"","pin":"33","intype":"tri","debounce":"25","read":false,"x":193,"y":236,"wires":[["3dc2e801.9f8d78"]]},{"id":"3dc2e801.9f8d78","type":"dsm","z":"21cd0d76.58b4c2","name":"DSM","sm_config":"{\n \"triggerInput\": \"payload\",\n \"currentState\": \"running\",\n \"states\": {\n \"stopped\": {\n \"0\": \"running\"\n },\n \"running\": {\n \"1\": \"stopped\"\n }\n },\n \"methods\": {\n \"onBeforeTransition\": \"msg.pyload = msg.payload.toString();\",\n \"0\": \"sta.fill='green';msg.background='green';msg.label='Lazer 6 Çalışıyor';\",\n \"1\": \"sta.fill='red';msg.background='red';msg.label='Lazer 6 Arızalı!!!';\"\n }\n}","x":359,"y":237,"wires":[["382ec9e2.c998f6"]]},{"id":"382ec9e2.c998f6","type":"ui_button","z":"21cd0d76.58b4c2","name":"Lazer 6","group":"31462797.454d08","order":0,"width":"6","height":"1","passthru":false,"label":"{{msg.label}}","color":"","bgcolor":"{{msg.background}}","icon":"","payload":"","payloadType":"str","topic":"","x":528,"y":237,"wires":[[]]},{"id":"c57d4905.4685d8","type":"rpi-dht22","z":"21cd0d76.58b4c2","name":"","topic":"Dht11","dht":"11","pintype":"0","pin":4,"x":373.5,"y":452,"wires":[["64b07a62.7fd784","364a02f0.de262e","558d8401.c906dc"]]},{"id":"64b07a62.7fd784","type":"debug","z":"21cd0d76.58b4c2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":604,"y":417,"wires":[]},{"id":"a0242bfd.c9fe18","type":"rpi-gpio in","z":"21cd0d76.58b4c2","name":"","pin":"7","intype":"tri","debounce":"25","read":false,"x":180.5,"y":456,"wires":[["c57d4905.4685d8"]]},{"id":"a90ef1a9.d0e2f","type":"inject","z":"21cd0d76.58b4c2","name":"","topic":"","payload":"","payloadType":"date","repeat":"30","crontab":"","once":false,"onceDelay":0.1,"x":200,"y":422,"wires":[["c57d4905.4685d8"]]},{"id":"41c8816b.93176","type":"ui_chart","z":"21cd0d76.58b4c2","name":"","group":"8c43dcb3.40b64","order":0,"width":0,"height":0,"label":"Kabin İçi Nem","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"100","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":692.5,"y":509,"wires":[[],[]]},{"id":"970bd401.f11db8","type":"ui_chart","z":"21cd0d76.58b4c2","name":"","group":"8c43dcb3.40b64","order":0,"width":0,"height":0,"label":"Kabin İçi Sıcaklığı","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"0","ymax":"60","removeOlder":1,"removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":669.5,"y":353,"wires":[[],[]]},{"id":"558d8401.c906dc","type":"function","z":"21cd0d76.58b4c2","name":"Sıcaklık","func":"msg.payload = msg.payload\nreturn msg;","outputs":1,"noerr":0,"x":494.5,"y":356,"wires":[["970bd401.f11db8","92648a3e.0a99c8","2722de5a.9641f2"]]},{"id":"364a02f0.de262e","type":"function","z":"21cd0d76.58b4c2","name":"Nem","func":"msg.payload = msg.humidity\nreturn msg;","outputs":1,"noerr":0,"x":511.5,"y":486,"wires":[["41c8816b.93176","f9d557f9.2885a8","2722de5a.9641f2"]]},{"id":"92648a3e.0a99c8","type":"ui_gauge","z":"21cd0d76.58b4c2","name":"","group":"91e2c0f.7b7494","order":0,"width":0,"height":0,"gtype":"gage","title":"","label":"C","format":"{{value}}","min":0,"max":"50","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":662.5,"y":315,"wires":[]},{"id":"f9d557f9.2885a8","type":"ui_gauge","z":"21cd0d76.58b4c2","name":"","group":"8c43dcb3.40b64","order":0,"width":0,"height":0,"gtype":"gage","title":"","label":"%","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":663.5,"y":475,"wires":[]},{"id":"2722de5a.9641f2","type":"file","z":"21cd0d76.58b4c2","name":"","filename":"Deneme","appendNewline":true,"createDir":true,"overwriteFile":"false","x":955,"y":396,"wires":[[]]},{"id":"31462797.454d08","type":"ui_group","z":"","name":"Lazer Markalama Tesisi","tab":"30a9b4bc.f7640c","disp":true,"width":"6","collapse":false},{"id":"8c43dcb3.40b64","type":"ui_group","z":"","name":"Lazer Markalama Tesisi ","tab":"30a9b4bc.f7640c","disp":true,"width":"6","collapse":false},{"id":"91e2c0f.7b7494","type":"ui_group","z":"","name":"Lazer Markalama Tesisi ","tab":"30a9b4bc.f7640c","disp":true,"width":"6","collapse":false},{"id":"30a9b4bc.f7640c","type":"ui_tab","z":"","name":"Montaj Bantları","icon":"dashboard"}]

```

and it is saving data like only this

25.00  
48.00  
25.00  
48.00  
25.00  
48.00  
25.00  
48.00

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [17 October 2018 19:03 UTC](https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818/15 "2018-10-17T19:03:57Z")

</div>

Well looking at your flow, all you are sending to the file is the temperature and humidity values. If you want it to be something like  
Temp : 26C  
then in your function 'Sıcaklık' you will have to create that string sometning like this

```auto
msg.payload = "Temp : " + msg.payload;
return msg;

```

---

<div class="post-metadata">

**Author:** ![wtrk](https://avatars.discourse-cdn.com/v4/letter/w/97f17d/32.png) [@wtrk](https://discourse.nodered.org/u/wtrk)\
**Post date:** [18 October 2018 04:19 UTC](https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818/16 "2018-10-18T04:19:40Z")

</div>

Dear @zenofmud I Need just time after my sensors value. Just it is showing value in text file  
I need to log it like this. Thanks for your advance..

26C 17.10.2018-08.22  
47% 17.10.2018-08.22

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [18 October 2018 06:12 UTC](https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818/17 "2018-10-18T06:12:20Z")

</div>

> [@wtrk](#):
>
> 26C 17.10.2018-08.22  
> 47% 17.10.2018-08.22

One small thing for when you work this out. You will be a lot better off using an ISO/RFC format to store your date/time values. That will make them a lot easier to consume again.

`2018-10-17 17:10` would be a better format or a full format like `2018-10-17T17:10:00Z` is even better for processing though not quite so good for human viewing without processing. These formats are sortable and unambiguous. They can also be processed using standard JavaScript functions.

---

<div class="post-metadata">

**Author:** ![wtrk](https://avatars.discourse-cdn.com/v4/letter/w/97f17d/32.png) [@wtrk](https://discourse.nodered.org/u/wtrk)\
**Post date:** [18 October 2018 06:44 UTC](https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818/18 "2018-10-18T06:44:28Z")

</div>

> [@TotallyInformation](#):
>
> > [@wtrk](#):
> >
> > 26C 17.10.2018-08.22  
> > 47% 17.10.2018-08.22
> 
> One small thing for when you work this out. You will be a lot better off using an ISO/RFC format to store your date/time values. That will make them a lot easier to consume again.
> 
> `2018-10-17 17:10` would be a better format or a full format like `2018-10-17T17:10:00Z` is even better for processing though not quite so good for human viewing without processing. These formats are sortable and unambiguous. They can also be processed using standard JavaScript functions.

Thanks for your advance.  
How can I store my datas which is you are showing me, what kind of node or script code I have to use ?

help me please ?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [18 October 2018 07:56 UTC](https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818/19 "2018-10-18T07:56:09Z")

</div>

> [@wtrk](#):
>
> How can I store my data

That depends on what you want to do with the data. If you want to draw historical graphs then I highly recommend using Influxdb to store the data and Grafana to display it. There is an influxdb node that allows saving the data very easily.  
If you want to do this then first google for influxdb and grafana and spend some time reading about how they work. By some time I mean hours at least. Then look at the influxdb node to see how to store the values.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [18 October 2018 09:23 UTC](https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818/20 "2018-10-18T09:23:38Z")

</div>

Ok, because of the way you have your flow setup (i.e. you send the values to graphs AND the log) you are going to have to make a choice of how you want to add the time/date to the msg.payload.

First off, there is no reason to have the function node 'Sıcaklık' since all it does is `set msg.payload = msg.payload;` and you could use a change node in place of the 'Nem' function node.

BUT since you have them, you could expand them to return two msg's one containing just the value to send to the graphs and another where you add the timestamp after the value to send to the log.

You should read the documentation ([https://nodered.org/docs/writing-functions](https://nodered.org/docs/writing-functions)) and read about how to get the data/time in javascript ([https://www.w3schools.com/js/js\_dates.asp](https://www.w3schools.com/js/js_dates.asp)) and how to work with javascript string operators ([https://www.w3schools.com/js/js\_operators.asp](https://www.w3schools.com/js/js_operators.asp))

Once you understand all that, you should have no problem solving your issue your self and have increased your knowledge base.

[Next page](https://discourse.nodered.org/t/is-it-possible-to-collect-datas-with-visualizing-with-nodered/3818.md?page=2)
