Last active
January 25, 2016 10:56
-
-
Save dmpop/56681fd9164316d44fa6 to your computer and use it in GitHub Desktop.
BlinkStick flow for Node-RED
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"id":"72aafd2f.608874","type":"exec","z":"c44f31ab.9139e8","command":"blinkstick","addpay":true,"append":"","useSpawn":"","name":"BlinkStick","x":831,"y":170,"wires":[[],[],[]]},{"id":"ba40088d.d286e8","type":"openweathermap","z":"c44f31ab.9139e8","name":"","lon":"","lat":"","city":"Aarhus","country":"Denmark","x":338,"y":173,"wires":[["a36fdbc6.490e48"]]},{"id":"95a6d5c0.afcbd","type":"inject","z":"c44f31ab.9139e8","name":"Weather Today","topic":"","payload":"","payloadType":"none","repeat":"600","crontab":"","once":true,"x":112,"y":81,"wires":[["ba40088d.d286e8"]]},{"id":"a36fdbc6.490e48","type":"function","z":"c44f31ab.9139e8","name":"Process Weather Data","func":"if (msg.payload.weather === \"Clear\") {\n msg.payload = \"--repeats 51 --pulse green\"\n return msg;\n}\n\nelse if (msg.payload.weather === \"Broken clouds\") {\n msg.payload = \"--repeats 51 --pulse yellow\"\n return msg;\n}\nelse if (msg.payload.weather === \"Rain\") {\n msg.payload = \"--repeats 51 --pulse red\"\n return msg;\n}\nelse if (msg.payload.weather === \"Fog\") {\n msg.payload = \"--repeats 35 --pulse blue\"\n return msg; \n} else {\n msg.payload = \"--repeats 51 --pulse orange\"\n return msg;\n}","outputs":1,"noerr":0,"x":602,"y":283,"wires":[["72aafd2f.608874"]]}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment