Skip to content

Instantly share code, notes, and snippets.

@matisok
Created Jan 28, 2020
Embed
What would you like to do?
Gmail notification LED

Check at an interval for new mail and then turns on an LED if there is.

[{"id":"4e6bb7b5.838998","type":"rpi-gpio out","z":"77b0a024.ad9a6","name":"LED 7","pin":"7","set":"","level":"0","freq":"","out":"pwm","x":750,"y":140,"wires":[]},{"id":"4eef709b.f5b7d","type":"e-mail in","z":"77b0a024.ad9a6","name":"","protocol":"IMAP","server":"imap.gmail.com","useSSL":true,"port":"993","box":"INBOX","disposition":"None","criteria":"UNSEEN","repeat":"7200","fetch":"auto","inputs":0,"x":390,"y":140,"wires":[["f88edff0.1ba23","5ec23dd1.e8d124"]]},{"id":"f88edff0.1ba23","type":"change","z":"77b0a024.ad9a6","name":"If Mail","rules":[{"t":"set","p":"payload","pt":"msg","to":"50","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":140,"wires":[["4e6bb7b5.838998"]]},{"id":"5ec23dd1.e8d124","type":"delay","z":"77b0a024.ad9a6","name":"","pauseType":"delay","timeout":"10","timeoutUnits":"minutes","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":530,"y":220,"wires":[["793a63bf.746aec"]]},{"id":"793a63bf.746aec","type":"change","z":"77b0a024.ad9a6","name":"Turn off","rules":[{"t":"set","p":"payload","pt":"msg","to":"100","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":680,"y":220,"wires":[["4e6bb7b5.838998"]]},{"id":"eff6f990.2d7138","type":"inject","z":"77b0a024.ad9a6","name":"","topic":"Turn off at boot","payload":"100","payloadType":"num","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":440,"y":80,"wires":[["4e6bb7b5.838998"]]}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment