Youtube Desktop Notifier

About the project

I have made this "YouTube Desktop Notifier" to keep me up-to-date with my channels Subscriber and View Counts.

Story

Step 1: Hardware Requirement - 1

For this project, we need a mixture of both electronic components and woodworking tools.

  • The electronic components include:
  • A Perfboard
  • NodeMCU
  • 220v AC to 5v DC Buck Step-Down Module
  • A Buzzer Shield or a Buzzer and a 100Ω Resistor
  • SPDT switch
  • 4 x TM1637 4 Bits Digital 7-Segment Displays
  • Couple of coloured LEDs and equal amount of 220Ω Resistors
  • Few connecting cables
  • A USB cable to upload the code
  • and General Soldering Equipments

Step 2: Hardware Requirement - 2

For the workworking bit we need:

  • Palate Wood
  • Pencil
  • Measuring Tape
  • Hand/Chop Saw
  • Hammer
  • Nails
  • Sanding Tool
  • and Personal Protective Equipments (PPE) for woodcutting

I am making the enclosure out of pallet-wood as I have a massive pile of pallets left over from my other DIY WoodWorking Projects. You can also make the box out of cardboard or plastic container and paint it to give it COOL look.

Step 3: Topic Covered

Step 4: The Plan

The plan is to make a 24cm x 10cm box to hold the circuitry in it.

When the device is powered on, it will first connect to the specified Wi-Fi network using the SSID and password pair provided in the code. Once a connection is made the code uses a combination of the "Google API key" (I will show you how to generate it in the later section) and your "YouTube Channels’ ID" to fetch the rel="nofollow"> https://github.com/avishorp/TM1637

  • ESP8266WiFi: https://github.com/esp8266/Arduino/tree/master/li...
  • Arduino Json: https://github.com/bblanchon/ArduinoJson
  • Arduino YouTube API: https://github.com/witnessmenow/arduino-youtube-a...

    You can download them all from GitHub, I have provided the links in the description below. Once downloaded unzip and rename the libraries by removing any special characters and the "master" from their names. Place the folder in your Arduino's libraries folder. You may need to create the Libraries folder if this is your very 1st library. Restart the IDE so that it properly loads the KEYWORD file, Examples, and adds the Library to the Library Menu.

    > Unique Identifiers:

    • Along with the libraries you also need few unique identifiers for this project.
    • The first one is the SSID and password of your wireless network.
    • Then, you need your YouTube Channel's unique channel ID. To get that:
      • Sign in to your YouTube account.
      • In the top right, click your account icon > Settings.
      • From left hand panel click on "Advanced settings".
      • The channel's user and channel IDs are listed under "Account information"
    • And finally you need to generate the "Google API Key" for your channel. To generate the key
      • Google search "Using API Keys" or open the link provided in the description below.
      • Scroll down and click on "APIs & Services→Credentials"
      • If this is the very first time you are accessing this page then you will have to create a new project by clicking on the "Create" button.
      • Accept the terms and give your project a name then hit "Create" button to create the project
      • Once a project is created you just need to click on the "Create credentials" dropdown and select "API Key" from there
      • System will take its time to generate the key. Once generated, it will show you the key in a popup dialogue. - Copy and save it in your email
      • Now click on the "Library" option from the left hand panel and
      • Scroll down and enable "YouTube Data API v3" and "YouTube Reporting API" by clicking on them and hitting the "Enable" button
      • Wait for 5 to 10 minutes and then you should be able to use the API Key you just generated in your code.

    Step 7: Wood Working

    Let’s start our project by assembling the wooden box. As discussed earlier, I am going to cut:

    2 x 24x10cm, 2 x 10x6cm side panels and one 24x10cm back plate. After cutting all the wooden blocks I am going to join and sand them to give the box a nice and smooth look. At the back of the unit I am going to drill 2 holes, one of them would be for the power cord and the other one for the on and off switch.

    Step 8: Soldering

    Once the box is ready, I am going to solder all the electronics components and install them in the box.

    I will start by soldering the NodeMCU. Then, I will solder the 100Ω Resistor to the D8 pin of NodeMCU. After that I will solder the buzzer to a perfboard and will link it up to the NodeMCU. Next, I am going to solder the switch and install it at the back of the box. As per the schematic one pin of the switch will connect to the VIN of NodeMCU and the other one to the +ve terminal of the stepdown converter. The -ve end of the converter will connect to the GND pin of NodeMCU. Now, I am going to solder the 7-segments as per the schematic.

    Next, I am soldering the blue and white LEDs to the D9 and D10 pins of NodeMCU. So, this is how my faceplate looks like. Let me do a quick test before installing the faceplate. Looks like everything is working the way they should. OK, so let me install the faceplate and then I will explain the code to you guys.

    Step 9: The Code

    These are the list of the libraries that we need for this project.

    Now, if you are using the same schematic as mine you don’t have to modify anything in this code other than these few lines. You just need to add the SSID and Password of your WiFI network and the Google API Key and the channels ID here. Rest you can leave as is and load the code to the NodeMCU.

    The "api_mtbs" is the mean time between the API requests made by the microprocessor.

    Then, I am initializing the displays by setting the clock and the frameborder="0" height="576" src="https://www.youtube.com/embed/ITI9ToWFHCk?feature=oembed" width="1024">

  • Credits

    Photo of tarantula3

    tarantula3

    There were 1000+ sperms but I was the fastest one..

       

    Leave your feedback...