[{"id":"70ba9d8e.aa90f4","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"de8a0182.ab95a","type":"ibmiot in","z":"70ba9d8e.aa90f4","authentication":"boundService","apiKey":"","inputType":"evt","logicalInterface":"","ruleId":"","deviceId":"photon_a1","applicationId":"","deviceType":"labdevices","eventType":"+","commandType":"","format":"json","name":"IBM IoT Input","service":"registered","allDevices":"","allApplications":"","allDeviceTypes":"","allLogicalInterfaces":"","allEvents":true,"allCommands":"","allFormats":"","qos":0,"x":90,"y":160,"wires":[["c62a3c9f.d2d438","4e983b6f.96038c"]]},{"id":"4e983b6f.96038c","type":"debug","z":"70ba9d8e.aa90f4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":210,"y":100,"wires":[]},{"id":"c62a3c9f.d2d438","type":"function","z":"70ba9d8e.aa90f4","name":"extract sensor data","func":"return {payload:msg.payload.dataproperty};","outputs":1,"noerr":0,"x":270,"y":200,"wires":[["9d962c97.1bb97","861a3ae2.44537"]]},{"id":"e5886ea0.740f18","type":"debug","z":"70ba9d8e.aa90f4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":410,"y":100,"wires":[]},{"id":"9d962c97.1bb97","type":"template","z":"70ba9d8e.aa90f4","name":"Form a Twitter msg","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Sensor's current testdata is: {{payload}}","output":"str","x":510,"y":200,"wires":[["5f9fda6a.6c1a14"]]},{"id":"5f9fda6a.6c1a14","type":"debug","z":"70ba9d8e.aa90f4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":610,"y":100,"wires":[]},{"id":"f7d3f29.56ec71","type":"twitter out","z":"70ba9d8e.aa90f4","twitter":"","name":"Tweet","x":710,"y":200,"wires":[]},{"id":"159dc2ab.d23375","type":"ibmiot out","z":"70ba9d8e.aa90f4","authentication":"apiKey","apiKey":"6b32fd.ddd5ed04","outputType":"cmd","deviceId":"photon_a1","deviceType":"labdevices","eventCommandType":"testcommand","format":"json","data":"","qos":0,"name":"IBM IoT Command Out","service":"registered","x":650,"y":480,"wires":[]},{"id":"16fc5636.f73172","type":"function","z":"70ba9d8e.aa90f4","name":"Form Commd1","func":"//msg.payload=JSON.stringify({testcommand:\"turnlow\"});\nmsg.payload=\"turnlow\";\nreturn msg; \n","outputs":1,"noerr":0,"x":320,"y":300,"wires":[["66803fe5.5adcd","44f31187.9afb1"]]},{"id":"861a3ae2.44537","type":"switch","z":"70ba9d8e.aa90f4","name":"","property":"payload","propertyType":"msg","rules":[{"t":"lte","v":"32","vt":"num"},{"t":"btwn","v":"33","vt":"num","v2":"66","v2t":"num"},{"t":"btwn","v":"67","vt":"num","v2":"100","v2t":"num"}],"checkall":"true","repair":false,"outputs":3,"x":110,"y":360,"wires":[["16fc5636.f73172"],["215153dc.24bd74"],["43aa811e.c10868"]]},{"id":"44a658b8.cbfcd","type":"function","z":"70ba9d8e.aa90f4","name":"mod with 3","func":"msg.payload = math.mod( Number(msg.payload), 3);\nreturn msg;\n","outputs":1,"noerr":0,"x":110,"y":460,"wires":[[]]},{"id":"44f31187.9afb1","type":"debug","z":"70ba9d8e.aa90f4","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":670,"y":420,"wires":[]},{"id":"215153dc.24bd74","type":"function","z":"70ba9d8e.aa90f4","name":"Form Commd2","func":"//msg.payload=JSON.stringify({testcommand:\"turnmid\"});\nmsg.payload=\"turnmid\";\nreturn msg; \n","outputs":1,"noerr":0,"x":360,"y":360,"wires":[["44f31187.9afb1","66803fe5.5adcd"]]},{"id":"43aa811e.c10868","type":"function","z":"70ba9d8e.aa90f4","name":"Form Commd3","func":"//msg.payload=JSON.stringify({testcommand:\"turnhigh\"});\nmsg.payload=\"turnhigh\";\nreturn msg; \n","outputs":1,"noerr":0,"x":380,"y":420,"wires":[["44f31187.9afb1","66803fe5.5adcd"]]},{"id":"66803fe5.5adcd","type":"ibmiot out","z":"70ba9d8e.aa90f4","authentication":"apiKey","apiKey":"6b32fd.ddd5ed04","outputType":"cmd","deviceId":"photon_a1","deviceType":"labdevices","eventCommandType":"testcommand","format":"string","data":"","qos":0,"name":"IBM IoT Command Out","service":"registered","x":650,"y":300,"wires":[]},{"id":"6b32fd.ddd5ed04","type":"ibmiot","z":"","name":"AppKey for Send Command1","keepalive":"60","serverName":"","cleansession":true,"appId":"","shared":false}]