[{"id":"a2d285df.7548c","type":"ui_tab","z":"cab01cc9.5ee52","name":"HISTORY","icon":"dashboard","order":"2"},{"id":"4b315b4e.c40aec","type":"ui_tab","z":"","name":"WEATHER","icon":"dashboard","order":"1"},{"id":"7e2958c1.b24aa","type":"sqlitedb","db":"/home/karthhic/weather"},{"id":"ad1abc65.75ac88","type":"openweathermap in","z":"cab01cc9.5ee52","name":"","lon":"","lat":"","city":"Tampere","country":"Finland","x":84,"y":85,"wires":[["d1ae8408.a173f8","1652c5d3.6971a2"]]},{"id":"fe744332.a9b1c8","type":"template","z":"cab01cc9.5ee52","name":"insert data","field":"topic","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"INSERT INTO temperature (date,time,temperature,humidity,look,detail)\nVALUES ({{date}},\"{{time}}\",{{payload.tempc}},{{payload.humidity}},\"{{payload.weather}}\",\"{{payload.detail}}\");","x":491,"y":81,"wires":[["4944393b.2851f8","aa980108.7e428"]]},{"id":"d1ae8408.a173f8","type":"moment","z":"cab01cc9.5ee52","name":"date","topic":"","input":"payload","format":"DDMMYY","locale":"","output":"date","x":230,"y":85,"wires":[["6c00c76d.a82748"]]},{"id":"4944393b.2851f8","type":"sqlite","z":"cab01cc9.5ee52","mydb":"7e2958c1.b24aa","name":"db","x":652,"y":160,"wires":[["eb74c805.75b8","428e9c83.7801e4","b6096070.a0e46"]]},{"id":"6c00c76d.a82748","type":"moment","z":"cab01cc9.5ee52","name":"time","topic":"","input":"","format":"HH:mm:ss","locale":"","output":"time","x":349,"y":85,"wires":[["fe744332.a9b1c8"]]},{"id":"539a6001.3a70a8","type":"ui_button","z":"cab01cc9.5ee52","tab":"4b315b4e.c40aec","name":"Delete","payload":"","topic":"","group":"input","order":"3","x":106,"y":157,"wires":[["2903e48b.5996f4"]]},{"id":"2903e48b.5996f4","type":"template","z":"cab01cc9.5ee52","name":"del data","field":"topic","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"DELETE FROM temperature;","x":497,"y":158,"wires":[["4944393b.2851f8"]]},{"id":"d3f5760b.f2e7a8","type":"comment","z":"cab01cc9.5ee52","name":"inserting data to the DB","info":"Whenever there is a change in the reading the data will be inserted into the database\n\nwait for changes.\nwhen data changes send the values.\nadd date in ddmmyy format\nadd time.\nsql injection inside the database.","x":265,"y":44,"wires":[]},{"id":"a587ec.af1c4818","type":"comment","z":"cab01cc9.5ee52","name":"Clear all data in the DB","info":"one code to clear all the data in the database.","x":264,"y":130,"wires":[]},{"id":"2a32c174.8041ae","type":"ui_text_input","z":"cab01cc9.5ee52","tab":"4b315b4e.c40aec","mode":"text","delay":"2000","name":"","topic":"Data inserted, check chart","group":"input","order":"1","x":79,"y":241.5,"wires":[["25f75e3f.b2772a","3dae32e5.20de2e"]]},{"id":"25f75e3f.b2772a","type":"template","z":"cab01cc9.5ee52","name":"retrive data","field":"topic","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"SELECT time,temperature FROM temperature WHERE date like {{payload}};","x":481.5,"y":241.5,"wires":[["4944393b.2851f8"]]},{"id":"7d146945.1e1fe8","type":"comment","z":"cab01cc9.5ee52","name":"retriving data from the DB","info":"one code to clear all the data in the database.","x":271,"y":205,"wires":[]},{"id":"eb74c805.75b8","type":"csv","z":"cab01cc9.5ee52","name":"","sep":",","hdrin":"","hdrout":false,"multi":"one","ret":"\\n","temp":"time, temperature","x":773.9444580078125,"y":159.49996948242188,"wires":[["2988d2ce.8278f6","daa89159.5dd288"]]},{"id":"2988d2ce.8278f6","type":"file","z":"cab01cc9.5ee52","name":"","filename":"/home/karthhic/Desktop/data.csv","appendNewline":true,"createDir":false,"overwriteFile":"true","x":1008.77783203125,"y":158.22219848632812,"wires":[]},{"id":"428e9c83.7801e4","type":"debug","z":"cab01cc9.5ee52","name":"","active":true,"console":"false","complete":"false","x":793.5,"y":125,"wires":[]},{"id":"b6096070.a0e46","type":"debug","z":"cab01cc9.5ee52","name":"","active":true,"console":"false","complete":"topic","x":782.5,"y":192,"wires":[]},{"id":"aa980108.7e428","type":"ui_text","z":"cab01cc9.5ee52","tab":"4b315b4e.c40aec","name":"Current Temp:","group":"Live","order":1,"format":" {{msg.payload.tempc}} degC","x":684.5,"y":20.5,"wires":[]},{"id":"1831e05c.147a08","type":"ui_chart","z":"cab01cc9.5ee52","tab":"4b315b4e.c40aec","name":"Daily log","group":"Live","order":"2","interpolate":"linear","nodata":"No Data","removeOlder":1,"removeOlderUnit":"86400","x":807.5,"y":77.5,"wires":[[],[]]},{"id":"1652c5d3.6971a2","type":"template","z":"cab01cc9.5ee52","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{payload.tempc}}","x":660.5,"y":83.5,"wires":[["1831e05c.147a08"]]},{"id":"3dae32e5.20de2e","type":"ui_toast","z":"cab01cc9.5ee52","name":"","x":254.5,"y":276.5,"wires":[]},{"id":"a562babe.cc6498","type":"ui_button","z":"cab01cc9.5ee52","tab":"4b315b4e.c40aec","name":"Show Chart","payload":"","topic":"","group":"input","order":"2","x":175,"y":356,"wires":[["b6bd819c.0ebc"]]},{"id":"b6bd819c.0ebc","type":"exec","z":"cab01cc9.5ee52","command":"firefox \"/home/karthhic/Desktop/index.html\"","addpay":false,"append":"","useSpawn":"","name":"","x":488.5,"y":356,"wires":[[],[],[]]},{"id":"5cf9b312.3d0534","type":"ui_template","z":"cab01cc9.5ee52","tab":"a2d285df.7548c","name":"chart","group":"Chart","order":1,"format":"\n\n\n\n\n\n\n\n\n
\n
Chart for the selected time period
\n\n","storeOutMessages":true,"fwdInMessages":true,"x":259.5,"y":421.5,"wires":[[]]},{"id":"daa89159.5dd288","type":"file","z":"cab01cc9.5ee52","name":"","filename":"/home/karthhic/.node-red/node_modules/node-red-contrib-ui/dist/data.csv","appendNewline":true,"createDir":false,"overwriteFile":"true","x":1142,"y":195,"wires":[]}]