ESP8266 Pop-Up Notification Flag for Email/Twitter(Wemos D1 Mini)

ESP8266 Pop-Up Notification Flag for Email/Twitter(Wemos D1 Mini)


got an important mail coming that you
don’tt want to miss? is just the beep of your phone not enough for you don’t want
to miss a notification when you’re too engrossed into a game then this project
is for you so how’s this amazingly beautiful notification flag works is
pretty simple we’ll be using a service called if this then that or IFTTT for
short it connects to almost all the popular websites and services on the
internet and lets you take actions based on some context that you chose this will
call an api to dweet.io which is like twitter but for IOT devices a Wi-Fi
enabled board will be looking for changes on a dweet address and it will
turn a servo motor that raises the flag so let’s get building the hardware side
of the project is really really simple all you need is a esp8266 based board i
won’t recommend the ESP-01 version which i showcased in a previous video
since many many many people seem to have been having issues with it my
recommendation would be the wemos d1 mini which is way simpler to use other
than this board the only other thing that you need is a servo motor of which
the red wire connects to the 5 volt the brown wire connects to the ground and
the orange wire connects to the d4 pin and that’s Hardware done the software
side of this project has a few more steps than usual it’s not all that
complex but you do need to jump through a few hoops the first thing that you
need to set up is IFTTT go to ifttt.com and sign up for a new account now on the
home page you will see a bunch of examples of what you can do but we are
going to create our own go to my applets and select new applet and click on this
button here you need to decide what you want to happen to raise the flags for
example you can choose Twitter where the flag will be raised whenever you have a
new follower or whenever you are mentioned by someone else or whenever a
specific user tweets or a bunch of other criteria or for Gmail whenever you have
a mail from a specific person or an email has an attachment or some other
thing like stock market whenever particular stock drops or increases or
there is a change by this percent what I mean to say is that if it happens on the
internet it can be used for this example I am gonna select Gmail connect it to
the gmail account that I want to monitor and then select any new email in inbox
now for the that condition search for webhooks and select maker webhooks click
connect and then select make a web request now this is where we communicate
with the dweet.io service how dweet works is that you select a unique name
for your device and then that device can have multiple keys for example I will
choose the name SparksESP and then we have a key under it like servo1 now a
good way to check if a name is taken is to go to dweet.io/get/latest/dweet/for/your device name in my case SparksESP if
the returning page says something like this then the name is not yet taken now
back to IFTTT in the URL type this but replaced SparksESP with your own device
name leave the method to get change content type text/plain and select
create action click finish and you are done with IFTTT PS you can do all this
from thier Android app too now let’s program the Wemos boards if you are
using a ESP based board for the first time download and install the arduino
ide from the link in the description in the IDE go to file preferences and paste
this URL in the additional boards manager box and click OK
now go to tools boards boards manager and scroll down to the bottom where you
will find the esp8266 listed select it and click install and restart the IDE
after the installation is complete now we need a library that is not included
by default go to sketch include libraries manage libraries and search
and install the arduinoJSON library that done now download the code from the
description and open it here you need to change a few things change SparksESP to
your own device name and replace SSID and password with your own home Wi-Fi
network name and password note that the servo pin in the code is 2
while we connected the signal pin of the servo to d4 this is because the GPIO
naming scheme and the board naming schemes are different now you can
connect the Wemos to your PC via a USB cable select the correct board and the
port from under tools and click upload if you are using a bare ESP board that
does not have a micro USB port then watch this video to see how to program it now
all you have to do is make an appropriate flag for the servo arm stick
the board and the servo at an attention-grabbing location in my case
the back of my monitor plug the wemos board into a USB power adapter and you
are good to go an important thing to note here is that the flag once raised
would not go down on its own you have to reset the board to show that you have
noted the thing that’s why it’s a good idea to keep the reset button close to
the edge where you can easily reach it this is the project essentially done
though I should mention some concerns that people might have number one
the servos it’s not ideal to drive a servo directly of the Wemos board but
it’s okay in short bursts like we are doing here number two multiple flags it
is possible to set up multiple servos for different things but the code at the
moment is not set up for that an alternate is that you can make multiple
applets in IFTTT to raise the same flag number three the code yes I know
my code is horribly inefficient again you are free to modify it and make it
better and that’s it for this project drop a like
if this video was helpful let me know in the comments how you liked this project
and if you are having any issues with it subscribe for more projects coming soon and
I’ll see you guys in the next one

11 thoughts on “ESP8266 Pop-Up Notification Flag for Email/Twitter(Wemos D1 Mini)”

  1. Hi LS. Thanks for the great demo!

    I'm getting the following in the serial monitor:
    WiFi Connected
    192.168.2.45
    Receiving Data for ———– (my host name)
    Connecting to : dweet.io
    Connected Successfully!

    Closing Connection

    * the response is empty. Never contains 'Servo1'
    Key not found
    Receiving Data for hopesp8266
    Connecting to : dweet.io
    Connected Successfully!

    Any thoughts ?

    Thanks for your help.

    Gord

  2. Cool 🙂 that was helpful! Can you tell me, can i make it in other way? I push the button for example and i will become sms?

  3. Hi! I've searched a lot to create a device that show notifications from many services, and your solution is both simple and flexible! Thanks a lot for sharing!

Leave a Reply

Your email address will not be published. Required fields are marked *