Introduction: Easy Unread Email Notifier
Hi All, welcome to yet another Instructable.With the current situation of working from home, I am facing some challenges because I received emails from my Company Time to time.Then I was thinking to make a Desk Notifier which will notify me about my new email and finally I made it. I used the coolest single board Nodemcu to bring the thing in reality. This Desk Notifier will notify you about your new Gmail and will show you the total number of new emails.
1X Nextion 3.2 TFT Display
1X Node MCU
1X Red LED
1X 5V 1000mA Power Supply
1X 220 Ohm Resistor
1X AMS 1117 3.3V Regulator
Hot Glue Gun
Step 1: Showing the Number of Unread Emails
To communicate with Google's Gmail servers, we have to establish a secure connection to the server and send a secure HTTPS request with our email address and password. Gmail will then respond with an XML document containing all kinds of information, like (parts of) your most recent messages and the number of unread emails.
To make sure we don't send our Google password to a malicious server, we have to check the server's identity, using the SHA-1 fingerprint of the SSL certificate. This is a unique sequence of hexadecimal characters that identifies the server.
Step 2: Hardware & Wiring
I included a couple of photos above
- 220 ohm resistor between the LED and D3 pins Wire between GND.
- The TX pin is connected to the RX pin of NEXTION Display.
- The RX pin is connected to the TX pin of NEXTION Display.
Step 3: Set Up Nextion Display
Paste this .tft file in an empty micro sd card. We then place this SD card in the sd card slot at the back of the Nextion Display.If we now power up the display, it will update the code that the display is executing. If we now remove the SD card and power up the display one more time, the new graphical user interface will appear.
Step 4: Code & How It Works
Ok, so here's what's actually going on.
Someone sends you an email. Gmail sees it, and starts your Nodemcu program.The Nodemcu receives the HTTP Response, and that is what causes the LED light bulb to turn on. and also displays the count of unread emails.
Step 5: Required Files
Step 6: Encoding Your Login Credentials
To get access to the feed, you have to enter your email address and password. You can't send them as plain text, you have to encode them to base64 first. Use the following command in a terminal (Linux & Mac):
echo -n "email@example.com:password" | base64
Then add it to the sketch. For example:
const char* credentials = "ZW1haWwuYWRkcmVzc0BnbWFpbC5jb206cGFzc3dvcmQ=";
Step 7: Testing & Summery
Hope this can be helpful for someone and learned as much as I did. You can use all the files shared here and have a go yourself.
Any comments are welcome, if you if you enjoyed it share your feedback and Vote. Thanks everyone and see you soon. Happy making!
Participated in the
Work From Home Speed Challenge