-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathNODEFLOW.txt
1 lines (1 loc) · 9.09 KB
/
NODEFLOW.txt
1
[{"id":"bee1865a.7572d8","type":"ibmiot","z":"48d96400.d0fe8c","name":"Watson IoT"},{"id":"bcf84159.dae82","type":"ibmiot in","z":"48d96400.d0fe8c","authentication":"apiKey","apiKey":"bee1865a.7572d8","inputType":"evt","deviceId":"cc69e7c5-c24f-43cf-8365-8d23bb01c707","applicationId":"","deviceType":"mbed-endpoint","eventType":"observation","commandType":"","format":"json","name":"connector-bridge source (observations)","service":"registered","allDevices":false,"allApplications":"","allDeviceTypes":false,"allEvents":false,"allCommands":"","allFormats":"","x":292,"y":75,"wires":[["b49cc0cb.6d571","a9c1ac1b.d5f7f","847fb1ad.b20b8"]]},{"id":"b49cc0cb.6d571","type":"debug","z":"48d96400.d0fe8c","name":"","active":true,"console":"false","complete":"payload.d.value","x":1015.9524154663086,"y":77.85714530944824,"wires":[]},{"id":"39bd02f.ac4fdfe","type":"switch","z":"48d96400.d0fe8c","name":"Is Value Even or Odd?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"1","vt":"num"}],"checkall":"true","outputs":2,"x":449,"y":146,"wires":[["1bef3d4e.b67853"],["a140fd0a.d5043"]]},{"id":"ced66300.70b9c","type":"ibmiot out","z":"48d96400.d0fe8c","authentication":"apiKey","apiKey":"bee1865a.7572d8","outputType":"cmd","deviceId":"cc69e7c5-c24f-43cf-8365-8d23bb01c707","deviceType":"mbed-endpoint","eventCommandType":"put","format":"json","data":"0","name":"connector-bridge sink (PUT CMD)","service":"registered","x":1057,"y":201,"wires":[]},{"id":"a140fd0a.d5043","type":"template","z":"48d96400.d0fe8c","name":"LED OFF","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{ \"path\":\"/311/0/5850\", \"new_value\":\"0\", \"ep\":\"cc69e7c5-c24f-43cf-8365-8d23bb01c707\", \"coap_verb\":\"put\" }","x":712.8888549804688,"y":171.55555725097656,"wires":[["8569ad47.ec0f1","c67510fe.fef36","ced66300.70b9c"]]},{"id":"1bef3d4e.b67853","type":"template","z":"48d96400.d0fe8c","name":"LED ON","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{ \"path\":\"/311/0/5850\", \"new_value\":\"1\", \"ep\":\"cc69e7c5-c24f-43cf-8365-8d23bb01c707\", \"coap_verb\":\"put\" }","x":712.6666870117188,"y":121,"wires":[["ced66300.70b9c","8569ad47.ec0f1"]]},{"id":"a9c1ac1b.d5f7f","type":"function","z":"48d96400.d0fe8c","name":"Even Value Calc","func":"var path = msg.payload.d.path;\nif (path == \"/123/0/4567\") {\n var check = (msg.payload.d.value)/2;\n var orig = parseInt(check);\n var remainder = check - orig;\n if (remainder !== 0) {\n return {payload:1};\n }\n else { \n return {payload:2};\n }\n}\nelse {\n return {payload:0}\n}","outputs":1,"noerr":0,"x":236.77777862548828,"y":183.333327293396,"wires":[["4ed2188f.e135b8","39bd02f.ac4fdfe"]]},{"id":"4ed2188f.e135b8","type":"debug","z":"48d96400.d0fe8c","name":"","active":false,"console":"false","complete":"payload","x":417.8888816833496,"y":219.77777671813965,"wires":[]},{"id":"8569ad47.ec0f1","type":"debug","z":"48d96400.d0fe8c","name":"","active":false,"console":"false","complete":"false","x":987.1428337097168,"y":147.99999618530273,"wires":[]},{"id":"d069a6b2.0e3e68","type":"ibmiot out","z":"48d96400.d0fe8c","authentication":"apiKey","apiKey":"bee1865a.7572d8","outputType":"cmd","deviceId":"cc69e7c5-c24f-43cf-8365-8d23bb01c707","deviceType":"mbed-endpoint","eventCommandType":"get","format":"json","data":"0","name":"connector-bridge sink (GET CMD)","service":"registered","x":1057,"y":249,"wires":[]},{"id":"c67510fe.fef36","type":"template","z":"48d96400.d0fe8c","name":"Request TEMP Resource","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{ \"path\":\"/303/0/5700\", \"ep\":\"cc69e7c5-c24f-43cf-8365-8d23bb01c707\", \"coap_verb\":\"get\" }","x":756,"y":249,"wires":[["d069a6b2.0e3e68"]]},{"id":"e0bf25d1.8f2c78","type":"ibmiot in","z":"48d96400.d0fe8c","authentication":"apiKey","apiKey":"bee1865a.7572d8","inputType":"evt","deviceId":"cc69e7c5-c24f-43cf-8365-8d23bb01c707","applicationId":"","deviceType":"mbed-endpoint","eventType":"cmd-response","commandType":"","format":"json","name":"connector-bridge source (CMD Response)","service":"registered","allDevices":false,"allApplications":"","allDeviceTypes":false,"allEvents":false,"allCommands":"","allFormats":true,"x":310.111083984375,"y":587.5555419921875,"wires":[["4cb8baa5.c12324","8ebce3ea.33fbb"]]},{"id":"4cb8baa5.c12324","type":"debug","z":"48d96400.d0fe8c","name":"","active":false,"console":"false","complete":"true","x":975.0793533325195,"y":588.4444484710693,"wires":[]},{"id":"847fb1ad.b20b8","type":"function","z":"48d96400.d0fe8c","name":"Get Counter Value","func":"var path = msg.payload.d.path;\nif (path == \"/123/0/4567\") {\n var value = msg.payload.d.value;\n return {payload:value}\n}\nreturn {payload:-1}","outputs":1,"noerr":0,"x":264,"y":302,"wires":[["db1c68b4.243fb8","b4ba0ce3.9fcdd","5bfc70d0.91c19"]]},{"id":"db1c68b4.243fb8","type":"switch","z":"48d96400.d0fe8c","name":"Is Value greater than 22?","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"22","vt":"num"}],"checkall":"true","outputs":1,"x":510,"y":395,"wires":[["fbaafd3a.63067"]]},{"id":"fbaafd3a.63067","type":"template","z":"48d96400.d0fe8c","name":"Reset Counter","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{ \"path\":\"/123/0/4567\", \"new_value\":\"0\", \"ep\":\"cc69e7c5-c24f-43cf-8365-8d23bb01c707\", \"coap_verb\":\"put\" }","x":732,"y":395,"wires":[["ced66300.70b9c"]]},{"id":"b4ba0ce3.9fcdd","type":"switch","z":"48d96400.d0fe8c","name":"Is Value 10?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"10","vt":"num"}],"checkall":"true","outputs":1,"x":469,"y":351,"wires":[["89d6519e.e281d"]]},{"id":"89d6519e.e281d","type":"template","z":"48d96400.d0fe8c","name":"Add 10 to Counter","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{ \"path\":\"/123/0/4567\", \"new_value\":\"10\", \"ep\":\"cc69e7c5-c24f-43cf-8365-8d23bb01c707\", \"coap_verb\":\"post\" }","x":737.4443969726562,"y":350.888916015625,"wires":[["e809328b.a3392"]]},{"id":"5bfc70d0.91c19","type":"switch","z":"48d96400.d0fe8c","name":"Is Value 5?","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"5","vt":"num"}],"checkall":"true","outputs":1,"x":467,"y":302,"wires":[["ef057bd6.8f6998","30efca6f.50bee6"]]},{"id":"ef057bd6.8f6998","type":"template","z":"48d96400.d0fe8c","name":"Set Counter to 8","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{ \"path\":\"/123/0/4567\", \"new_value\":\"8\", \"ep\":\"cc69e7c5-c24f-43cf-8365-8d23bb01c707\", \"coap_verb\":\"put\" }","x":728.6666870117188,"y":302.1111145019531,"wires":[["ced66300.70b9c"]]},{"id":"e809328b.a3392","type":"ibmiot out","z":"48d96400.d0fe8c","authentication":"apiKey","apiKey":"bee1865a.7572d8","outputType":"cmd","deviceId":"cc69e7c5-c24f-43cf-8365-8d23bb01c707","deviceType":"mbed-endpoint","eventCommandType":"post","format":"json","data":"0","name":"connector-bridge sink (POST CMD)","service":"registered","x":1061,"y":459,"wires":[]},{"id":"30efca6f.50bee6","type":"template","z":"48d96400.d0fe8c","name":"DeRegister Device","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{ \"path\":\"/86/0/1\", \"new_value\":\"arm1234\", \"ep\":\"cc69e7c5-c24f-43cf-8365-8d23bb01c707\", \"coap_verb\":\"post\", \"options\":\"noResp=true\" }","x":743,"y":469,"wires":[["e809328b.a3392"]]},{"id":"f83eceeb.25d0c","type":"template","z":"48d96400.d0fe8c","name":"Reboot Device","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{ \"path\":\"/3/0/3\", \"new_value\":\"arm1234\", \"ep\":\"cc69e7c5-c24f-43cf-8365-8d23bb01c707\", \"coap_verb\":\"post\", \"options\":\"noResp=true\" }","x":734,"y":510,"wires":[["e809328b.a3392"]]},{"id":"44472101.7261f","type":"template","z":"48d96400.d0fe8c","name":"Reset Device","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{ \"path\":\"/3/0/5\", \"new_value\":\"arm1234\", \"ep\":\"cc69e7c5-c24f-43cf-8365-8d23bb01c707\", \"coap_verb\":\"post\", \"options\":\"noResp=true\" }","x":725,"y":547,"wires":[["e809328b.a3392"]]},{"id":"6ee19cb6.ea1db4","type":"template","z":"48d96400.d0fe8c","name":"Invoke FOTA","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{ \"path\":\"/5/0/2\", \"new_value\":\"arm1234\", \"ep\":\"cc69e7c5-c24f-43cf-8365-8d23bb01c707\", \"coap_verb\":\"post\", \"options\":\"noResp=true\" }","x":722,"y":632,"wires":[["e809328b.a3392"]]},{"id":"8ebce3ea.33fbb","type":"switch","z":"48d96400.d0fe8c","name":"FOTA Manifest set Response?","property":"payload.d.path","propertyType":"msg","rules":[{"t":"eq","v":"/5/0/1","vt":"str"}],"checkall":"true","outputs":1,"x":465,"y":632,"wires":[["6ee19cb6.ea1db4"]]},{"id":"eba6c69d.1ea968","type":"template","z":"48d96400.d0fe8c","name":"Set FOTA Manifest","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{ \"path\":\"/5/0/1\", \"new_value\":\"{\\\"key\\\":\\\"123\\\",\\\"sig\\\":\\\"456\\\",\\\"image\\\":\\\"fw.bin\\\"}\", \"ep\":\"cc69e7c5-c24f-43cf-8365-8d23bb01c707\", \"coap_verb\":\"put\" }","x":742,"y":432,"wires":[["ced66300.70b9c"]]}]