Good day everyone,
i dont know where is false that i cannot show infos in DB in my tempelate.
(i explain that i want to insert my csv.file to DB and then show Infos from DB)
[{"id":"68a0a347.56efbc","type":"tab","label":"Flow 6","disabled":false,"info":""},{"id":"7ba892f.dae406c","type":"debug","z":"68a0a347.56efbc","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":970,"y":200,"wires":[]},{"id":"24833298.0ddbae","type":"inject","z":"68a0a347.56efbc","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":200,"wires":[["8668a74b.1bb218"]]},{"id":"8668a74b.1bb218","type":"file in","z":"68a0a347.56efbc","name":"csvfile","filename":"C:\\Users\\samira.talebi\\example\\chart test80.csv","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":510,"y":80,"wires":[["a534d010.18f43"]]},{"id":"a534d010.18f43","type":"csv","z":"68a0a347.56efbc","name":"","sep":",","hdrin":true,"hdrout":"all","multi":"one","ret":"\\n","temp":"Data,Time,Temperature","skip":"0","strings":true,"include_empty_strings":"","include_null_values":true,"x":590,"y":140,"wires":[["7ba892f.dae406c","75faf199.d8861"]]},{"id":"98c15b4d.bcec28","type":"inject","z":"68a0a347.56efbc","name":"create database table","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"CREATE TABLE STAR ( DATA TXT NOT NULL , TIME TXT NOT NULL, TEMPERATURE FLOAT NOT NULL)","payload":"","payloadType":"date","x":260,"y":320,"wires":[["219cb6f3.e7708a"]]},{"id":"219cb6f3.e7708a","type":"sqlite","z":"68a0a347.56efbc","mydb":"b4b8d6bc.ef48c8","sqlquery":"msg.topic","sql":"INSERT or IGNORE INTO STAR (Data, Time, Temperature) VALUES ($Data, $Time, $Temperature)","name":"firstDB","x":710,"y":380,"wires":[["7fb4e458.255d3c"]]},{"id":"75faf199.d8861","type":"function","z":"68a0a347.56efbc","name":"firstDB","func":" var payload=msg.payload;\n\n var Data= payload[\"Data\"];\n var Time= payload[\"Time\"];\n var Temperature= payload[\"Temperature\"];\n node.warn( [Data, Time, Temperature] ); //check debug sidebar\nquery= \" values (\"+ \"\\'\"+Data+\"\\',\"+\"\\'\"+Time+\"\\',\"+\"\\'\"+Temperature+\"\\'\" +\")\";\nmsg.topic=\"INSERT INTO STAR (DATA, TIME, TEMPERATURE)\"+ query ;\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":490,"y":260,"wires":[["3ceab86e.0c6678","219cb6f3.e7708a"]]},{"id":"7fb4e458.255d3c","type":"debug","z":"68a0a347.56efbc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":970,"y":280,"wires":[]},{"id":"3ceab86e.0c6678","type":"debug","z":"68a0a347.56efbc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":970,"y":400,"wires":[]},{"id":"918c6da6.1294","type":"inject","z":"68a0a347.56efbc","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"7","crontab":"","once":false,"onceDelay":0.1,"topic":"SELECT * FROM STAR ORDER BY TIME ASC LIMIT 10;","payload":"","payloadType":"date","x":450,"y":560,"wires":[["732661bd.0e9f6"]]},{"id":"732661bd.0e9f6","type":"sqlite","z":"68a0a347.56efbc","mydb":"b4b8d6bc.ef48c8","sqlquery":"msg.topic","sql":"","name":"firstDB","x":630,"y":540,"wires":[["25509790.d08518","1b59f45a.e0930c"]]},{"id":"25509790.d08518","type":"ui_template","z":"68a0a347.56efbc","group":"bbf9c10f.b099","name":"","order":3,"width":0,"height":0,"format":"<style>\n.table\n{\n height:600px;\n width:450px;\n background:lightblue;\n}\n</style>\n<div class=\"table\">\n\n\n<table style=\"width:60%\">\n <tr>\n <th>Index</th> \n <th>Data</th>\n <th>Time</th> \n <th>Temperature</th>\n </tr>\n <tr ng-repeat=\"x in msg.payload | limitTo:20\">\n <td>{{$index}}</td>\n <td>{{msg.payload[$index].Data}}</td>\n <td>{{msg.payload[$index].Time}}</td> \n <td>{{msg.payload[$index].Temperature}}</td>\n </tr>\n</table>\n</div>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":false,"templateScope":"local","x":840,"y":580,"wires":[[]]},{"id":"c722f8f7.b6ca18","type":"function","z":"68a0a347.56efbc","name":"firstDB","func":" var payload=msg.payload;\n\n var Data= \"xxx\";\n var Time= \"rr\";\n var Temperature= 32.1;\n node.warn( [Data, Time, Temperature] ); //check debug sidebar\n\nquery= \" values (\"+ \"\\'\"+Data+\"\\',\"+\"\\'\"+Time+\"\\',\"+\"\\'\"+Temperature+\"\\'\" +\")\";\nmsg.topic=\"INSERT INTO STAR (DATA, TIME, TEMPERATURE)\"+ query ;\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":490,"y":440,"wires":[["219cb6f3.e7708a"]]},{"id":"170a2894.b16747","type":"inject","z":"68a0a347.56efbc","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":240,"y":440,"wires":[["c722f8f7.b6ca18"]]},{"id":"1b59f45a.e0930c","type":"debug","z":"68a0a347.56efbc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":830,"y":500,"wires":[]},{"id":"b4b8d6bc.ef48c8","type":"sqlitedb","db":"C:\\Users\\samira.talebi\\database\\test6.db","mode":"RWC"},{"id":"bbf9c10f.b099","type":"ui_group","name":"Default","tab":"2ce4c2a5.2309fe","order":1,"disp":true,"width":"12","collapse":false},{"id":"2ce4c2a5.2309fe","type":"ui_tab","name":"T2","icon":"dashboard","disabled":false,"hidden":false}]
I hope , there is any idea about that?
Thanks alot
Samira