i wanna to merge csv fils to be like this
jour | heure | capteur | conductivity | temp | capteur2 | level | capteur3| pression02
30/1/23 | 11:25:05 | 106 | 325 | 25 .1 | 108 | 85 | 101 | 4.5
30/1/23 | 11:25:18 | 106 | 360 | 25.6 | 108 | 89 | 101 | 4.8
30/1/23 | 11:25:18 | - | - | - | 108 | 89 | 101 | 4.8
30/1/23 | 11:25:30| 106 | 425 | 25.7 | 108 | 81 | 101 | 4.3
[
{
"id": "f6ed1294e1ce6e01",
"type": "inject",
"z": "1662802a7cd6b055",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "1",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 410,
"y": 420,
"wires": [
[
"fda448b8af022711"
]
]
},
{
"id": "d0e268426bdf303e",
"type": "function",
"z": "1662802a7cd6b055",
"name": "PORT 01 flow SM8100",
"func": "msg.payload = {\n \"code\": \"request\",\n \"cid\": 101,\n \"adr\": \"/iolinkmaster/port[1]/iolinkdevice/pdin/getdata\"\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 660,
"y": 560,
"wires": [
[
"ce9d246ba38e5bb0"
]
]
},
{
"id": "14c399a0f09c4d0b",
"type": "function",
"z": "1662802a7cd6b055",
"name": "PORT 2 NIVEAU LMT121",
"func": "msg.payload = {\n \"code\": \"request\",\n \"cid\": 102,\n \"adr\": \"/iolinkmaster/port[2]/iolinkdevice/pdin/getdata\"\n}\nmsg.topic = msg.payload\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 670,
"y": 500,
"wires": [
[
"99f560e177247730"
]
]
},
{
"id": "fda448b8af022711",
"type": "function",
"z": "1662802a7cd6b055",
"name": "PORT 6 conductivity LDL100",
"func": "msg.payload = {\n \"code\": \"request\",\n \"cid\": 106,\n \"adr\": \"/iolinkmaster/port[6]/iolinkdevice/pdin/getdata\"\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 680,
"y": 420,
"wires": [
[
"b4a63afb7309ede7"
]
]
},
{
"id": "b4a63afb7309ede7",
"type": "www-request",
"z": "1662802a7cd6b055",
"name": "",
"method": "POST",
"ret": "obj",
"url": "169.254.139.233",
"follow-redirects": true,
"persistent-http": true,
"tls": "",
"x": 950,
"y": 420,
"wires": [
[
"b00fd724ee163b93",
"c5a34b3b975f4022",
"1759ed2b1f84ac3b"
]
]
},
{
"id": "b00fd724ee163b93",
"type": "debug",
"z": "1662802a7cd6b055",
"name": "request info",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 970,
"y": 380,
"wires": []
},
{
"id": "52845433fe1fab9c",
"type": "function",
"z": "1662802a7cd6b055",
"name": "function7",
"func": "var flowData = 0;\n\n// Extract the hexadecimal string value from the msg.payload\nvar hexValue = msg.payload;\n\n// Convert the hexadecimal string to a decimal integer\nvar decimalValue = parseInt(hexValue, 16);\n\n// Convert the decimal value to flow rate in cubic meters per hour\nvar flowRate = decimalValue * 0.001;\n\n// Convert the flow rate from cubic meters per hour to liters per minute\nflowData = flowRate * 1000 / 60;\n\n// Assign the converted flow rate data to the msg.payload\nmsg.payload = flowData;\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1200,
"y": 560,
"wires": [
[
"b80c33255e8b473c",
"847e3f1027d9472b"
]
]
},
{
"id": "b80c33255e8b473c",
"type": "debug",
"z": "1662802a7cd6b055",
"name": "FLOW",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1430,
"y": 560,
"wires": []
},
{
"id": "ce9d246ba38e5bb0",
"type": "www-request",
"z": "1662802a7cd6b055",
"name": "",
"method": "POST",
"ret": "obj",
"url": "169.254.139.233",
"follow-redirects": true,
"persistent-http": true,
"tls": "",
"x": 970,
"y": 560,
"wires": [
[
"52845433fe1fab9c",
"b00fd724ee163b93"
]
]
},
{
"id": "8ef4792bdf327979",
"type": "inject",
"z": "1662802a7cd6b055",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "15",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 410,
"y": 560,
"wires": [
[]
]
},
{
"id": "99f560e177247730",
"type": "www-request",
"z": "1662802a7cd6b055",
"name": "",
"method": "POST",
"ret": "obj",
"url": "169.254.139.233",
"follow-redirects": true,
"persistent-http": true,
"tls": "",
"x": 970,
"y": 500,
"wires": [
[
"c3a6373937c12c2a"
]
]
},
{
"id": "c5a34b3b975f4022",
"type": "function",
"z": "1662802a7cd6b055",
"name": "",
"func": "var str = msg.payload.data.value;\nvar part1 = str.substr(0, 8);\nvar part2 = str.substr(16, 4);\nvar flowmeter = parseInt(part1, 16);\nvar Temp = parseInt(part2, 16) / 10;\nvar now = new Date();\n\n// now.setTime(now.getTime() - 1000*60*60*24*i);\nlet yyyy = now.getFullYear();\nlet mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nlet dd = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nlet hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nlet mmm = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nlet ss = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nlet time_jour = yyyy + \"/\" + mm + \"/\" + dd\nlet time_heure = hh + \":\" + mmm + \":\" + ss\nmsg.payload = { \"jour\": time_jour, \"heure\": time_heure, \"capteur\": msg.payload.cid, \"flow\": flowmeter, \"Temperature_C\": Temp };\nmsg.topic = {};\nmsg.topic.flow = flowmeter;\nmsg.topic.temp = Temp;\nreturn msg;\n\n\n\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1180,
"y": 420,
"wires": [
[
"aa98994857bc51d1",
"2751f202d7904aec"
]
]
},
{
"id": "aa98994857bc51d1",
"type": "debug",
"z": "1662802a7cd6b055",
"name": "conductivity",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1390,
"y": 420,
"wires": []
},
{
"id": "c3a6373937c12c2a",
"type": "function",
"z": "1662802a7cd6b055",
"name": "level 1",
"func": "var str = msg.payload.data.value;\nvar part1 = str.substr(0, 8);\nvar part2 = str.substr(16, 4);\nvar level=parseInt(part1,16);\nvar now = new Date();\n\n\n // now.setTime(now.getTime() - 1000*60*60*24*i);\n let yyyy = now.getFullYear();\n let mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\n let dd = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\n let hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\n let mmm = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\n let ss = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\n\nvar time_jour = yyyy+\"/\"+mm+\"/\"+dd\nlet time_heure = hh+\":\"+mmm+\":\"+ss\n\nmsg.payload = {\"jour\":time_jour,\"heure\":time_heure,\"capteur\":msg.payload.cid,\"Level\":level};\nmsg.topic = \"Level etat 1\"\n//let output = [];\n//let newfile = {\"filename\":\"\",\"pattern\":\"\"};\n // Generate out file name pattern\n//CC = \"AWS_D05E40\"+ yyyy + mm + dd + \".csv\";\n // Full filename with path \n//fname = \"E:\\DATAS\\AWS_D05E40\\\"+CC;\n// Shell script only needs the filename without the path\n// newfile.payload = newfile.fname;\n //output.push(fname);\n// return output;\n return msg;\n\n\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1190,
"y": 500,
"wires": [
[
"b76c9e651bc2d543",
"c499f8441654e8b7"
]
]
},
{
"id": "dd34f162cebc4c8f",
"type": "function",
"z": "1662802a7cd6b055",
"name": "PORT 5 NIVEAU LMT121",
"func": "msg.payload = {\n \"code\": \"request\",\n \"cid\": 105,\n \"adr\": \"/iolinkmaster/port[5]/iolinkdevice/pdin/getdata\"\n}\nmsg.topic = msg.payload\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 670,
"y": 460,
"wires": [
[
"bd6a6bcbeff45418"
]
]
},
{
"id": "bd6a6bcbeff45418",
"type": "www-request",
"z": "1662802a7cd6b055",
"name": "",
"method": "POST",
"ret": "obj",
"url": "169.254.139.233",
"follow-redirects": true,
"persistent-http": true,
"tls": "",
"x": 970,
"y": 460,
"wires": [
[
"168153b4657897c6",
"df7a3689e248ea34"
]
]
},
{
"id": "8c6c271c8049e13b",
"type": "inject",
"z": "1662802a7cd6b055",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "3",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 410,
"y": 460,
"wires": [
[
"dd34f162cebc4c8f"
]
]
},
{
"id": "168153b4657897c6",
"type": "function",
"z": "1662802a7cd6b055",
"name": "level 0",
"func": "var str = msg.payload.data.value;\nvar part1 = str.substr(0, 8);\nvar part2 = str.substr(16, 4);\nvar level=parseInt(part1,16)/16;\nvar now = new Date();\nlet yyyy = now.getFullYear();\nlet mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nlet dd = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nlet hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nlet mmm = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nlet ss = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nlet time_jour = yyyy + \"/\" + mm + \"/\" + dd\nlet time_heure = hh + \":\" + mmm + \":\" + ss\nmsg.payload = {\n \"jour\": time_jour, \"heure\": time_heure,\"capteur3\":msg.payload.cid,\"Level\":level};\nmsg.topic = \"Level etat 0\"\n//let newfile = {\"filename\":\"\",\"pattern\":\"\"};\n // Generate out file name pattern\n//CC = \"AWS_D05E40\"+ yyyy + mm + dd + \".csv\";\n // Full filename with path \n//fname = \"E:\\DATAS\\AWS_D05E40\\\"+CC;\n// Shell script only needs the filename without the path\n// newfile.payload = newfile.fname;\n //output.push(fname);\n// return output;\n return msg;\n\n\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1190,
"y": 460,
"wires": [
[
"c499f8441654e8b7",
"b76c9e651bc2d543",
"554c40d06cd22395"
]
]
},
{
"id": "c499f8441654e8b7",
"type": "debug",
"z": "1662802a7cd6b055",
"name": "LEVEL",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1400,
"y": 480,
"wires": []
},
{
"id": "f8507bac38ae9404",
"type": "function",
"z": "1662802a7cd6b055",
"name": "PT-3-PORT 5 PRESSION PV7023",
"func": "msg.payload = {\n \"code\": \"request\",\n \"cid\": 101,\n \"adr\": \"/iolinkmaster/port[1]/iolinkdevice/pdin/getdata\"\n}\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 700,
"y": 660,
"wires": [
[
"1f3e96d1408f14b8"
]
]
},
{
"id": "1f3e96d1408f14b8",
"type": "www-request",
"z": "1662802a7cd6b055",
"name": "",
"method": "POST",
"ret": "obj",
"url": "169.254.139.233",
"follow-redirects": true,
"persistent-http": true,
"tls": "",
"x": 970,
"y": 660,
"wires": [
[
"ee12e352c022f805"
]
]
},
{
"id": "b8c0e08c0144cc81",
"type": "inject",
"z": "1662802a7cd6b055",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "16",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 410,
"y": 660,
"wires": [
[
"f8507bac38ae9404"
]
]
},
{
"id": "ee12e352c022f805",
"type": "function",
"z": "1662802a7cd6b055",
"name": "pression02",
"func": "var str = msg.payload.data.value;\nvar part1 = str.substr(0, 8);\nvar part2 = str.substr(16, 4);\nvar pression02=parseInt(part1,16);\nvar now = new Date();\n\n\n // now.setTime(now.getTime() - 1000*60*60*24*i);\n let yyyy = now.getFullYear();\n let mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\n let dd = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\n let hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\n let mmm = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\n let ss = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\n\nvar time_jour = yyyy+\"/\"+mm+\"/\"+dd\nlet time_heure = hh+\":\"+mmm+\":\"+ss\n\nmsg.payload = { \"jour\": time_jour, \"heure\": time_heure,\"capteur\":msg.payload.cid,\"pression\":pression02};\nmsg.topic = \"pression\", pression02\n//let output = [];\n//let newfile = {\"filename\":\"\",\"pattern\":\"\"};\n // Generate out file name pattern\n//CC = \"AWS_D05E40\"+ yyyy + mm + dd + \".csv\";\n // Full filename with path \n//fname = \"E:\\DATAS\\AWS_D05E40\\\"+CC;\n// Shell script only needs the filename without the path\n// newfile.payload = newfile.fname;\n //output.push(fname);\n// return output;\n return msg;\n\n\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1170,
"y": 660,
"wires": [
[
"5b835f9f442d7544",
"e4fd5b1e72835f69",
"1c781ed18b22bb78"
]
]
},
{
"id": "5b835f9f442d7544",
"type": "debug",
"z": "1662802a7cd6b055",
"name": "pression02",
"active": false,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1410,
"y": 700,
"wires": []
},
{
"id": "e4fd5b1e72835f69",
"type": "ui_gauge",
"z": "1662802a7cd6b055",
"name": "",
"group": "9acac3b2428700ea",
"order": 2,
"width": 6,
"height": 5,
"gtype": "gage",
"title": "PT-03-PRESSUR ",
"label": "BAR",
"format": "{{value}}",
"min": 0,
"max": "40",
"colors": [
"#e6e600",
"#00b500",
"#e6b400"
],
"seg1": "",
"seg2": "",
"className": "",
"x": 1410,
"y": 660,
"wires": []
},
{
"id": "847e3f1027d9472b",
"type": "csv",
"z": "1662802a7cd6b055",
"name": "Data en csv",
"sep": ";",
"hdrin": true,
"hdrout": "none",
"multi": "one",
"ret": "\\r\\n",
"temp": "jour,heure, capteur, flow, Temperature_C",
"skip": "0",
"strings": true,
"include_empty_strings": "",
"include_null_values": "",
"x": 1230,
"y": 280,
"wires": [
[
"5421a5a254e2968d"
]
]
},
{
"id": "71a75d335c19731f",
"type": "debug",
"z": "1662802a7cd6b055",
"name": "read saved",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "payload",
"targetType": "msg",
"statusVal": "",
"statusType": "auto",
"x": 1670,
"y": 280,
"wires": []
},
{
"id": "5421a5a254e2968d",
"type": "file",
"z": "1662802a7cd6b055",
"name": "SM8100",
"filename": "C:\\Users\\issam\\Desktop\\Nouveau dossier\\node-red\\FLOW.csv",
"filenameType": "str",
"appendNewline": false,
"createDir": true,
"overwriteFile": "false",
"encoding": "none",
"x": 1420,
"y": 280,
"wires": [
[
"71a75d335c19731f"
]
]
},
{
"id": "3cd989f73e400353",
"type": "ui_text",
"z": "1662802a7cd6b055",
"group": "9acac3b2428700ea",
"order": 21,
"width": 0,
"height": 0,
"name": "",
"label": "LEVEL =",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"x": 1680,
"y": 460,
"wires": []
},
{
"id": "b76c9e651bc2d543",
"type": "change",
"z": "1662802a7cd6b055",
"name": "",
"rules": [
{
"t": "change",
"p": "topic",
"pt": "msg",
"from": "Level etat 0",
"fromt": "str",
"to": "LOW",
"tot": "str"
},
{
"t": "change",
"p": "payload",
"pt": "msg",
"from": "Level etat 1",
"fromt": "str",
"to": "HIGH",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1660,
"y": 500,
"wires": [
[
"3cd989f73e400353"
]
]
},
{
"id": "c5567f1cde1066bd",
"type": "ui_gauge",
"z": "1662802a7cd6b055",
"name": "",
"group": "9acac3b2428700ea",
"order": 3,
"width": "6",
"height": 5,
"gtype": "gage",
"title": "Feed Conductivity",
"label": "units",
"format": "{{value}}",
"min": 0,
"max": "3000",
"colors": [
"#00b500",
"#e6e600",
"#ca3838"
],
"seg1": "1400",
"seg2": "2500",
"className": "",
"x": 1430,
"y": 380,
"wires": []
},
{
"id": "2751f202d7904aec",
"type": "csv",
"z": "1662802a7cd6b055",
"name": "Data en csv",
"sep": ";",
"hdrin": true,
"hdrout": "none",
"multi": "one",
"ret": "\\r\\n",
"temp": "jour,heure, capteur, conductivity, Temperature_C",
"skip": "0",
"strings": true,
"include_empty_strings": "",
"include_null_values": "",
"x": 1230,
"y": 340,
"wires": [
[
"cbdc9370910f8409"
]
]
},
{
"id": "cbdc9370910f8409",
"type": "file",
"z": "1662802a7cd6b055",
"name": "Conductivity & Temp",
"filename": "C:\\Users\\issam\\Desktop\\Nouveau dossier\\node-red\\Conductivity&temp.csv",
"filenameType": "str",
"appendNewline": false,
"createDir": true,
"overwriteFile": "false",
"encoding": "none",
"x": 1440,
"y": 340,
"wires": [
[
"71a75d335c19731f"
]
]
},
{
"id": "1c781ed18b22bb78",
"type": "csv",
"z": "1662802a7cd6b055",
"name": "Data en csv",
"sep": ";",
"hdrin": true,
"hdrout": "none",
"multi": "one",
"ret": "\\r\\n",
"temp": "jour,heure, capteur, pression02",
"skip": "0",
"strings": true,
"include_empty_strings": "",
"include_null_values": "",
"x": 1330,
"y": 620,
"wires": [
[
"1f65afe01b79249a"
]
]
},
{
"id": "1f65afe01b79249a",
"type": "file",
"z": "1662802a7cd6b055",
"name": "pression 01 data",
"filename": "C:\\Users\\issam\\Desktop\\Nouveau dossier\\node-red\\D1.csv",
"filenameType": "str",
"appendNewline": false,
"createDir": true,
"overwriteFile": "false",
"encoding": "none",
"x": 1510,
"y": 620,
"wires": [
[
"71a75d335c19731f"
]
]
},
{
"id": "554c40d06cd22395",
"type": "csv",
"z": "1662802a7cd6b055",
"name": "Data en csv",
"sep": ";",
"hdrin": true,
"hdrout": "none",
"multi": "one",
"ret": "\\r\\n",
"temp": "jour,heure,capteur3, level",
"skip": "0",
"strings": true,
"include_empty_strings": "",
"include_null_values": "",
"x": 1250,
"y": 220,
"wires": [
[
"8e79c3eecd6eeae8"
]
]
},
{
"id": "8e79c3eecd6eeae8",
"type": "file",
"z": "1662802a7cd6b055",
"name": "LEVEL",
"filename": "C:\\Users\\issam\\Desktop\\Nouveau dossier\\node-red\\LEVEL.csv",
"filenameType": "str",
"appendNewline": false,
"createDir": true,
"overwriteFile": "false",
"encoding": "none",
"x": 1400,
"y": 220,
"wires": [
[
"71a75d335c19731f"
]
]
},
{
"id": "1759ed2b1f84ac3b",
"type": "function",
"z": "1662802a7cd6b055",
"name": "function 60",
"func": "var str = msg.payload.data.value;\nvar part1 = str.substr(0, 8);\nvar part2 = str.substr(16, 4);\nvar conductivity = parseInt(part1, 16);\nvar Temp = parseInt(part2, 16) / 10;\nvar now = new Date();\n\n// now.setTime(now.getTime() - 1000*60*60*24*i);\nlet yyyy = now.getFullYear();\nlet mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nlet dd = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nlet hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nlet mmm = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nlet ss = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nlet time_jour = yyyy + \"/\" + mm + \"/\" + dd\nlet time_heure = hh + \":\" + mmm + \":\" + ss\nmsg.payload = conductivity \n\nreturn msg;\n\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1325,
"y": 380,
"wires": [
[
"c5567f1cde1066bd"
]
],
"l": false
},
{
"id": "96b1ba3e4681371f",
"type": "ui_gauge",
"z": "1662802a7cd6b055",
"name": "",
"group": "9acac3b2428700ea",
"order": 3,
"width": "6",
"height": 5,
"gtype": "gage",
"title": "Level tank",
"label": "L/min",
"format": "{{value}}",
"min": 0,
"max": "3000",
"colors": [
"#fff700",
"#00b400",
"#ffbb00"
],
"seg1": "1400",
"seg2": "2500",
"className": "",
"x": 1410,
"y": 460,
"wires": []
},
{
"id": "df7a3689e248ea34",
"type": "function",
"z": "1662802a7cd6b055",
"name": "function 62",
"func": "var str = msg.payload.data.value;\nvar part1 = str.substr(0, 8);\nvar part2 = str.substr(16, 4);\nvar level = parseInt(part1, 16);\nvar now = new Date();\n\n// now.setTime(now.getTime() - 1000*60*60*24*i);\nlet yyyy = now.getFullYear();\nlet mm = now.getMonth() < 9 ? \"0\" + (now.getMonth() + 1) : (now.getMonth() + 1); // getMonth() is zero-based\nlet dd = now.getDate() < 10 ? \"0\" + now.getDate() : now.getDate();\nlet hh = now.getHours() < 10 ? \"0\" + now.getHours() : now.getHours();\nlet mmm = now.getMinutes() < 10 ? \"0\" + now.getMinutes() : now.getMinutes();\nlet ss = now.getSeconds() < 10 ? \"0\" + now.getSeconds() : now.getSeconds();\nlet time_jour = yyyy + \"/\" + mm + \"/\" + dd\nlet time_heure = hh + \":\" + mmm + \":\" + ss\nmsg.payload = level\n\nreturn msg;\n\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 1315,
"y": 460,
"wires": [
[
"96b1ba3e4681371f"
]
],
"l": false
},
{
"id": "16b96523c9e6600c",
"type": "comment",
"z": "1662802a7cd6b055",
"name": "set were u want to put your file \"csv\"",
"info": "",
"x": 1520,
"y": 180,
"wires": []
},
{
"id": "1a5c178c30251b26",
"type": "comment",
"z": "1662802a7cd6b055",
"name": "please check port if it is the correct one !",
"info": "",
"x": 690,
"y": 380,
"wires": []
},
{
"id": "9acac3b2428700ea",
"type": "ui_group",
"name": "sys osis",
"tab": "6dcd6da7b80584f0",
"order": 5,
"disp": true,
"width": "26",
"collapse": false,
"className": ""
},
{
"id": "6dcd6da7b80584f0",
"type": "ui_tab",
"name": "sys osis v3",
"icon": "dashboard",
"disabled": false,
"hidden": false
}
]