Skip to content

Get notified as soon as an NVIDIA GeForce RTX Founders Edition is available for purchase

License

Notifications You must be signed in to change notification settings

ElegyD/nvidia-notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NVIDIA notifier

Get notified as soon as an NVIDIA GeForce RTX Founders Edition is available for purchase.

Requirements

Installation

Clone this repository

  • git clone https://github.com/ElegyD/nvidia-notifier.git

Install node packages

  • cd nvidia-notifier/
  • npm install
  • (Optional): npm install -g pm2

Setup environment variables

Create a .env file in the root directory for configuration.

Default values are shown below

INTERVAL=60                     # Inverval in seconds to fetch NVIDIA API
LOCALE=de-de                    # Locale used to fetch NVIDIA API (language & country code lowercase)
LOCALE_FEINVENTORY=DE           # Locale used to fetch NVIDIA API (country code uppercase)
RTX_3090_TI=false               # Enable/Disable RTX 3090 Ti
RTX_3090=false                  # Enable/Disable RTX 3090
RTX_3080_TI=false               # Enable/Disable RTX 3080 Ti
RTX_3080=false                  # Enable/Disable RTX 3080
RTX_3070_TI=false               # Enable/Disable RTX 3070 Ti
RTX_3070=false                  # Enable/Disable RTX 3070
RTX_3060_TI=false               # Enable/Disable RTX 3060 Ti
DAYS=                           # Weekdays comma seperated (0=su, 1=mo, …) (e.g. 1,2,3,4,5 for mo-fr)
HOURS=                          # Hours dash seperated (0-23) (e.g. 10-19)
DISCORD_TOKEN=                  # Discord bot token
DISCORD_CHANNEL_ID=             # Discord channel ID
DISCORD_ROLE_ID=                # Discord role ID
DISCORD_USER_IDS=               # Discord user IDs seperated by ';'
GOOGLE_APPLICATION_CREDENTIALS= # Google service account JSON file for FCM notifications

Discord notifications

First enter your Discord bot token in the .env file

  • For server channel messages:
    • Enter the channel ID and a optional role ID in the .env file
  • For direct user messages:
    • Enter one or more user ID's seperated by ; in the .env file

Firebase Cloud Messaging notifications

  1. Create a project in Firebase
  2. Generate and download the service account JSON file by clicking on 'Generate New Private Key'
  3. Move the file to the project dir and set the GOOGLE_APPLICATION_CREDENTIALS variable in the .env file like so:
    GOOGLE_APPLICATION_CREDENTIALS="./nvidia-notifier-firebase-adminsdk.json"
    
  4. Create an app and set up Firebase and FCM
  5. Subscribe the client app to the nvidia-notifier topic
    • The purchase link is included as a key/value pair in the notification data. Key purchaseLink.

Email notifications

To get notified by mail, the nodemailer module is used.

  • Create a nodemailer.json file in the root directory and enter your transport options.

Example setup for Gmail (with Google accounts that have 2FA enabled):

  1. Create an App password here
  2. Create the nodemailer.json file in the root directory
    {
        "service": "gmail",
        "auth": {
            "user": "[email protected]",
            "pass": "yourapppassword"
        }
    }

For other providers see the nodemailer SMTP configuration here.

Usage

Either:

  • Start with node:
    • node index.js
  • Start with PM2 to run it in the background:
    • pm2 start index.js