Skip to content

Instantly share code, notes, and snippets.

@gadjet
Last active March 12, 2021 07:13
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gadjet/6a461d17f0a7b9d7bfd7 to your computer and use it in GitHub Desktop.
Save gadjet/6a461d17f0a7b9d7bfd7 to your computer and use it in GitHub Desktop.
simple LED on/off LED flow using Pushbullet

This Flow uses the Pushbullet nodes to receive a push message from your phone with "LED on" in the message and switches the output on the RPi on (Pin 11), a push is then returned to the phone with "LED is on", the same procedure for "LED off".

There also a couple of injection nodes to simulate the reception of the Push message.

You need to install the Pushbullet node first and create an account.

[{"id":"8cc62775.7339d8","type":"pushbullet-config","name":"Phil Grant"},{"id":"36bc98c5.c94368","type":"inject","name":"LED on","topic":"","payload":"LED on","payloadType":"string","repeat":"","crontab":"","once":false,"x":507,"y":450,"z":"6a77b09e.95885","wires":[["2b89fef6.d47602"]]},{"id":"2b89fef6.d47602","type":"switch","name":"LED Control","property":"payload","rules":[{"t":"eq","v":"LED on"},{"t":"eq","v":"LED off"}],"checkall":"true","outputs":2,"x":655,"y":504,"z":"6a77b09e.95885","wires":[["89d6dac1.762928","dba96b7a.245698"],["f6e1a3b9.091e6","cd9a199b.3265e8"]]},{"id":"dd181fd3.22e7e","type":"pushbullet in","config":"8cc62775.7339d8","name":"Push input","x":488,"y":505,"z":"6a77b09e.95885","wires":[["2b89fef6.d47602"]]},{"id":"89d6dac1.762928","type":"template","name":"On","field":"payload","format":"handlebars","template":"1","x":856,"y":487,"z":"6a77b09e.95885","wires":[["69f3331c.960ccc"]]},{"id":"dba96b7a.245698","type":"template","name":"LED is On","field":"payload","format":"handlebars","template":"LED is On","x":865,"y":453,"z":"6a77b09e.95885","wires":[["e69cd2aa.19633"]]},{"id":"f6e1a3b9.091e6","type":"template","name":"off","field":"payload","format":"handlebars","template":"0","x":855,"y":531,"z":"6a77b09e.95885","wires":[["69f3331c.960ccc"]]},{"id":"cd9a199b.3265e8","type":"template","name":"LED is Off","field":"payload","format":"handlebars","template":"LED is off","x":865,"y":564,"z":"6a77b09e.95885","wires":[["c099b247.3f665"]]},{"id":"1d5efe9b.e2a101","type":"inject","name":"LED Off","topic":"","payload":"LED off","payloadType":"string","repeat":"","crontab":"","once":false,"x":501,"y":568,"z":"6a77b09e.95885","wires":[["2b89fef6.d47602"]]},{"id":"69f3331c.960ccc","type":"rpi-gpio out","name":"Pin 11","pin":"11","set":true,"level":"0","out":"out","x":1024,"y":507,"z":"6a77b09e.95885","wires":[]},{"id":"e69cd2aa.19633","type":"pushbullet","config":"8cc62775.7339d8","pushtype":"note","title":"LED Status","chan":"","name":"LED is On","x":1032,"y":453,"z":"6a77b09e.95885","wires":[]},{"id":"c099b247.3f665","type":"pushbullet","config":"8cc62775.7339d8","pushtype":"note","title":"LED Status","chan":"","name":"LED is Off","x":1031,"y":564,"z":"6a77b09e.95885","wires":[]}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment