-
Notifications
You must be signed in to change notification settings - Fork 0
/
Node-RED flow
1 lines (1 loc) · 4.18 KB
/
Node-RED flow
1
[{"id":"a896ca81.576938","type":"ibmiot","name":"Arduino Yun"},{"id":"5d23049c.a2dcfc","type":"delay","name":"","pauseType":"delay","timeout":"3","timeoutUnits":"seconds","rate":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":735,"y":183,"z":"70def5ac.8f210c","wires":[["47699f13.b8966"]]},{"id":"7601162e.89fee8","type":"function","name":"temp","func":"return {payload:msg.payload.d.temperature};","outputs":1,"x":331.5,"y":297,"z":"70def5ac.8f210c","wires":[["3e1f743c.c1e08c","2aec8412.d7e8b4"]]},{"id":"3e1f743c.c1e08c","type":"switch","name":"temp thresh","property":"payload","rules":[{"t":"lte","v":23,"v2":null},{"t":"gt","v":23,"v2":null}],"checkall":"true","outputs":2,"x":525.5,"y":297,"z":"70def5ac.8f210c","wires":[["4d14d8db.b2eb28"],["f5565792.0aa9a8"]]},{"id":"43a6791f.bc5988","type":"debug","name":"cpu status","active":false,"console":"true","complete":"false","x":950.5,"y":301,"z":"70def5ac.8f210c","wires":[]},{"id":"bd385f48.42c7a","type":"debug","name":"device data","active":false,"console":"true","complete":"false","x":300.5,"y":384,"z":"70def5ac.8f210c","wires":[]},{"id":"4d14d8db.b2eb28","type":"template","name":"safe","template":"Temperature ({{payload}}) within safe limits","x":738.5,"y":274,"z":"70def5ac.8f210c","wires":[["43a6791f.bc5988"]]},{"id":"f5565792.0aa9a8","type":"template","name":"danger","template":"Temperature ({{payload}}) critical","x":736.5,"y":319,"z":"70def5ac.8f210c","wires":[["43a6791f.bc5988"]]},{"id":"96116c69.3bd4a","type":"ibmiot in","authentication":"apiKey","apiKey":"a896ca81.576938","inputType":"evt","deviceId":"","applicationId":"","deviceType":"","eventType":"","commandType":"","format":"","name":"Arduino Yun","service":"registered","allDevices":true,"allApplications":"","allDeviceTypes":true,"allEvents":true,"allCommands":"","allFormats":true,"x":100,"y":297,"z":"70def5ac.8f210c","wires":[["bd385f48.42c7a","7601162e.89fee8"]]},{"id":"2aec8412.d7e8b4","type":"debug","name":"","active":false,"console":"false","complete":"false","x":515,"y":385,"z":"70def5ac.8f210c","wires":[]},{"id":"c8359dce.37ca6","type":"inject","name":"","topic":"","payload":"{\"lightmode\": \"OFF\"}","payloadType":"string","repeat":"","crontab":"","once":false,"x":1003,"y":395,"z":"70def5ac.8f210c","wires":[["c89fd72c.376028"]]},{"id":"c89fd72c.376028","type":"ibmiot out","authentication":"apiKey","apiKey":"a896ca81.576938","outputType":"cmd","deviceId":"90a2daf5113f","deviceType":"ArduinoYun","eventCommandType":"blink","format":"json","data":"0","name":"IBM IoT App Out","service":"registered","x":1289,"y":310,"z":"70def5ac.8f210c","wires":[]},{"id":"55115a10.aaeea4","type":"inject","name":"","topic":"","payload":"{\"lightmode\": \"RED\"}","payloadType":"string","repeat":"","crontab":"","once":false,"x":1001,"y":444,"z":"70def5ac.8f210c","wires":[["c89fd72c.376028"]]},{"id":"2a6169f1.d59e96","type":"inject","name":"","topic":"","payload":"{\"lightmode\": \"GREEN\"}","payloadType":"string","repeat":"","crontab":"","once":false,"x":996,"y":498,"z":"70def5ac.8f210c","wires":[["c89fd72c.376028"]]},{"id":"8776a225.78896","type":"template","name":"RED","field":"payload","template":"{\"lightmode\": \"RED\"}","x":977,"y":124,"z":"70def5ac.8f210c","wires":[["c89fd72c.376028"]]},{"id":"47699f13.b8966","type":"template","name":"OFF","field":"payload","template":"{\"lightmode\": \"OFF\"}","x":976,"y":162,"z":"70def5ac.8f210c","wires":[["c89fd72c.376028"]]},{"id":"18621e42.e79de2","type":"debug","name":"","active":false,"console":"false","complete":"false","x":440,"y":76,"z":"70def5ac.8f210c","wires":[]},{"id":"3eaf5ccf.c150a4","type":"e-mail in","repeat":"3","server":"imap.gmail.com","port":"993","name":"Bluemix_Cloud_Lock e-mail","x":149,"y":143,"z":"70def5ac.8f210c","wires":[["18621e42.e79de2","17a1b182.e85e4e"]]},{"id":"17a1b182.e85e4e","type":"switch","name":"Access Code","property":"payload","rules":[{"t":"cont","v":"9198500885"},{"t":"else"}],"checkall":"true","outputs":2,"x":501,"y":143,"z":"70def5ac.8f210c","wires":[["c57d1391.3a82f","8776a225.78896","5d23049c.a2dcfc"],["47699f13.b8966"]]},{"id":"c57d1391.3a82f","type":"debug","name":"","active":true,"console":"false","complete":"false","x":730,"y":68,"z":"70def5ac.8f210c","wires":[]}]