Good night and thank you.
My file coming from free office, I had to change the ";" with "," csv.
I just did the test and indeed it works very well! Thank you !
I always have a problem to display my url: I put a neoud exec which opens Chromium well but it does not embed in argument the url which is provided to it by your flow.
I tried to add "before and after the url in the database but it doesn't change anything.
An idea ?
PS: should I keep the node "set your correspondence table"?
[{"id":"8de410a.ae48df","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"f4c3f0a5.a5b5b","type":"debug","z":"8de410a.ae48df","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1390,"y":380,"wires":[]},{"id":"ed279091.31805","type":"inject","z":"8de410a.ae48df","name":"","topic":"","payload":"79","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":70,"y":340,"wires":[["8eb4aad3.2a3068"]]},{"id":"42c20eb7.0a028","type":"inject","z":"8de410a.ae48df","name":"","topic":"","payload":"85","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":70,"y":420,"wires":[["8eb4aad3.2a3068"]]},{"id":"d88cc8ee.f97588","type":"inject","z":"8de410a.ae48df","name":"","topic":"","payload":"81","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":70,"y":380,"wires":[["8eb4aad3.2a3068"]]},{"id":"3f64634b.166b9c","type":"function","z":"8de410a.ae48df","name":"send the number string with 1sec timeout","func":"input = msg.payload;\ninput = String(input); //just in case\nstorage = context.get(\"storage\"); // recall your storage\ntimer = context.get(\"timer\")||null; // recall last timer if exists\nclearTimeout(timer); // clear the last timer\ncontext.set(\"timer\",timer); // set it to be emtpty\nif (storage === undefined){\n storage = [];\n}\n\n\n//________________________________________________________________this is only called when sending the code\nrun = function mytimer(){ //define a function that does all the stuff when you want to send the code\n\n output = storage.join() //put all array indices together in one string\n output = output.replace(/,/gi,\"\") // get rid of the commas e.g. replace them by an empty string\n msg = {lookup:output} // important, in this case, this ist to be sent as msg.lookup, not msg.payload, otherwise the lookup function wont work \n node.send(msg)\n context.set(\"storage\",[]);\n return null;\n}\n\n//________________________________________________________________\n\n\ntimer = setTimeout(run,1000); // set your new timer (1sec is 1000 milliseconds)\nstorage.push(input); // append them to the end of your storage array\ncontext.set(\"storage\",storage); // set your new array back to storage\ncontext.set(\"timer\",timer); // store your new timer\nreturn null;","outputs":1,"noerr":0,"x":640,"y":400,"wires":[["6eaa0569.f52ccc","51ff4855.0025c8"]]},{"id":"8eb4aad3.2a3068","type":"function","z":"8de410a.ae48df","name":"replace keyboard input with numbers","func":"input = msg.payload;\ninput = String(input);\ncorrtable = flow.get(\"corrtable\");\nmsg.payload = corrtable.indexOf(input);\nreturn msg;","outputs":1,"noerr":0,"x":310,"y":380,"wires":[["3f64634b.166b9c"]]},{"id":"51ff4855.0025c8","type":"file in","z":"8de410a.ae48df","name":"","filename":"/home/pi/Desktop/collecteweb.csv","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":860,"y":460,"wires":[["5d429e3b.0fc89"]]},{"id":"5d429e3b.0fc89","type":"csv","z":"8de410a.ae48df","name":"","sep":",","hdrin":false,"hdrout":"","multi":"mult","ret":"\\n","temp":"","skip":"0","strings":false,"x":1110,"y":500,"wires":[["87591d18.42414","4bba6d45.464944","9402a22f.0c72a"]]},{"id":"87591d18.42414","type":"function","z":"8de410a.ae48df","name":"your lookup func","func":"lookup = msg.lookup;\nvar output;\ndata = msg.payload;\n\nfor (i=0;i<data.length;i++){\n if (data[i].col1 == lookup){\n output = data[i].col2;\n context.set(\"lookup\",null);\n msg = {payload:output};\n node.send(msg);\n }\n}\n\nreturn null;","outputs":1,"noerr":0,"x":1200,"y":380,"wires":[["f4c3f0a5.a5b5b"]]},{"id":"6eaa0569.f52ccc","type":"debug","z":"8de410a.ae48df","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"lookup","targetType":"msg","x":910,"y":340,"wires":[]},{"id":"4bba6d45.464944","type":"debug","z":"8de410a.ae48df","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1370,"y":500,"wires":[]},{"id":"16ebb068.e0a9f","type":"comment","z":"8de410a.ae48df","name":"","info":"the seperator has to be semikolon (;)\nwhenn using miltiple columns, not commas\nthats an excel-thing","x":810,"y":500,"wires":[]},{"id":"9662cf7d.fdb7d","type":"function","z":"8de410a.ae48df","d":true,"name":"set your correspondence table to flow","func":"corrtable = [];\nstartindex = 78;\nfor (i=0;i<10;i++){\n corrtable[i] = String(startindex);\n startindex++;\n}\nflow.set(\"corrtable\",corrtable);\nreturn null;\n\n/*\nelse if 0 is 88\n\ncorrtable = [];\ncorrtable[0] = 88;\nstartindex = 79;\n\nfor (i=1;i<10;i++){\n corrtable[i] = String(startindex);\n startindex++;\n}\n\nflow.set(\"corrtable\",corrtable);\nreturn null;\n*/","outputs":0,"noerr":0,"x":390,"y":560,"wires":[]},{"id":"6a5d14ee.4b5c9c","type":"inject","z":"8de410a.ae48df","d":true,"name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":"1","x":120,"y":560,"wires":[["9662cf7d.fdb7d"]]},{"id":"9402a22f.0c72a","type":"exec","z":"8de410a.ae48df","command":"DISPLAY=:0 chromium-browser","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":1380,"y":620,"wires":[[],[],[]]},{"id":"351125a7.78b12a","type":"rpi-keyboard","z":"8de410a.ae48df","name":"","x":70,"y":120,"wires":[["aa19dd12.1ef8b"]]},{"id":"aa19dd12.1ef8b","type":"calculate","z":"8de410a.ae48df","name":"","pauseType":"rate","calculation":"max","timeout":"500","timeoutUnits":"milliseconds","rate":"1","x":70,"y":180,"wires":[["8eb4aad3.2a3068"]]},{"id":"e5e2d079.a5e15","type":"inject","z":"8de410a.ae48df","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":480,"y":160,"wires":[["b3674e9.c1476b"]]},{"id":"b3674e9.c1476b","type":"exec","z":"8de410a.ae48df","command":"DISPLAY=:0 chromium-browser","addpay":true,"append":"https://www.symbio-system.com","useSpawn":"false","timer":"","oldrc":false,"name":"","x":740,"y":160,"wires":[[],[],[]]}]