This repository has been archived by the owner on May 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathnode-red.json
1 lines (1 loc) · 3.02 KB
/
node-red.json
1
[{"id":"21ba2a19.d191ee","type":"inject","z":"a9acee2f.4591e","name":"inject","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"x":103,"y":47,"wires":[["add24afb.c112c"]]},{"id":"add24afb.c112c","type":"os-get","z":"a9acee2f.4591e","name":"getFileData_in_buffer","container":"devjourney1","objectname":"sample_sensordata2016_1s3dys.csv","filepath":"/","filename":"data.csv","mode":"1","osconfig":"b98d0811.d91c6","x":318,"y":48.25,"wires":[["395df279.afa976"]]},{"id":"395df279.afa976","type":"function","z":"a9acee2f.4591e","name":"buffer2string","func":"var chunk = msg.payload;\nnode.log(\"File Content: \", chunk);\nvar textChunk = chunk.toString('utf8');\nnode.log(\"File Content as String: \", textChunk);\n\nvar lines = \"\";\nlines = textChunk.split(\"\\n\");\nnode.log(\"records length:\" , lines.length);\n\nmsg.payload = textChunk;\nreturn msg;","outputs":1,"noerr":0,"x":255,"y":137,"wires":[["8dc81b2f.2da0f"]]},{"id":"d9272fe0.e2c1c8","type":"ibmiot in","z":"a9acee2f.4591e","authentication":"apiKey","apiKey":"313a7456.b562d4","inputType":"evt","deviceId":"3B1","applicationId":"","deviceType":"+TemperatureSensor","eventType":"+","commandType":"","format":"json","name":"IBM IoT","service":"registered","allDevices":true,"allApplications":"","allDeviceTypes":true,"allEvents":true,"allCommands":"","allFormats":true,"qos":0,"x":97.5,"y":247.5,"wires":[["57db51be.768c3"]]},{"id":"8dc81b2f.2da0f","type":"csv","z":"a9acee2f.4591e","name":"","sep":",","hdrin":"","hdrout":"","multi":"one","ret":"\\n","temp":"\"SensorID\",\"TimeStamp\",\"SensorValue\",\"SensorUnits\"","x":456.5,"y":143,"wires":[["a5c79883.2a1078"]]},{"id":"a5c79883.2a1078","type":"wiotp out","z":"a9acee2f.4591e","authType":"d","qs":"false","qsDeviceId":"","deviceKey":"3debc92b.b7dca6","deviceType":"","deviceId":"","event":"event","format":"json","name":"TemperatureSensor","x":663.5,"y":194.75,"wires":[]},{"id":"8463f370.c7d898","type":"dashDB out","z":"a9acee2f.4591e","dashDB":"","service":"Db2 Warehouse on Cloud-pv","table":"CHANGEPOINTIOT","name":"","x":484.5,"y":353.5,"wires":[]},{"id":"57db51be.768c3","type":"function","z":"a9acee2f.4591e","name":"IoT Data","func":"var text = msg;\n\nvar output = {};\noutput.payload =\n{\n SENSORID : text.payload.d.SensorID,\n TIMESTAMP : text.payload.d.TimeStamp,\n SENSORVALUE : text.payload.d.SensorValue,\n SENSORUNITS : text.payload.d.SensorUnits\n}\nreturn output;","outputs":"1","noerr":0,"x":264.5,"y":302,"wires":[["8463f370.c7d898"]]},{"id":"b98d0811.d91c6","type":"os-config","z":"","cfgtype":"api","region":"dallas","projectId":"683b6ba01c904c529487c93a6947adb4","userId":"e8d0a26016124513a768d4974813fb42","userName":"admin_dd2cba4f9d2aaa9b3c032897fb2baefc7fc7e3c8","password":"K9oTd-s}R-6o9*Zm","name":"ObjStore"},{"id":"313a7456.b562d4","type":"ibmiot","z":"54f53ee2.c5c118","name":"","keepalive":"180","serverName":"","cleansession":true,"appId":"","shared":false},{"id":"3debc92b.b7dca6","type":"wiotp-credentials","z":"","name":"TemperatureSensor","org":"sdlm5w","devType":"TemperatureSensor","devId":"3B1"}]