-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathflow.json
1 lines (1 loc) · 5.75 KB
/
flow.json
1
[{"id":"deb0d57.1c46528","type":"tab","label":"Flow 1"},{"id":"3e77d543.c1882a","type":"ibmiot in","z":"deb0d57.1c46528","authentication":"boundService","apiKey":"","inputType":"evt","logicalInterface":"","ruleId":"","deviceId":"","applicationId":"","deviceType":"+","eventType":"updateLocation","commandType":"","format":"json","name":"IBM IoT App In","service":"registered","allDevices":true,"allApplications":false,"allDeviceTypes":true,"allLogicalInterfaces":false,"allEvents":false,"allCommands":false,"allFormats":true,"qos":"0","x":120,"y":620,"wires":[["c0c482df.3f3b8"]]},{"id":"c0c482df.3f3b8","type":"debug","z":"deb0d57.1c46528","name":"device data","active":true,"console":"false","complete":"true","x":350,"y":620,"wires":[]},{"id":"cbe1a0b7.cd877","type":"ibmiot out","z":"deb0d57.1c46528","authentication":"boundService","apiKey":"","outputType":"evt","deviceId":"A-001","deviceType":"asset","eventCommandType":"updateLocation","format":"json","data":"{\"d\":{}}","qos":"","name":"Send to IBM IoT Platform","service":"registered","x":970,"y":120,"wires":[]},{"id":"5917a925.6a3c08","type":"inject","z":"deb0d57.1c46528","name":"Send Data","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"x":220,"y":120,"wires":[["d0e65738.fcec2"]]},{"id":"6b4a591c.014b18","type":"function","z":"deb0d57.1c46528","name":"form Payload","func":"var assetKey = msg.payload.assetKey;\nvar assetLocation = msg.payload.assetLocation;\n\n// Create MQTT message in JSON\nmsg = {\n payload: JSON.stringify(\n {\n d:{\n \"assetKey\" : assetKey,\n \"assetLocation\" : assetLocation\n }\n }\n )\n};\nreturn msg;\n","outputs":1,"noerr":0,"x":710,"y":180,"wires":[["805c97ee.3ed9e8","cbe1a0b7.cd877"]]},{"id":"805c97ee.3ed9e8","type":"debug","z":"deb0d57.1c46528","name":"Debug output payload","active":true,"console":"false","complete":"payload","x":960,"y":180,"wires":[]},{"id":"86df0b6c.af90c8","type":"comment","z":"deb0d57.1c46528","name":"Device Simulator","info":"Sends simulated device sensor data to IBM Watson IoT Plaform.\n\nCan be configured to send on click or on an automatic interval.\n\n\n#Prerequisite\nOutput node device type and device ID need to match a device that it registered in a running IBM Watson IoT Platform service.\n\n# Watson IoT Platform docs\n[Connecting devices](https://www.bluemix.net/docs/services/IoT/iotplatform_task.html)","x":320,"y":60,"wires":[]},{"id":"2389050e.064772","type":"function","z":"deb0d57.1c46528","name":"Inspection Warehouse scan","func":"msg.payload = {\n \"assetKey\": '\"manufacturer1\":\"A-001\"',\n \"assetLocation\": \"vendor1-Inspection Warehouse\"\n}\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":320,"wires":[["6b4a591c.014b18"]]},{"id":"669451e6.7b98c8","type":"function","z":"deb0d57.1c46528","name":"Distribution Center","func":"msg.payload = {\n \"assetKey\": '\"manufacturer1\":\"A-001\"',\n \"assetLocation\": \"vendor1-Distribution Center\"\n}\nreturn msg;","outputs":1,"noerr":0,"x":390,"y":240,"wires":[["6b4a591c.014b18"]]},{"id":"d0e65738.fcec2","type":"function","z":"deb0d57.1c46528","name":"Warehouse 1 scan","func":"msg.payload = {\n \"assetKey\": '\"manufacturer1\":\"A-001\"',\n \"assetLocation\": \"manufacturer1-warehouse1\"\n}\nreturn msg;","outputs":1,"noerr":0,"x":390,"y":120,"wires":[["6b4a591c.014b18"]]},{"id":"57662b61.a2b134","type":"function","z":"deb0d57.1c46528","name":"Installation scan","func":"msg.payload = {\n \"assetKey\": '\"manufacturer1\":\"A-001\"',\n \"assetLocation\": \"consumer1-5th Street\"\n}\nreturn msg;","outputs":1,"noerr":0,"x":380,"y":280,"wires":[["6b4a591c.014b18"]]},{"id":"ed4da7fc.487288","type":"function","z":"deb0d57.1c46528","name":"Asset Warehouse scan","func":"msg.payload = {\n \"assetKey\": '\"manufacturer1\":\"A-001\"',\n \"assetLocation\": \"vendor1-Asset Warehouse\"\n}\nreturn msg;","outputs":1,"noerr":0,"x":400,"y":200,"wires":[["6b4a591c.014b18"]]},{"id":"f40b70f4.c4c158","type":"function","z":"deb0d57.1c46528","name":"Repair Warehouse scan","func":"msg.payload = {\n \"assetKey\": '\"manufacturer1\":\"A-001\"',\n \"assetLocation\": \"vendor1-Repair Warehouse\"\n}\nreturn msg;","outputs":1,"noerr":0,"x":410,"y":360,"wires":[["6b4a591c.014b18"]]},{"id":"56995ce0.d93a14","type":"function","z":"deb0d57.1c46528","name":"Shipping Center","func":"msg.payload = {\n \"assetKey\": '\"manufacturer1\":\"A-001\"',\n \"assetLocation\": \"manufacturer1-Shipping Center\"\n}\nreturn msg;","outputs":1,"noerr":0,"x":380,"y":160,"wires":[["6b4a591c.014b18"]]},{"id":"eb19cb7a.eaccc","type":"inject","z":"deb0d57.1c46528","name":"Send Data","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"x":220,"y":200,"wires":[["ed4da7fc.487288"]]},{"id":"ecd5a901.33d588","type":"inject","z":"deb0d57.1c46528","name":"Send Data","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"x":220,"y":240,"wires":[["669451e6.7b98c8"]]},{"id":"424c5946.0c6378","type":"inject","z":"deb0d57.1c46528","name":"Send Data","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"x":220,"y":160,"wires":[["56995ce0.d93a14"]]},{"id":"f604b9d9.ac205","type":"inject","z":"deb0d57.1c46528","name":"Send Data","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"x":220,"y":280,"wires":[["57662b61.a2b134"]]},{"id":"c4eb2951.3f365","type":"inject","z":"deb0d57.1c46528","name":"Send Data","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"x":220,"y":320,"wires":[["2389050e.064772"]]},{"id":"e9a6df0e.aeb9c8","type":"inject","z":"deb0d57.1c46528","name":"Send Data","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"x":220,"y":360,"wires":[["f40b70f4.c4c158"]]}]