forked from CaskAle/iot-workshop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
STSA-Workshop1-RaspberryPi-Flows.txt
1 lines (1 loc) · 3.6 KB
/
STSA-Workshop1-RaspberryPi-Flows.txt
1
[{"id":"d80f5f93.c7c3b","type":"tab","label":"STSA Raspberry Pi Flows"},{"id":"5cc11d0a.1e98e4","type":"rpi-sensehat in","z":"d80f5f93.c7c3b","name":"","motion":true,"env":true,"stick":true,"x":80,"y":160,"wires":[["a7fda174.e426a"]]},{"id":"e7854a3f.274b3","type":"wiotp out","z":"d80f5f93.c7c3b","authType":"g","qs":"false","qsDeviceId":"","deviceKey":"6cc489f3.1281c8","deviceType":"SenseHat","deviceId":"TinySense","event":"environment","format":"json","qos":"","name":"IoT : environment","x":670,"y":100,"wires":[]},{"id":"18bf7d7a.b2ff7b","type":"debug","z":"d80f5f93.c7c3b","name":"debug : sense hat sensors","active":false,"console":"false","complete":"true","x":700,"y":280,"wires":[]},{"id":"cf5621ff.ecb778","type":"wiotp out","z":"d80f5f93.c7c3b","authType":"g","qs":"false","qsDeviceId":"","deviceKey":"6cc489f3.1281c8","deviceType":"SenseHat","deviceId":"TinySense","event":"motion","format":"json","qos":"","name":"IoT : motion","x":650,"y":160,"wires":[]},{"id":"74b08143.132778","type":"wiotp out","z":"d80f5f93.c7c3b","authType":"g","qs":"false","qsDeviceId":"","deviceKey":"6cc489f3.1281c8","deviceType":"SenseHat","deviceId":"TinySense","event":"joystick","format":"json","qos":"","name":"IoT : joystick","x":650,"y":220,"wires":[]},{"id":"a7fda174.e426a","type":"switch","z":"d80f5f93.c7c3b","name":"","property":"topic","propertyType":"msg","rules":[{"t":"eq","v":"environment","vt":"str"},{"t":"eq","v":"motion","vt":"str"},{"t":"eq","v":"joystick","vt":"str"}],"checkall":"true","outputs":3,"x":210,"y":160,"wires":[["d694f9e8.66e38"],["fdc4fa26.c15198"],["74b08143.132778","18bf7d7a.b2ff7b"]]},{"id":"d1833e7e.a0c168","type":"rpi-sensehat out","z":"d80f5f93.c7c3b","name":"","x":650,"y":360,"wires":[]},{"id":"6bec605a.0551d8","type":"debug","z":"d80f5f93.c7c3b","name":"debug : sense hat LED","active":true,"console":"false","complete":"true","x":680,"y":420,"wires":[]},{"id":"5cc5c0af.8b772","type":"function","z":"d80f5f93.c7c3b","name":"format : sense hat","func":"d = msg.payload.d;\nif (msg.command == \"message\") {\n msg.background=d.background;\n msg.color=d.color;\n msg.payload=d.message;\n}\nelse if (msg.command == \"alarm\") {\n msg.payload=\"*,*,\" + d.color;\n}\nelse\n msg = null;\nreturn msg;\n","outputs":1,"noerr":0,"x":370,"y":360,"wires":[["d1833e7e.a0c168"]]},{"id":"38c9cca1.6ca034","type":"wiotp in","z":"d80f5f93.c7c3b","authType":"g","deviceKey":"6cc489f3.1281c8","deviceType":"SenseHat","deviceId":"TinySense","command":"+","commandType":"d","qos":0,"name":"IoT : commands","x":100,"y":360,"wires":[["5cc5c0af.8b772","6bec605a.0551d8"]]},{"id":"d694f9e8.66e38","type":"delay","z":"d80f5f93.c7c3b","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"10","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":400,"y":100,"wires":[["18bf7d7a.b2ff7b"]]},{"id":"cd66b321.383bb","type":"comment","z":"d80f5f93.c7c3b","name":"Incoming IOT commands from Watson IOT","info":"","x":180,"y":320,"wires":[]},{"id":"fc3810b0.a6e2c8","type":"comment","z":"d80f5f93.c7c3b","name":"Send Sense Hat data to Watson IOT","info":"","x":160,"y":60,"wires":[]},{"id":"fdc4fa26.c15198","type":"delay","z":"d80f5f93.c7c3b","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"10","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"x":400,"y":160,"wires":[["18bf7d7a.b2ff7b"]]},{"id":"6cc489f3.1281c8","type":"wiotp-credentials","z":"","name":"","org":"y4njfz","serverName":"","devType":"PiGateway","devId":"TinyRebel-GW","keepalive":"60","cleansession":true,"tls":"","usetls":false}]